|
@@ -49,7 +49,7 @@ class Eggnew extends Api
|
|
|
*/
|
|
|
public function strike() {
|
|
|
// $this->error("系统正在维护中。。。");
|
|
|
-
|
|
|
+ $nowtime = time();
|
|
|
$num = $this->request->request("num");
|
|
|
$type = $this->request->request("type",1);
|
|
|
$party_id = $this->request->request("party_id", 0);// 派对ID
|
|
@@ -83,8 +83,8 @@ class Eggnew extends Api
|
|
|
$this->error('暂时还没有奖池');
|
|
|
}
|
|
|
$jackpot_id = $jackpot["id"];
|
|
|
- \app\common\model\EggJackpot::update(["status"=>1],["id"=>$jackpot_id]);//打开
|
|
|
- \app\common\model\EggGift::update(["is_use"=>0],["Jackpot_id"=>$jackpot_id]);//重置礼物
|
|
|
+ \app\common\model\EggJackpot::update(["status"=>1,'updatetime'=>$nowtime],["id"=>$jackpot_id]);//打开,启用时间
|
|
|
+ \app\common\model\EggGift::update(["is_use"=>0,'updatetime'=>$nowtime],["Jackpot_id"=>$jackpot_id]);//重置礼物,启用时间
|
|
|
}
|
|
|
|
|
|
// 查找奖池对应的奖池礼物
|
|
@@ -104,10 +104,10 @@ class Eggnew extends Api
|
|
|
|
|
|
// 更新奖池
|
|
|
$res2 = \app\common\model\EggJackpot::update(["status"=>-1],["id"=>$jackpot_id]);
|
|
|
- $res3 = \app\common\model\EggJackpot::update(["status"=>1],["id"=>$next_jackpot_id]);
|
|
|
+ $res3 = \app\common\model\EggJackpot::update(["status"=>1,'updatetime'=>$nowtime],["id"=>$next_jackpot_id]);//打开,启用时间
|
|
|
|
|
|
// 下个奖池所有礼物改为未使用
|
|
|
- $res4 = \app\common\model\EggGift::update(["is_use"=>0],["Jackpot_id"=>$next_jackpot_id]);
|
|
|
+ $res4 = \app\common\model\EggGift::update(["is_use"=>0,'updatetime'=>$nowtime],["Jackpot_id"=>$next_jackpot_id]);//重置礼物,启用时间
|
|
|
|
|
|
// 获取下个奖池礼物
|
|
|
$nextjackpotGift = \app\common\model\EggGift::where(["Jackpot_id"=>$next_jackpot_id,"is_use"=>0])->select();
|
|
@@ -182,7 +182,8 @@ class Eggnew extends Api
|
|
|
"special" => $v["special"],
|
|
|
"gift_name" => $v["gift_name"],
|
|
|
"Jackpot_id" => $v["Jackpot_id"],
|
|
|
- "prize_no" => $v["prize_no"],
|
|
|
+// "prize_no" => $v["prize_no"],
|
|
|
+ "jackpot_updatetime" => $v["updatetime"],
|
|
|
"price" => $v["price"],
|
|
|
"createtime" => time(),
|
|
|
];
|