修改 房间类型

This commit is contained in:
2025-12-03 12:50:50 +08:00
parent 4ed322e636
commit 1d2cb34dd0

View File

@@ -1933,7 +1933,7 @@ class Room extends Model
//开启事务 //开启事务
db::startTrans(); db::startTrans();
$data = []; $data = [];
if($type == 1 || $type == 3 || $type == 4 || $type == 8 || $type == 9 || $type == 10){ if($type == 1 || $type == 3 || $type == 4 || $type == 8 || $type == 9){
$data = [ $data = [
'label_id' => 1, 'label_id' => 1,
'type_id' => $type, 'type_id' => $type,
@@ -1957,6 +1957,14 @@ class Room extends Model
'room_up_pit_type' => 1, 'room_up_pit_type' => 1,
]; ];
} }
if($type == 10){
$data = [
'label_id' => 7,
'type_id' => $type,
'room_up_pit_type' => 1,
];
}
$res = db::name('vs_room')->where(['id' => $room_id])->update($data); $res = db::name('vs_room')->where(['id' => $room_id])->update($data);
if(!$res){ if(!$res){