Commit 7ef550b6 by doszhang

dos

parent 2ac14aac
......@@ -43,7 +43,7 @@ class IndexController extends Controller
$now = time();
$type = 1;
$c = M('prize')->where(array(
'type' => $type,
'prize_type' => $type,
))->count();
if ($c >= 20) {
return false;
......@@ -51,6 +51,7 @@ class IndexController extends Controller
$prize = M('Prize')->where(array(
'is_get' => 0,
'prize_type' => $type,
'uid' => 0
))->order('rand()')->limit(1)->find();
if (!$prize) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment