巡乐会 抽中指定礼物 时间减少
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace app\api\model;
|
namespace app\api\model;
|
||||||
use app\common\controller\Push;
|
use app\common\controller\Push;
|
||||||
|
use think\Cache;
|
||||||
use think\Model;
|
use think\Model;
|
||||||
use think\Db;
|
use think\Db;
|
||||||
use think\Session;
|
use think\Session;
|
||||||
@@ -562,10 +563,19 @@ class BlindBoxTurntableGift extends Model
|
|||||||
$pan_xlh_num = $pan_xlh_num+1;
|
$pan_xlh_num = $pan_xlh_num+1;
|
||||||
if($pan_xlh_num <= 1){
|
if($pan_xlh_num <= 1){
|
||||||
$add_end_time = $ext['locking_time']['tow_no_locking_time'] * 60;
|
$add_end_time = $ext['locking_time']['tow_no_locking_time'] * 60;
|
||||||
|
Cache::set('selected_gift_id_'.$room_id.$gift_bag_detail['foreign_id'],$add_end_time,$add_end_time);
|
||||||
}else{
|
}else{
|
||||||
$add_end_time = ($ext['locking_time']['tow_no_locking_time']-$ext['locking_time']['next_time']) * 60;
|
// $add_end_time = ($ext['locking_time']['tow_no_locking_time']-$ext['locking_time']['next_time']) * 60;
|
||||||
|
if(Cache::get('selected_gift_id_'.$room_id.$gift_bag_detail['foreign_id'])){
|
||||||
|
$erci_xlh_num = Cache::get('selected_gift_id_'.$room_id.$gift_bag_detail['foreign_id']);
|
||||||
|
$add_end_time = ($erci_xlh_num-$ext['locking_time']['next_time'] *60);
|
||||||
|
Cache::set('selected_gift_id_'.$room_id.$gift_bag_detail['foreign_id'],$add_end_time,$add_end_time);
|
||||||
|
}else{
|
||||||
|
$add_end_time = ($ext['locking_time']['tow_no_locking_time']-$ext['locking_time']['next_time']) * 60;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($add_end_time <= 30){
|
if($add_end_time <= 30){
|
||||||
|
Cache::set('selected_gift_id_'.$room_id.$gift_bag_detail['foreign_id'],30,30);
|
||||||
$add_end_time = 30;
|
$add_end_time = 30;
|
||||||
}
|
}
|
||||||
$end_time = time() + $add_end_time;
|
$end_time = time() + $add_end_time;
|
||||||
|
|||||||
Reference in New Issue
Block a user