每日抢到五个红包(0/5)
This commit is contained in:
@@ -187,6 +187,15 @@ class RedpacketService
|
|||||||
unset($grabResult['all_records']);//前端不要
|
unset($grabResult['all_records']);//前端不要
|
||||||
unset($grabResult['statistics']);//前端不要
|
unset($grabResult['statistics']);//前端不要
|
||||||
|
|
||||||
|
//处理任务
|
||||||
|
//查询今日是否抢到5个红包
|
||||||
|
$tady_red_num = Db::name('redpacket_record')
|
||||||
|
->where('user_id',$userId)
|
||||||
|
->where('createtime', '>=', strtotime(date('Y-m-d')))
|
||||||
|
->count();
|
||||||
|
if($tady_red_num >= 5){
|
||||||
|
model('api/Tasks')->tasks_complete($userId,36);
|
||||||
|
}
|
||||||
return [
|
return [
|
||||||
'code' => 1,
|
'code' => 1,
|
||||||
'msg' => '抢红包成功',
|
'msg' => '抢红包成功',
|
||||||
|
|||||||
Reference in New Issue
Block a user