练歌房首页类型列表 修改房间类型

This commit is contained in:
2025-11-03 10:20:04 +08:00
parent df7a9a5d6c
commit 9e81410cee
3 changed files with 8 additions and 33 deletions

View File

@@ -192,10 +192,14 @@ class Room extends Model
if(!empty($label_id) && $label_id > 0){
$map['type_id'] = $label_id;
}
if(!empty($label_id) && $label_id < 0){
if(!empty($label_id) && $label_id == -1){
$map['is_hot'] = 2;
}
if(!empty($label_id) && $label_id == -2){
$map['label_id'] = 2;
}
if($is_top == 2){
$map['is_top'] = $is_top;
}
@@ -1671,7 +1675,7 @@ class Room extends Model
}
$roomInfo = db::name('vs_room')->where(['id' => $room_id])->find();
if($roomInfo['type_id'] == $type){
if($roomInfo['type_id'] == $type && $roomInfo['type_id'] != 1){
return ['code' => 0, 'msg' => '房间类型已存在', 'data' => null];
}