优化超级签售空提醒

master
chenzhi 5 years ago
parent 1bff70297b
commit e6c83927fa

@ -675,15 +675,18 @@ class SsgController extends BaseController {
'limit' => $i,
)); // @todo: 并发授权码已分配的情况
$code = $list['data']['list'][$i-1]['code'];
$codeExists = M('game_supersign', 'tab_')->field('id')->where(array(
'ticket' => $code,
))->find();
if (!$codeExists) {
break;
if($code){
$codeExists = M('game_supersign', 'tab_')->field('id')->where(array(
'ticket' => $code,
))->find();
if (!$codeExists) {
break;
}
}else{
$this->assign("error","超级签已售罄~");
}
$i ++;
}
$game = M('game', 'tab_')->where(array(
'id' => $gameId,
))->find();

Loading…
Cancel
Save