新需求:PK任务 提交
This commit is contained in:
@@ -275,6 +275,10 @@ class Guild extends Model
|
||||
$update_data['is_show_room'] = 1;
|
||||
$update_data['apply_time'] = time();
|
||||
$update_data['remarks'] = $remarks;
|
||||
$room_info = db::name('vs_room')->where(['user_id'=>$is_operate['user_id'],'delete_time'=>0,'type_id'=>['<>',6]])->find();
|
||||
if($room_info){
|
||||
$update_data['room_id'] = $room_info['id'];
|
||||
}
|
||||
//结算比例
|
||||
$configs = get_system_config();
|
||||
//未加入工会的收益
|
||||
|
||||
@@ -294,7 +294,7 @@ class Tasks extends Model
|
||||
if($v['task_id'] == 35){
|
||||
//获胜数量
|
||||
$user_win_times = $user_daily_tasks['ext'] ?? 0;
|
||||
$quantity_str = $quantity_str." 胜:(".$user_win_times.")场";
|
||||
$quantity_str = $quantity_str." 胜:(".$user_win_times."/1)场";
|
||||
}
|
||||
$v['task_name'] = $v['task_name'].$quantity_str;
|
||||
$v['jump_type_str'] = $this->jump_type[$v['jump_type']];
|
||||
@@ -500,7 +500,7 @@ class Tasks extends Model
|
||||
$ext = $user_daily_tasks['ext'] + 1;
|
||||
}
|
||||
$current_progress = $user_daily_tasks['current_progress'] +$current_progress;
|
||||
if($current_progress >= $task_info['target_quantity'] && $user_daily_tasks['ext']==1){
|
||||
if($current_progress >= $task_info['target_quantity'] && $user_daily_tasks['ext'] >= 1){
|
||||
$is_completed = 1;
|
||||
$completion_time = time();
|
||||
}else{
|
||||
|
||||
@@ -31,8 +31,9 @@ class Test
|
||||
// $this->giftSend();
|
||||
// $this->createGuildSubsidyDataNewNew();
|
||||
// $this->task_coin_count();
|
||||
$this->createGuildSubsidyDataNew();
|
||||
// $this->createGuildSubsidyDataNew();
|
||||
// $this->repair_guild_room_data();
|
||||
$this->check_guild_room_data();
|
||||
|
||||
}
|
||||
|
||||
@@ -1066,4 +1067,31 @@ class Test
|
||||
}
|
||||
echo "修改完成 共:".$num;
|
||||
}
|
||||
|
||||
//数据校验
|
||||
//查询公会房间异常数据
|
||||
public function check_guild_room_data(){
|
||||
echo "开始查询\n";
|
||||
$guild_user_data = db::name('vs_guild_user')->where(['apply_time'=>['>',0],'status'=>1,'quit_type'=>0])->field('id,user_id,room_id,guild_id,apply_time,quit_time,createtime')->select();
|
||||
foreach ($guild_user_data as $k => $v) {
|
||||
$room_info = db::name('vs_room')->where(['user_id'=>$v['user_id'],'delete_time'=>0,'type_id'=>['<>',6],'apply_status'=>1])->field('id,room_name,room_number,type_id,createtime')->find();
|
||||
if($room_info){
|
||||
if($room_info['id']!=$v['room_id']) {
|
||||
//公会名称
|
||||
$guild_name = db::name('vs_guild')->where('id',$v['guild_id'])->value('guild_name');
|
||||
echo "公会名称:".$guild_name;
|
||||
echo " 公会Id:".$v['guild_id']." 关系Id:".$v['id']."错误房间Id:".$v['room_id']."正确房间Id:".$room_info['id'];
|
||||
echo " 房间:".$room_info['room_name']."--".$room_info['room_number'];
|
||||
echo "\n";
|
||||
echo " 申请加入公会时间:".date('Y-m-d H:i:s',$v['createtime']);
|
||||
echo "\n";
|
||||
echo " 创建房间时间:".date('Y-m-d H:i:s',$room_info['createtime']);
|
||||
echo "\n";
|
||||
echo " 加入公会审核通过:".date('Y-m-d H:i:s',$v['apply_time']);
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "完成";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user