31 Commits

Author SHA1 Message Date
c46038cf5b 新需求-后台优化 2025-10-17 18:43:04 +08:00
747c2747b1 新需求-活动需求-上线后bug修改 2025-10-17 15:50:24 +08:00
eee56fc7eb 新需求-活动需求-上线后bug修改 2025-10-17 14:20:29 +08:00
ee25111a0a 新需求-活动需求-上线后bug修改 2025-10-17 14:12:36 +08:00
20a8c4e8bf 新需求-活动需求-上线后bug修改-首充权限 2025-10-17 10:52:25 +08:00
d6c92bc150 登录 2025-10-17 10:42:48 +08:00
ea9fa85d46 新需求-活动需求-上线 2025-10-17 09:44:43 +08:00
7a703e3cfd 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 22:18:09 +08:00
4edc124d15 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 22:11:14 +08:00
92831bcd13 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 21:59:35 +08:00
8a62c2f1eb 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 21:44:23 +08:00
854c87cc46 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 21:32:55 +08:00
aa9bf9232e 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 21:27:28 +08:00
21890b3fcd 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 21:09:15 +08:00
dbe7a83aef 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 20:58:08 +08:00
39018da4e3 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 20:54:35 +08:00
85d4174798 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 20:37:44 +08:00
656f0692cf 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 20:22:06 +08:00
20ad1818e0 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 20:18:21 +08:00
9ffb61ada9 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 19:22:00 +08:00
8269218c7d 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 18:27:45 +08:00
d284ee8346 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 18:24:08 +08:00
db7a9c460c 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 16:39:58 +08:00
8ab582956e 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 15:44:53 +08:00
9f4b3a512c 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 14:40:33 +08:00
74c0e85178 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 14:14:48 +08:00
1e4729fbb7 Merge remote-tracking branch 'origin/develop' into develop 2025-10-16 11:37:58 +08:00
3abe055f1c 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 11:37:50 +08:00
36850d6087 小时榜红包入口 2025-10-16 11:01:39 +08:00
cf0d665f42 Merge remote-tracking branch 'origin/develop' into develop 2025-10-16 10:59:05 +08:00
2525487051 新需求-活动需求-盲盒转盘调通盘-巡乐会-调试 2025-10-16 10:58:57 +08:00
13 changed files with 99 additions and 30 deletions

View File

@@ -424,6 +424,7 @@ class Activities extends adminApi
'money' => $ext['money'], 'money' => $ext['money'],
'money_str' => $ext['money_str'], 'money_str' => $ext['money_str'],
'diamond' => $ext['diamond'], 'diamond' => $ext['diamond'],
'activity_end_time' => $ext['activity_end_time'],
]; ];
return V(1,"成功",$data); return V(1,"成功",$data);
} }

View File

@@ -810,6 +810,7 @@ class BlindBox extends adminApi
$platform_profit_loss = $total_money - $total_gift_money; $platform_profit_loss = $total_money - $total_gift_money;
if($profit_loss==0 || $total_money==0){ if($profit_loss==0 || $total_money==0){
$profit_loss_ratio = 0; $profit_loss_ratio = 0;
$platform_profit_loss_ratio = 0;
}else{ }else{
// 盈亏比 // 盈亏比
$profit_loss_ratio = round(($profit_loss / $total_money),3); $profit_loss_ratio = round(($profit_loss / $total_money),3);

View File

@@ -396,15 +396,28 @@ class Guild extends adminApi
} }
$count = db::name($this->table_guild_user)->alias('a') $count = db::name($this->table_guild_user)->alias('a')
->join('vs_room b', 'a.room_id = b.id', 'left') ->join('vs_room b', 'a.room_id = b.id', 'left')
->where(['a.guild_id'=>$guild_id,'a.quit_type'=>['in',[0,3]]])->where($where)->count(); ->where(['a.guild_id'=>$guild_id])->where($where)->count();
$list = db::name($this->table_guild_user)->alias('a') $list = db::name($this->table_guild_user)->alias('a')
->join('vs_room b', 'a.room_id = b.id', 'left') ->join('vs_room b', 'a.room_id = b.id', 'left')
->where(['a.guild_id'=>$guild_id,'a.quit_type'=>['in',[0,3]]])->where($where)->page($page, $page_limit)->select(); ->where(['a.guild_id'=>$guild_id])->where($where)->page($page, $page_limit)->select();
if(!$list){ if(!$list){
return V(0,"暂无数据"); return V(0,"暂无数据");
} }
$rum_lists = []; $rum_lists = [];
foreach ($list as $k=>$v){ foreach ($list as $k=>$v){
if($search_stime!="" && $v['createtime'] < strtotime($search_stime)){
$search_stime = $search_stime;
}else{
$search_stime = date('Y-m-d H:i:s',$v['createtime']) ;
}
if($v['quit_time']){
if($search_etime!="" && $v['quit_time'] > strtotime($search_etime)){
$search_etime = $search_etime;
}else{
$search_etime = date('Y-m-d H:i:s',$v['quit_time']);
}
}
$room_info = db::name('vs_room')->where(['id'=>$v['room_id']])->find(); $room_info = db::name('vs_room')->where(['id'=>$v['room_id']])->find();
$rum_lists[$k]['id']=$v['id']; $rum_lists[$k]['id']=$v['id'];
$rum_lists[$k]['room_id']=$v['room_id']; $rum_lists[$k]['room_id']=$v['room_id'];

View File

@@ -425,6 +425,12 @@ class Room extends adminApi
$search_room_id = input('search_room_id', ''); $search_room_id = input('search_room_id', '');
$search_user_id = input('search_user_id', ''); $search_user_id = input('search_user_id', '');
$search_status = input('search_status', ''); $search_status = input('search_status', '');
$type_id = input('type_id', '');
$label_id = input('label_id', '');
$is_hot = input('is_hot', '');
$is_top = input('is_top', '');
$is_recommend = input('is_recommend', '');
$where=[]; $where=[];
//房间号 //房间号
if($search_room_id!==''){ if($search_room_id!==''){
@@ -437,6 +443,21 @@ class Room extends adminApi
if($search_status!==''){ if($search_status!==''){
$where['room_status'] = $search_status; $where['room_status'] = $search_status;
} }
if($type_id!==''){
$where['type_id'] = $type_id;
}
if($label_id!==''){
$where['label_id'] = $label_id;
}
if($is_hot!==''){
$where['is_hot'] = $is_hot;
}
if($is_top!==''){
$where['is_top'] = $is_top;
}
if($is_recommend!==''){
$where['is_recommend'] = $is_recommend;
}
//房间列表只展示 审核通过的房间 //房间列表只展示 审核通过的房间
$where['apply_status'] = 2;//1待审核 2审核通过 3审核失败 $where['apply_status'] = 2;//1待审核 2审核通过 3审核失败
$where['type_id'] = ['<>',6]; $where['type_id'] = ['<>',6];

View File

@@ -88,8 +88,8 @@ class Activities extends BaseCom
$uid = input('uid',$this->uid); $uid = input('uid',$this->uid);
$permission_status = 1; $permission_status = 1;
//查询是否首充 //查询是否首充
$is_first_charge = db::name('vs_user_money_log')->where('user_id',$uid)->where('change_type',2)->where('money_type',1)->count(); $is_first_charge = db::name('vs_user_money_log')->where('user_id',$uid)->where('change_type',2)->where('money_type',1)->where(['createtime'=>['>=',"1760666400"]])->count();
$permission = DB::name('vs_activities_receive')->where(['activities_id'=>$activities_id,'user_id'=>$uid])->find(); $permission = DB::name('vs_activities_receive')->where(['activities_id'=>$activities_id,'user_id'=>$uid])->where(['createtime'=>['>=',"1760666400"]])->find();
$system = request()->header('system'); $system = request()->header('system');
$app_version = request()->header('App-Version'); $app_version = request()->header('App-Version');
if(!$app_version){ if(!$app_version){
@@ -200,7 +200,7 @@ class Activities extends BaseCom
public function drop_gift_send() public function drop_gift_send()
{ {
$uid = input('uid',$this->uid); $uid = input('uid',$this->uid);
$reslut = model('Activities')->drop_gift_send($uid); $reslut = model('Activities')->drop_gift_send($uid,16);
return V($reslut['code'],$reslut['msg'], $reslut['data']); return V($reslut['code'],$reslut['msg'], $reslut['data']);
} }
@@ -313,14 +313,15 @@ class Activities extends BaseCom
$uid = input('uid',$this->uid); $uid = input('uid',$this->uid);
$first_charge_permission = 1; $first_charge_permission = 1;
//查询是否首充 //查询是否首充
$is_first_charge = db::name('vs_user_money_log')->where('user_id',$uid)->where('change_type',2)->where('money_type',1)->count(); $is_first_charge = db::name('vs_user_money_log')->where('user_id',$uid)->where('change_type',2)->where('money_type',1)->where(['createtime'=>['>=',"1760666400"]])->count();
$permission = DB::name('vs_activities_receive')->where(['activities_id'=>$activities_id,'user_id'=>$uid])->find(); $permission = DB::name('vs_activities_receive')->where(['activities_id'=>$activities_id,'user_id'=>$uid])->where(['createtime'=>['>=',"1760666400"]])->find();
if($is_first_charge > 0){ if($is_first_charge > 0){
$first_charge_permission = 0; $first_charge_permission = 0;
} }
if($permission){ if($permission){
$first_charge_permission = 0; $first_charge_permission = 0;
} }
//天降好礼 //天降好礼
$gift_bag = DB::name('vs_gift_bag')->where(['activities_id'=>3,'status'=>1])->find(); $gift_bag = DB::name('vs_gift_bag')->where(['activities_id'=>3,'status'=>1])->find();
$day_drop_permission = 0; $day_drop_permission = 0;
@@ -332,11 +333,19 @@ class Activities extends BaseCom
} }
//新人充值好礼 //新人充值好礼
$activities = DB::name('vs_activities')->where(['id'=>7,'status'=>1,'delete_time'=>0])->find(); $activities = DB::name('vs_activities')->where(['id'=>7,'status'=>1,'delete_time'=>0])->find();
if($activities){
$effective_time = $activities['effective_time'];
}else{
$effective_time = 0;
}
$bag_data = DB::name('vs_gift_bag')->where(['activities_id'=>7,'status'=>1,'delete_time'=>0])->select(); $bag_data = DB::name('vs_gift_bag')->where(['activities_id'=>7,'status'=>1,'delete_time'=>0])->select();
$bag_receive_log = DB::name('vs_gift_bag_receive_log')->where(['gift_bag_id'=>['in',array_column($bag_data,'id')],'user_id'=>$uid])->select(); $bag_receive_log = DB::name('vs_gift_bag_receive_log')->where(['gift_bag_id'=>['in',array_column($bag_data,'id')],'user_id'=>$uid])->select();
$new_permission = 0; $new_permission = 0;
$user_info = DB::name('user')->where(['id'=>$uid])->find(); $user_info = DB::name('user')->where(['id'=>$uid])->find();
if($user_info['createtime'] + $activities['effective_time'] >= time()){ if($user_info['createtime']<"1760666400"){
$user_info['createtime'] = 1760666400;
}
if($user_info['createtime'] + $effective_time >= time()){
$new_permission = 1; $new_permission = 1;
} }
$gift_bag_log_ids = array_column($bag_receive_log,'gift_bag_id'); $gift_bag_log_ids = array_column($bag_receive_log,'gift_bag_id');

View File

@@ -25,7 +25,7 @@ class Activities extends Model
public static function first_charge_gift_send($user_id,$money=0) public static function first_charge_gift_send($user_id,$money=0)
{ {
//礼包 //礼包
$gift_bag = DB::name('vs_gift_bag')->where(['activities_id'=>1,'status'=>1,'delete_time'=>0,'money'=>['>=',$money]])->order('money desc')->find(); $gift_bag = DB::name('vs_gift_bag')->where(['activities_id'=>1,'status'=>1,'delete_time'=>0,'money'=>['<=',$money]])->order('money desc')->find();
$gift_bag_id = $gift_bag['id'] ?? 0; $gift_bag_id = $gift_bag['id'] ?? 0;
if (!$gift_bag_id) { if (!$gift_bag_id) {
return ['code' => 0, 'msg' => '礼包不存在','data' => null]; return ['code' => 0, 'msg' => '礼包不存在','data' => null];

View File

@@ -163,7 +163,7 @@ class BlindBoxTurntableGiftDrawWorld extends Model
->field('bag.id,bag.name,bag.ext,gift.gid as gift_id,gift.gift_price') ->field('bag.id,bag.name,bag.ext,gift.gid as gift_id,gift.gift_price')
->where('bag.id', $gift_bag_id) ->where('bag.id', $gift_bag_id)
->find(); ->find();
if (!$bag_data || !$bag_data['gift_price']) { if (!$bag_data || !is_array($bag_data) || !isset($bag_data['gift_price'])) {
return ['code' => 0, 'msg' => '盲盒配置不存在或盲盒礼物不存在', 'data' => null]; return ['code' => 0, 'msg' => '盲盒配置不存在或盲盒礼物不存在', 'data' => null];
} }
// 2. 获取房间信息 // 2. 获取房间信息
@@ -225,7 +225,10 @@ class BlindBoxTurntableGiftDrawWorld extends Model
} }
$totalDrawTimes = 0;//总抽奖次数重置 $totalDrawTimes = 0;//总抽奖次数重置
} }
// 在处理奖池重置逻辑之前添加检查
if (!is_array($availableGifts)) {
throw new \Exception('可用礼物数据格式错误');
}
// 3. 预加载礼物信息(减少后续查询) // 3. 预加载礼物信息(减少后续查询)
$giftInfoMap = $this->preloadGiftInfo($availableGifts); $giftInfoMap = $this->preloadGiftInfo($availableGifts);
@@ -287,6 +290,9 @@ class BlindBoxTurntableGiftDrawWorld extends Model
&$currentXlhPeriodsNum, &$currentXlhPeriodsNum,
$remaining_available_gifts $remaining_available_gifts
) { ) {
if (!is_array($toarray) || !is_array($availableGifts) || !is_array($giftInfoMap)) {
throw new \Exception('预计算参数格式错误');
}
$precomputedResults = []; $precomputedResults = [];
$precomputedResultss = []; $precomputedResultss = [];
$addcurrentXlhPeriodsNum = 0; $addcurrentXlhPeriodsNum = 0;
@@ -313,7 +319,7 @@ class BlindBoxTurntableGiftDrawWorld extends Model
for ($i = 0; $i < $userRemainingAllocation; $i++) { for ($i = 0; $i < $userRemainingAllocation; $i++) {
$selectedGift = $this->selectGiftWithAliasMethod($aliasTableForRemaining); $selectedGift = $this->selectGiftWithAliasMethod($aliasTableForRemaining);
if ($selectedGift) { if ($selectedGift) {
$gift = $giftInfoMap[$selectedGift['foreign_id']] ?? null; $gift = $giftInfoMap[$selectedGift['foreign_id']];
$precomputedResults[] = [ $precomputedResults[] = [
'gift_user_id' => $giftUserId, 'gift_user_id' => $giftUserId,
'gift_bag_detail' => $selectedGift, 'gift_bag_detail' => $selectedGift,
@@ -356,7 +362,9 @@ class BlindBoxTurntableGiftDrawWorld extends Model
for ($i = 0; $i < $userNewAllocation; $i++) { for ($i = 0; $i < $userNewAllocation; $i++) {
$selectedGift = $this->selectGiftWithAliasMethod($aliasTableForNew); $selectedGift = $this->selectGiftWithAliasMethod($aliasTableForNew);
if ($selectedGift) { if ($selectedGift) {
$gift = $giftInfoMap[$selectedGift['foreign_id']] ?? null; $giftInfoMap = $this->preloadGiftInfo($availableGifts);
$gift = $giftInfoMap[$selectedGift['foreign_id']];
if($gift)
$precomputedResults[] = [ $precomputedResults[] = [
'gift_user_id' => $giftUserId, 'gift_user_id' => $giftUserId,
'gift_bag_detail' => $selectedGift, 'gift_bag_detail' => $selectedGift,
@@ -556,7 +564,7 @@ class BlindBoxTurntableGiftDrawWorld extends Model
// 按礼物ID分组统计需要减少的数量 // 按礼物ID分组统计需要减少的数量
$inventoryUpdates = []; $inventoryUpdates = [];
foreach ($precomputedResults as $result) { foreach ($precomputedResults as $result) {
$giftId = $result['gift_bag_detail']['id']; $giftId = $result['gift_bag_detail']['id']??0;
$inventoryUpdates[$giftId] = ($inventoryUpdates[$giftId] ?? 0) + 1; $inventoryUpdates[$giftId] = ($inventoryUpdates[$giftId] ?? 0) + 1;
} }
@@ -579,9 +587,13 @@ class BlindBoxTurntableGiftDrawWorld extends Model
*/ */
private function batchInsertGiftBagReceiveLog($user_id, $boxTurntableLog, $bag_data, $room_id, $precomputedResults) private function batchInsertGiftBagReceiveLog($user_id, $boxTurntableLog, $bag_data, $room_id, $precomputedResults)
{ {
$batchInsertData = []; $batchInsertData = [];
foreach ($precomputedResults as $result) { foreach ($precomputedResults as $result) {
if(!isset($result['gift']['gift_price'])){
Log::record('数据报错:'.json_encode($result),"info");
}
$batchInsertData[] = [ $batchInsertData[] = [
'user_id' => $user_id, 'user_id' => $user_id,
'gift_user_id' => $result['gift_user_id'], 'gift_user_id' => $result['gift_user_id'],
@@ -774,13 +786,12 @@ class BlindBoxTurntableGiftDrawWorld extends Model
// 处理飘屏 // 处理飘屏
if ($xlhIsPiaoPing == 1 || $xlhIsPiaoPing == 2) { if ($xlhIsPiaoPing == 1 || $xlhIsPiaoPing == 2) {
$this->handleXlhPiaoPing($room_id, $xlh_ext, $xlhIsPiaoPing,$room); $this->handleXlhPiaoPing($room_id, $xlh_ext, $xlhIsPiaoPing);
} }
// 更新巡乐会状态并推送
$this->updateAndPushXlhStatus($room_id, $xlh_ext, $currentXlhPeriodsNum); $this->updateAndPushXlhStatus($room_id, $xlh_ext, $currentXlhPeriodsNum);
} }
private function handleXlhPiaoPing($room_id, $xlh_ext, $xlhIsPiaoPing,$room){ private function handleXlhPiaoPing($room_id, $xlh_ext, $xlhIsPiaoPing){
if($xlhIsPiaoPing == 1){ if($xlhIsPiaoPing == 1){
// 即将开始推送飘屏 // 即将开始推送飘屏
$text = "巡乐会即将开始..."; $text = "巡乐会即将开始...";
@@ -831,7 +842,11 @@ class BlindBoxTurntableGiftDrawWorld extends Model
if($xlh['current_num'] >= $xlh_ext['open_condition']['start_num']){ if($xlh['current_num'] >= $xlh_ext['open_condition']['start_num']){
$xlh['status'] = 1;//状态 1:巡乐会开始 2:即将开始开始 0:等待开始 $xlh['status'] = 1;//状态 1:巡乐会开始 2:即将开始开始 0:等待开始
//查询巡乐会信息 //查询巡乐会信息
$pan_xlh = db::name('vs_room_pan_xlh')->where('room_id',$room_id)->order('id desc')->find(); $pan_xlh = db::name('vs_room_pan_xlh')->where('send_time',0)->order('id desc')->find();
if(empty($pan_xlh)){
$this->handleXlhPiaoPing($room_id, $xlh_ext, 2);
$pan_xlh = db::name('vs_room_pan_xlh')->where('send_time',0)->order('id desc')->find();
}
$xlh['end_time'] = $pan_xlh['end_time'] ?? 0; $xlh['end_time'] = $pan_xlh['end_time'] ?? 0;
} elseif($xlh['current_num'] >= $xlh_ext['open_condition']['waiting_start_num'] && $xlh['current_num'] < $xlh_ext['open_condition']['start_num']){ } elseif($xlh['current_num'] >= $xlh_ext['open_condition']['waiting_start_num'] && $xlh['current_num'] < $xlh_ext['open_condition']['start_num']){
$xlh['status'] = 2;//状态 1:巡乐会开始 2:即将开始开始 0:等待开始 $xlh['status'] = 2;//状态 1:巡乐会开始 2:即将开始开始 0:等待开始
@@ -1233,6 +1248,8 @@ class BlindBoxTurntableGiftDrawWorld extends Model
'createtime' => time() 'createtime' => time()
]); ]);
$is_zhong_jiang = 1; $is_zhong_jiang = 1;
}else{
$is_zhong_jiang = 0;
} }
$total_processed += $current_batch; $total_processed += $current_batch;
} }

View File

@@ -206,6 +206,9 @@ class Decorate extends Model
if($decorate_price_info['price']<=0 && $user_decorate_data['end_time'] > $now_time + $change_time){ if($decorate_price_info['price']<=0 && $user_decorate_data['end_time'] > $now_time + $change_time){
return ['code' => 0, 'msg' => '您已购买过此装扮,请勿重复购买', 'data' => null]; return ['code' => 0, 'msg' => '您已购买过此装扮,请勿重复购买', 'data' => null];
} }
if($user_decorate_data['end_time'] < $now_time){
$user_decorate_data['end_time'] = 0;
}
$change_time = $day * 24 * 3600; $change_time = $day * 24 * 3600;
$update['is_using'] = 2; $update['is_using'] = 2;
$update['end_time'] = $user_decorate_data['end_time'] + $change_time; $update['end_time'] = $user_decorate_data['end_time'] + $change_time;

View File

@@ -364,21 +364,21 @@ class Login extends Model
$openid = $userinfo['openid']; $openid = $userinfo['openid'];
$user_info_data = model('UserData')->where(['wx_openid' => $openid,'deletetime'=>0])->find(); $user_info_data = model('UserData')->where(['wx_openid' => $openid,'deletetime'=>0])->find();
$config_time = get_system_config_value('cancel_to_reset_reg'); $config_time = get_system_config_value('cancel_to_reset_reg');
if($user_info_data['deletetime'] != 0 && time() - $user_info_data['deletetime'] < 86400 * $config_time){ if(isset($user_info_data) && $user_info_data['deletetime'] != 0 && time() - $user_info_data['deletetime'] < 86400 * $config_time){
return ['code' => 0, 'msg' => '注销后需等待'.$config_time.'天才能重新注册', 'data' => null]; return ['code' => 0, 'msg' => '注销后需等待'.$config_time.'天才能重新注册', 'data' => null];
} }
}elseif ($type == 'ali'){ }elseif ($type == 'ali'){
$ali_userid = $userinfo['open_id']; $ali_userid = $userinfo['open_id'];
$user_info_data = model('UserData')->where(['ali_userid' => $ali_userid,'deletetime'=>0])->find(); $user_info_data = model('UserData')->where(['ali_userid' => $ali_userid,'deletetime'=>0])->find();
$config_time = get_system_config_value('cancel_to_reset_reg'); $config_time = get_system_config_value('cancel_to_reset_reg');
if($user_info_data['deletetime'] != 0 && time() - $user_info_data['deletetime'] < 86400 * $config_time){ if(isset($user_info_data) && $user_info_data['deletetime'] != 0 && time() - $user_info_data['deletetime'] < 86400 * $config_time){
return ['code' => 0, 'msg' => '注销后需等待'.$config_time.'天才能重新注册', 'data' => null]; return ['code' => 0, 'msg' => '注销后需等待'.$config_time.'天才能重新注册', 'data' => null];
} }
}elseif ($type == 'ios'){ }elseif ($type == 'ios'){
$apple_id = $userinfo; $apple_id = $userinfo;
$user_info_data = model('UserData')->where(['apple_id' => $userinfo,'deletetime'=>0])->find(); $user_info_data = model('UserData')->where(['apple_id' => $userinfo,'deletetime'=>0])->find();
$config_time = get_system_config_value('cancel_to_reset_reg'); $config_time = get_system_config_value('cancel_to_reset_reg');
if($user_info_data['deletetime'] != 0 && time() - $user_info_data['deletetime'] < 86400 * $config_time){ if(isset($user_info_data) && $user_info_data['deletetime'] != 0 && time() - $user_info_data['deletetime'] < 86400 * $config_time){
return ['code' => 0, 'msg' => '注销后需等待'.$config_time.'天才能重新注册', 'data' => null]; return ['code' => 0, 'msg' => '注销后需等待'.$config_time.'天才能重新注册', 'data' => null];
} }
} }

View File

@@ -28,9 +28,6 @@ class RoomHourRanking extends Model
//是否开启巡乐会 //是否开启巡乐会
$is_open_xlh = db::name('vs_hour_ranking_config')->where('id', 1)->value('is_open_xlh'); $is_open_xlh = db::name('vs_hour_ranking_config')->where('id', 1)->value('is_open_xlh');
//是否开启红包(下面的不要删掉,以后要用)
// $is_open_red_pack = db::name('vs_hour_ranking_config')->where('id', 1)->value('is_open_red_pack');
$is_open_red_pack = 0 ;
// 更进一步的优化版本: // 更进一步的优化版本:
$subQuery = Db::name('vs_give_gift') $subQuery = Db::name('vs_give_gift')

View File

@@ -107,6 +107,7 @@ class UserGiftPack extends Model
self::DRAW_GIFT, self::DRAW_GIFT,
self::XLH_DRAW_GIFT_GET self::XLH_DRAW_GIFT_GET
,self::HOUR_RANK_GET ,self::HOUR_RANK_GET
,self::NEW_CHARGE_GIFT
]; ];
//获取背包日志列表 //获取背包日志列表
$log_model = Db::name('vs_user_gift_pack_log')->where(['user_id'=>$uid])->whereIn('type', $type) $log_model = Db::name('vs_user_gift_pack_log')->where(['user_id'=>$uid])->whereIn('type', $type)
@@ -121,7 +122,7 @@ class UserGiftPack extends Model
$gift_info = db::name('vs_gift')->where(['gid'=>$v['gid']])->find(); $gift_info = db::name('vs_gift')->where(['gid'=>$v['gid']])->find();
$list[$k]['remarks'] = $v['remarks']; $list[$k]['remarks'] = $v['remarks'];
$list[$k]['gift_num'] = $v['change_num']; $list[$k]['gift_num'] = $v['change_num'];
$list[$k]['gift_name'] = "X".$v['change_num'].$gift_info['gift_name']; $list[$k]['gift_name'] = $gift_info['gift_name']." X ".$v['change_num'];
$list[$k]['gift_image'] = $gift_info['play_image']; $list[$k]['gift_image'] = $gift_info['play_image'];
$list[$k]['time'] = date('Y-m-d H:i:s', $v['createtime']); $list[$k]['time'] = date('Y-m-d H:i:s', $v['createtime']);
} }
@@ -148,7 +149,7 @@ class UserGiftPack extends Model
$gift_info = db::name('vs_gift')->where(['gid'=>$v['gid']])->find(); $gift_info = db::name('vs_gift')->where(['gid'=>$v['gid']])->find();
$list[$k]['remarks'] = $v['remarks']; $list[$k]['remarks'] = $v['remarks'];
$list[$k]['gift_num'] = $v['change_num']; $list[$k]['gift_num'] = $v['change_num'];
$list[$k]['gift_name'] = "-".$v['change_num'].$gift_info['gift_name']; $list[$k]['gift_name'] = $gift_info['gift_name']." - ".$v['change_num'];
$list[$k]['gift_image'] = $gift_info['play_image']; $list[$k]['gift_image'] = $gift_info['play_image'];
$list[$k]['time'] = date('Y-m-d H:i:s', $v['createtime']); $list[$k]['time'] = date('Y-m-d H:i:s', $v['createtime']);
} }

View File

@@ -1170,7 +1170,7 @@ function handelCharge($where,$data){
return 0; return 0;
} }
//查询是否首充 //查询是否首充
$is_first_charge = db::name('vs_user_money_log')->where('user_id',$orderModel['user_id'])->where('change_type',2)->where('money_type',1)->count(); $is_first_charge = db::name('vs_user_money_log')->where('user_id',$orderModel['user_id'])->where('change_type',2)->where('money_type',1)->where(['createtime'=>['>=',"1760666400"]])->count();
//添加充值记录 //添加充值记录
$res2 = db::name('vs_user_money_log')->insert([ $res2 = db::name('vs_user_money_log')->insert([
'user_id' => $orderModel['user_id'], 'user_id' => $orderModel['user_id'],
@@ -1203,6 +1203,12 @@ function handelCharge($where,$data){
if($is_first_charge == 0){ if($is_first_charge == 0){
model('Activities')->first_charge_gift_send($orderModel['user_id'],$orderModel['money']); model('Activities')->first_charge_gift_send($orderModel['user_id'],$orderModel['money']);
} }
//活动
if($orderModel['type_id'] == 6){
$orderModel['type_params'] = 2;
}elseif(in_array($orderModel['type_id'],[14,15,16])){
$orderModel['type_params'] = 3;
}
switch ($orderModel['type_params']){ switch ($orderModel['type_params']){
case 2: case 2:
//天降好礼 //天降好礼

View File

@@ -39,9 +39,9 @@ class PerformPerSecond
// echo "房间火热值更新:\n"; // echo "房间火热值更新:\n";
// $this->room_hot_update(); // $this->room_hot_update();
// echo "\n"; // echo "\n";
// echo "提现云账号订单状态查询:\n"; echo "提现云账号订单状态查询:\n";
// $this->withdraw_order_status(); $this->withdraw_order_status();
// echo "\n"; echo "\n";
} }