From 09b345279501782a1d618824928af5334d2504ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 23 Sep 2025 19:51:00 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=88=91=E5=88=9B=E5=BB=BA=E7=9A=84?= =?UTF-8?q?=E6=88=BF=E9=97=B4=20=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Room.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/api/model/Room.php b/application/api/model/Room.php index d635580..2df3bb3 100644 --- a/application/api/model/Room.php +++ b/application/api/model/Room.php @@ -272,7 +272,7 @@ class Room extends Model $roomInfo = db::name('vs_room') ->field('id as room_id,room_number,user_id,room_name,room_cover,apply_status,type_id,room_status,label_id') ->where('user_id' , $uid) - ->where(['type_id' => ['<>',6],'room_status' =>1,'apply_status' => 2]) + ->where(['type_id' => ['<>',6],'room_status' =>1,'apply_status' => ['<>',3]]) ->page($page, $page_limit) ->select(); } From 6e67b896afaf68004378d23a42cda4fd66f05662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 23 Sep 2025 21:22:25 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=88=BF=E9=97=B4=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Room.php | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/application/api/model/Room.php b/application/api/model/Room.php index 2df3bb3..ff3aaab 100644 --- a/application/api/model/Room.php +++ b/application/api/model/Room.php @@ -1285,6 +1285,15 @@ class Room extends Model if ($label_type['code'] != 1) { return ['code' => 0, 'msg' => '房间不存在', 'data' => null]; } + //查询房间里面的用户 + $room_user = db::name('vs_room_visitor')->where(['room_id' => $room_id])->select(); + if($room_user){ + foreach ($room_user as $vv){ + if(Db::name('user')->where('id', $vv['user_id'])->value('is_online') == 0){ + model('Room')->quit_room($vv['user_id'], $room_id,$vv['user_id'],2); + } + } + } $list = db::name('vs_room_visitor')->alias('a') ->join('user b', 'a.user_id = b.id') @@ -1368,15 +1377,7 @@ class Room extends Model } } - //查询房间里面的用户 - $room_user = db::name('vs_room_visitor')->where(['room_id' => $room_id])->select(); - if($room_user){ - foreach ($room_user as $vv){ - if(Db::name('user')->where('id', $vv['user_id'])->value('is_online') == 0){ - model('Room')->quit_room($vv['user_id'], $room_id,$vv['user_id'],2); - } - } - } + return ['code' => 1, 'msg' => '成功', 'data' => $lists]; } @@ -1707,10 +1708,6 @@ class Room extends Model db::name('vs_room_pit_simulate')->where(['room_id' => $room_id])->delete(); //申请上麦的全部下麦 model('RoomPit')->clear_apply_pit_list($uid, $room_id); - //处理之前修改的用户房间信息 - if($type == 1 || $type == 3 || $type == 4){ - db::name('vs_room_pit')->where(['pit_number' =>['>',10]])->update(['status' => 2]); - } if($type == 1 || $type == 3 || $type == 4 || $type == 7){ //查询拍卖房的状态 From 983a3a2cdcfadcba1407a11533efc07b6c6fe9eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 23 Sep 2025 21:43:11 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=B0=81=E7=A6=81?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=20301?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Login.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/api/model/Login.php b/application/api/model/Login.php index ff108af..abf07a7 100644 --- a/application/api/model/Login.php +++ b/application/api/model/Login.php @@ -107,16 +107,16 @@ class Login extends Model $block = db::name('block')->where(['type_text' => $user_info['id'],'type' => 1])->find(); if ($block) { - return ['code' => 0, 'msg' => '用户已被封禁', 'data' => null]; + return ['code' => 301, 'msg' => '用户已被封禁', 'data' => null]; } $block = db::name('block')->where(['type_text' => $login_device,'type' => 2])->find(); if ($block) { - return ['code' => 0, 'msg' => '设备已被封禁', 'data' => null]; + return ['code' => 301, 'msg' => '设备已被封禁', 'data' => null]; } $ip = request()->ip(); $block = db::name('block')->where(['type_text' => $ip,'type' => 3])->find(); if ($block) { - return ['code' => 0, 'msg' => 'ip已被封禁', 'data' => null]; + return ['code' => 301, 'msg' => 'ip已被封禁', 'data' => null]; } $save_data = []; From 0bf849d1c424b7d3aba1b0b1f105b52c77c2cf02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 23 Sep 2025 22:01:37 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=8B=8D=E5=8D=96=E6=88=BF=E5=88=87?= =?UTF-8?q?=E6=8D=A2=20=E4=B8=8B=E6=8B=8D=E5=8D=96=E4=BD=8D=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E9=80=89=E5=85=B3=E7=B3=BB=E7=9A=84=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Room.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/application/api/model/Room.php b/application/api/model/Room.php index ff3aaab..31e7814 100644 --- a/application/api/model/Room.php +++ b/application/api/model/Room.php @@ -1709,13 +1709,19 @@ class Room extends Model //申请上麦的全部下麦 model('RoomPit')->clear_apply_pit_list($uid, $room_id); - if($type == 1 || $type == 3 || $type == 4 || $type == 7){ + if($type == 1 || $type == 3 || $type == 4 || $type == 7 || $type == 8){ //查询拍卖房的状态 $room_auction = db::name('vs_room_auction')->where(['room_id' => $room_id,'status' => 2])->select(); if($room_auction){ foreach ($room_auction as $v){ model('RoomAuction')->room_auction_end($room_id,$v['auction_id']); } + //拍卖位上是否有人 + $an = Cache::get('auction_user_'.$room_id); + if($an){ + //拍卖位下麦 + model('api/RoomPit')->host_user_pit($uid,$room_id,888,$an,2); + } } } if($type == 2){ From 1f267f76360298f30e11470b7b718eeb9ca76471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 23 Sep 2025 22:43:52 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=B0=81=E7=A6=81?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Login.php | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/application/api/model/Login.php b/application/api/model/Login.php index abf07a7..8660d8f 100644 --- a/application/api/model/Login.php +++ b/application/api/model/Login.php @@ -107,16 +107,37 @@ class Login extends Model $block = db::name('block')->where(['type_text' => $user_info['id'],'type' => 1])->find(); if ($block) { - return ['code' => 301, 'msg' => '用户已被封禁', 'data' => null]; + if($block['block_time'] != 0 && $block['block_time'] <= time()){ + db('block')->where(['id' => $block['id']])->delete(); + } + if($block['block_time'] == 0){ + return ['code' => 301, 'msg' => '用户已被永久封禁', 'data' => null]; + }else{ + return ['code' => 301, 'msg' => '用户已被封禁,解封时间:'.date('Y-m-d H:i:s',$block['block_time']), 'data' => null]; + } } $block = db::name('block')->where(['type_text' => $login_device,'type' => 2])->find(); if ($block) { - return ['code' => 301, 'msg' => '设备已被封禁', 'data' => null]; + if($block['block_time'] != 0 && $block['block_time'] <= time()){ + db('block')->where(['id' => $block['id']])->delete(); + } + if($block['block_time'] == 0){ + return ['code' => 301, 'msg' => '设备已被永久封禁', 'data' => null]; + }else{ + return ['code' => 301, 'msg' => '设备已被封禁,解封时间:'.date('Y-m-d H:i:s',$block['block_time']), 'data' => null]; + } } $ip = request()->ip(); $block = db::name('block')->where(['type_text' => $ip,'type' => 3])->find(); if ($block) { - return ['code' => 301, 'msg' => 'ip已被封禁', 'data' => null]; + if($block['block_time'] != 0 && $block['block_time'] <= time()){ + db('block')->where(['id' => $block['id']])->delete(); + } + if($block['block_time'] == 0){ + return ['code' => 301, 'msg' => 'ip已被永久封禁', 'data' => null]; + }else{ + return ['code' => 301, 'msg' => 'ip已被封禁,解封时间:'.date('Y-m-d H:i:s',$block['block_time']), 'data' => null]; + } } $save_data = []; @@ -269,9 +290,6 @@ class Login extends Model if (empty($user_info)) { return ['code' => 0, 'msg' => '用户不存在', 'data' => null]; } - if ($user_info['status'] != 1) { - return ['code' => 301, 'msg' => '用户被禁用,请联系管理员', 'data' => null]; - } if (md5($password) != $user_info['password']) { return ['code' => 0, 'msg' => '密码错误', 'data' => null]; From fa3c0f648ce9f195b154975b996a4ec9d516cf97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 23 Sep 2025 22:49:37 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=B0=81=E7=A6=81?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Login.php | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/application/api/model/Login.php b/application/api/model/Login.php index 8660d8f..019b0b2 100644 --- a/application/api/model/Login.php +++ b/application/api/model/Login.php @@ -109,22 +109,24 @@ class Login extends Model if ($block) { if($block['block_time'] != 0 && $block['block_time'] <= time()){ db('block')->where(['id' => $block['id']])->delete(); - } - if($block['block_time'] == 0){ - return ['code' => 301, 'msg' => '用户已被永久封禁', 'data' => null]; }else{ - return ['code' => 301, 'msg' => '用户已被封禁,解封时间:'.date('Y-m-d H:i:s',$block['block_time']), 'data' => null]; + if($block['block_time'] == 0){ + return ['code' => 301, 'msg' => '用户已被永久封禁', 'data' => null]; + }else{ + return ['code' => 301, 'msg' => '用户已被封禁,解封时间:'.date('Y-m-d H:i:s',$block['block_time']), 'data' => null]; + } } } $block = db::name('block')->where(['type_text' => $login_device,'type' => 2])->find(); if ($block) { if($block['block_time'] != 0 && $block['block_time'] <= time()){ db('block')->where(['id' => $block['id']])->delete(); - } - if($block['block_time'] == 0){ - return ['code' => 301, 'msg' => '设备已被永久封禁', 'data' => null]; }else{ - return ['code' => 301, 'msg' => '设备已被封禁,解封时间:'.date('Y-m-d H:i:s',$block['block_time']), 'data' => null]; + if($block['block_time'] == 0){ + return ['code' => 301, 'msg' => '设备已被永久封禁', 'data' => null]; + }else{ + return ['code' => 301, 'msg' => '设备已被封禁,解封时间:'.date('Y-m-d H:i:s',$block['block_time']), 'data' => null]; + } } } $ip = request()->ip(); @@ -132,11 +134,12 @@ class Login extends Model if ($block) { if($block['block_time'] != 0 && $block['block_time'] <= time()){ db('block')->where(['id' => $block['id']])->delete(); - } - if($block['block_time'] == 0){ - return ['code' => 301, 'msg' => 'ip已被永久封禁', 'data' => null]; }else{ - return ['code' => 301, 'msg' => 'ip已被封禁,解封时间:'.date('Y-m-d H:i:s',$block['block_time']), 'data' => null]; + if($block['block_time'] == 0){ + return ['code' => 301, 'msg' => 'ip已被永久封禁', 'data' => null]; + }else{ + return ['code' => 301, 'msg' => 'ip已被封禁,解封时间:'.date('Y-m-d H:i:s',$block['block_time']), 'data' => null]; + } } } From f19efd80ead61b4127adb5ae8e16fac57b81ac74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Tue, 23 Sep 2025 23:03:42 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E7=AD=89=E7=BA=A7=E4=BF=AE=E6=94=B9bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E8=B7=9F=E6=96=B0=E7=AD=89=E7=BA=A7?= =?UTF-8?q?=E5=8F=96=E5=80=BC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Level.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/api/model/Level.php b/application/api/model/Level.php index 2dd172b..01e604a 100644 --- a/application/api/model/Level.php +++ b/application/api/model/Level.php @@ -292,7 +292,7 @@ class Level extends Model $user_wealth_exp = $user['wealth_exp'] + $wealth_exp; //判断是否达到下一级别 $user_wealth = $this->get_wealth_level_to_level($user_wealth_level); - if($user_wealth_exp>= $user_wealth['exp']){ + if($user_wealth_exp>= $user_wealth['next_level_exp']){ $user_wealth_level= $user_wealth['next_level']; } $update_data = []; @@ -302,7 +302,7 @@ class Level extends Model $return = db('user_data')->where('user_id',$uid)->update($update_data); if($return){ //发放特权礼物 - if($user_wealth_exp>= $user_wealth['exp']){ + if($user_wealth_exp>= $user_wealth['next_level_exp']){ $wealth_level_rights = db('vs_wealth_level_rights')->where('level_id',$user_wealth_level)->find(); if(isset($wealth_level_rights['type']) && $wealth_level_rights['type'] ==1 ){//发座驾礼物 $log_remark = "财富等级达到".$user_wealth_level."级 发放座驾礼物"; @@ -322,7 +322,7 @@ class Level extends Model $user_charm_exp = $user['charm_exp'] + $charm_exp; //判断是否达到下一级别 $user_charm = $this->get_charm_level_to_level($user_charm_level); - if($user_charm_exp>= $user_charm['exp']){ + if($user_charm_exp>= $user_charm['next_level_exp']){ $user_charm_level= $user_charm['next_level']; } $update_data = []; From 8efa22b51744097580d268ad7ddc20a037cfa707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 23 Sep 2025 23:28:28 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=8D=A2=E6=88=BF=E9=97=B4=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=20=E6=8B=8D=E5=8D=96=E4=BD=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Room.php | 12 ++++++------ application/api/model/RoomPit.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/application/api/model/Room.php b/application/api/model/Room.php index 31e7814..5dc301c 100644 --- a/application/api/model/Room.php +++ b/application/api/model/Room.php @@ -1716,12 +1716,12 @@ class Room extends Model foreach ($room_auction as $v){ model('RoomAuction')->room_auction_end($room_id,$v['auction_id']); } - //拍卖位上是否有人 - $an = Cache::get('auction_user_'.$room_id); - if($an){ - //拍卖位下麦 - model('api/RoomPit')->host_user_pit($uid,$room_id,888,$an,2); - } + } + //拍卖位上是否有人 + $an = Cache::get('auction_user_'.$room_id); + if($an){ + //拍卖位下麦 + model('api/RoomPit')->host_user_pit($uid,$room_id,888,$an,2); } } if($type == 2){ diff --git a/application/api/model/RoomPit.php b/application/api/model/RoomPit.php index 4f72e09..9116893 100644 --- a/application/api/model/RoomPit.php +++ b/application/api/model/RoomPit.php @@ -925,7 +925,7 @@ class RoomPit extends Model if(!$pit_number || $pit_number == 888){ $roomInfo = db::name('vs_room')->where('id',$room_id)->field('label_id,type_id')->find(); - if($roomInfo['type_id'] == 2){//拍卖 + if($roomInfo['type_id'] == 2 || Cache::get('auction_user_'.$room_id)){//拍卖 //查询当前是否处于拍卖中 $auctioning = db::name('vs_room_auction') ->where(['room_id' => $room_id, 'status' => 2, 'user_id' => $accept_user_id])->find();