后台上线后bug修改

This commit is contained in:
2026-01-21 18:26:03 +08:00
parent 3597f8f864
commit 993298694b
3 changed files with 25 additions and 7 deletions

View File

@@ -768,7 +768,7 @@ class Statistical extends adminApi
->join('vs_gift_bag_detail b', 'a.parent_id=b.id', 'INNER')
->field('a.createtime,b.type,b.foreign_id,b.quantity,b.gold')
->where(['b.type'=>['in', [1,2]]])
->whereBetween('a.gift_bag_id', [18, 51])
->whereBetween('a.gift_bag_id', [18, 52])
->where($where)
->select();
}else{
@@ -778,7 +778,7 @@ class Statistical extends adminApi
->join('vs_gift_bag_detail b', 'a.parent_id=b.id', 'INNER')
->field('a.createtime,b.type,b.foreign_id,b.quantity,b.gold')
->where(['b.type'=>['in', [1,2]]])
->whereBetween('a.gift_bag_id', [18, 51])
->whereBetween('a.gift_bag_id', [18, 52])
->whereBetween('a.createtime', [strtotime($stime), 1767114849])
->where($where)
->select();
@@ -787,7 +787,7 @@ class Statistical extends adminApi
->join('vs_gift_bag_detail b', 'a.parent_id=b.id', 'INNER')
->field('a.createtime,b.type,b.foreign_id,b.quantity,b.gold')
->where(['b.type'=>['in', [1,2]]])
->whereBetween('a.gift_bag_id', [18, 51])
->whereBetween('a.gift_bag_id', [18, 52])
->whereBetween('a.createtime', [1767114849, strtotime($etime)])
->where($where)
->select();
@@ -807,7 +807,7 @@ class Statistical extends adminApi
->join('vs_gift_bag_detail b', 'a.parent_id=b.id', 'INNER')
->field('a.createtime,b.type,b.foreign_id,b.quantity,b.gold')
->where(['b.type'=>['in', [1,2]]])
->whereBetween('a.gift_bag_id', [18, 51])
->whereBetween('a.gift_bag_id', [18, 52])
->where($where)
->select();
}

View File

@@ -682,6 +682,13 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
if($type=="set"){
$xlh_periods_num = $periods;
Cache::set($cacheKey, $xlh_periods_num, 0);
}else{
if(empty($xlh_periods_num)){
$xlh_periods_num = Db::name("vs_room_pan_xlh")
->order('id desc')
->value('periods');
Cache::set($cacheKey, $xlh_periods_num, 0);
}
}
return $xlh_periods_num;
}

View File

@@ -1,6 +1,7 @@
<?php
namespace app\api\model;
use think\Log;
use think\Model;
use think\Session;
use think\Db;
@@ -470,8 +471,9 @@ class Tasks extends Model
//PK任务完成
public function tasks_complete_pk($Victory_user_ids,$Failure_user_ids,$Draw_user_ids,$task_id=35){
$current_progress =1;
Log::record("PK任务完成信息入值1".$Victory_user_ids,"info");
Log::record("PK任务完成信息入值2".$Failure_user_ids,"info");
Log::record("PK任务完成信息入值3".$Draw_user_ids,"info");
//查询任务
$task_info = Db::name('vs_tasks')->where('id',$task_id)->where('delete_time',0)->where('is_active',1)->find();
if(empty($task_info)){
@@ -483,11 +485,12 @@ class Tasks extends Model
if(empty($Draw_user_ids)){
$user_ids = array_unique(array_merge($Victory_user_ids_array,$Failure_user_ids_array));
}else{
$user_ids = $Draw_user_ids_array;
$user_ids = array_unique($Draw_user_ids_array);
}
$insert_data = [];
foreach ($user_ids as $user_id) {
$user_daily_tasks = Db::name('vs_tasks_user_daily')->where('user_id',$user_id)->where('task_id',$task_id)->whereTime('createtime', 'today')->find();
Log::record("PK任务完成信息状态".$user_id."".json_encode($user_daily_tasks),"info");
if ($user_daily_tasks && $user_daily_tasks['is_completed'] == 1) {//已完成 不处理
continue;
}
@@ -504,9 +507,15 @@ class Tasks extends Model
if($current_progress >= $task_info['target_quantity'] && $ext >= 1){
$is_completed = 1;
$completion_time = time();
Log::record("PK任务完成信息".$user_id."-PK次数".$current_progress,"info");
Log::record("PK任务完成信息".$user_id."-胜利次数:".$ext,"info");
Log::record("PK任务完成信息".$user_id."1","info");
}else{
Log::record("PK任务完成信息".$user_id."-PK次数".$current_progress,"info");
Log::record("PK任务完成信息".$user_id."-胜利次数:".$ext,"info");
$is_completed = 0;
$completion_time = null;
Log::record("PK任务完成信息".$user_id."2","info");
}
if($current_progress > $task_info['target_quantity']){
$current_progress = $task_info['target_quantity'];
@@ -522,6 +531,7 @@ class Tasks extends Model
'updatetime' => time(),
]);
}else{
$current_progress =1;
if(!empty($Victory_user_ids) && in_array($user_id,$Victory_user_ids_array)){
$ext = 1;
}
@@ -533,6 +543,7 @@ class Tasks extends Model
'is_completed' => 0,
'ext' => $ext,
'createtime' => time(),
'updatetime' => time(),
];
}
}