Commit 45205137 by doszhang

Merge branch 'master' into release

parents 4265c104 36cdb281
...@@ -158,26 +158,67 @@ class IndexController extends Controller ...@@ -158,26 +158,67 @@ class IndexController extends Controller
$now = time(); $now = time();
$req_type = array(); $req_type = array();
$type_list = array(1,2,3); $type_list = array(1,2,3);
$date = date('Ymd');
foreach ($type_list as $type) { foreach ($type_list as $type) {
$c = M('prize')->where(array( $c = M('prize')->where(array(
'prize_type' => $type, 'prize_type' => $type,
'is_get' => 1, 'is_get' => 1,
))->count(); ))->count();
if ($type == 1) { if($date == '20191224')
if ($c >= 25) { {
if ($type == 1) {
if ($c >= 12) {
continue; continue;
} }
}
else if ($type == 2) {
if ($c >= 250) {
continue;
}
}
else if ($type == 3) {
if ($c >= 650) {
continue;
}
}
} }
else if ($type == 2) { else if($date == '20191225')
if ($c >= 500) { {
if ($type == 1) {
if ($c >= 10) {
continue; continue;
} }
}
else if ($type == 2) {
if ($c >= 200) {
continue;
}
}
else if ($type == 3) {
if ($c >= 520) {
continue;
}
}
} }
else if ($type == 3) { else if($date == '20191226')
if ($c >= 1000) { {
if ($type == 1) {
if ($c >= 3) {
continue; continue;
} }
}
else if ($type == 2) {
if ($c >= 50) {
continue;
}
}
else if ($type == 3) {
if ($c >= 130) {
continue;
}
}
} }
$req_type[] = $type; $req_type[] = $type;
} }
if (empty($req_type)) { if (empty($req_type)) {
......
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