爆币
This commit is contained in:
@@ -34,7 +34,7 @@ class Lottery extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
$nums = $num * count($toarray);
|
$nums = $num * count($toarray);
|
||||||
// $this->lottery($send_uid,$gift_info['gift_price'],$nums,$room_id,$gift_id);
|
$this->lottery($send_uid,$gift_info['gift_price'],$nums,$room_id,$gift_id);
|
||||||
|
|
||||||
//送礼 开启事务
|
//送礼 开启事务
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
@@ -125,7 +125,7 @@ class Lottery extends Model
|
|||||||
//抽奖
|
//抽奖
|
||||||
public function lottery($send_uid,$gift_price,$num,$room_id,$giftId)
|
public function lottery($send_uid,$gift_price,$num,$room_id,$giftId)
|
||||||
{
|
{
|
||||||
try {
|
// try {
|
||||||
for($i=0;$i<$num;$i++){
|
for($i=0;$i<$num;$i++){
|
||||||
$gift_gold = $gift_price;
|
$gift_gold = $gift_price;
|
||||||
$service = new LotteryService();
|
$service = new LotteryService();
|
||||||
@@ -151,10 +151,10 @@ class Lottery extends Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return V(1, '送礼成功');
|
return V(1, '送礼成功');
|
||||||
} catch (Exception $e) {
|
// } catch (Exception $e) {
|
||||||
Log::error('抽奖处理失败:' . $e->getMessage());
|
// Log::error('抽奖处理失败:' . $e->getMessage());
|
||||||
return V(0, $e->getMessage());
|
// return V(0, $e->getMessage());
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user