|
@@ -64,17 +64,6 @@ class Eggnew extends Api
|
|
|
$giftdata = [];
|
|
|
$user_id = $this->auth->id;
|
|
|
|
|
|
- // 防止超卖
|
|
|
- $redis = new Redis();
|
|
|
- $redisconfig = config("redis");
|
|
|
- $redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
- if ($redisconfig['redis_pwd']) {
|
|
|
- $redis->auth($redisconfig['redis_pwd']);
|
|
|
- }
|
|
|
- if($redisconfig['redis_selectdb'] > 0){
|
|
|
- $redis->select($redisconfig['redis_selectdb']);
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
$do_no = createUniqueNo('E',$user_id);
|
|
|
|
|
@@ -118,8 +107,8 @@ class Eggnew extends Api
|
|
|
$res3 = \app\common\model\EggJackpot::update(["status"=>1],["id"=>$next_jackpot_id]);
|
|
|
|
|
|
// 下个奖池所有礼物改为未使用
|
|
|
-// $res4 = \app\common\model\EggGift::update(["is_use"=>0],["Jackpot_id"=>$next_jackpot_id]);
|
|
|
- $res4 = true;
|
|
|
+ $res4 = \app\common\model\EggGift::update(["is_use"=>0],["Jackpot_id"=>$next_jackpot_id]);
|
|
|
+
|
|
|
// 获取下个奖池礼物
|
|
|
$nextjackpotGift = \app\common\model\EggGift::where(["Jackpot_id"=>$next_jackpot_id])->select();
|
|
|
|