练歌房首页类型列表 修改房间类型
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user