盲盒转盘-岁月之城,时空之旅,抽奖结果转落包。
-特效限制添加
This commit is contained in:
@@ -76,6 +76,9 @@ class BlindBoxTurntableGift extends Model
|
||||
public function gift_send($send_id){
|
||||
try{
|
||||
$blind_box_turntable = Db::name('vs_blind_box_turntable_log')->where(['id'=>$send_id,'is_sued'=>0])->find();
|
||||
if(in_array($blind_box_turntable['gift_bag_id'],[11,12])){
|
||||
return ['code' => 1, 'msg' => '成功', 'data' => null];
|
||||
}
|
||||
if(!$blind_box_turntable){
|
||||
return ['code' => 1, 'msg' => '成功', 'data' => null];
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -80,7 +80,12 @@ class RoomPan
|
||||
* 盲盒转盘礼物推送补发
|
||||
*/
|
||||
public function blind_box_turntable_gift_send(){
|
||||
$blind_box_turntable = db('vs_blind_box_turntable_log')->where(['is_sued'=>0,'createtime'=>['>=',time()-60*30]])->limit(1000)->select();
|
||||
$blind_box_turntable = db('vs_blind_box_turntable_log')->where([
|
||||
'is_sued'=>0,
|
||||
'gift_bag_id'=>10,
|
||||
'createtime'=>['>=',time()-60*30],
|
||||
'createtime'=>['<',time()-3]
|
||||
])->limit(1000)->select();
|
||||
if(empty($blind_box_turntable)){
|
||||
echo "没有需要发放的礼物 \n";
|
||||
}
|
||||
@@ -132,7 +137,12 @@ class RoomPan
|
||||
'base_image' => $draw_gift['base_image']
|
||||
];
|
||||
}
|
||||
|
||||
//再次验证防止并发
|
||||
$is_sued = db('vs_blind_box_turntable_log')->where('id',$v['id'])->value('is_sued');
|
||||
if($is_sued == 1){
|
||||
echo $v['id']." 已经发放过了 \n";
|
||||
continue;
|
||||
}
|
||||
// 为每个用户单独推送消息
|
||||
foreach($userGiftMap as $userId => $userData) {
|
||||
$userInfo = $userData['userInfo'];
|
||||
|
||||
Reference in New Issue
Block a user