Merge branch 'council/BackendArchitect'
commit
49930844fa
|
|
@ -68,13 +68,16 @@ class AdminGoodsSaveHandle
|
|||
$templateId = intval($config['template_id'] ?? 0);
|
||||
if ($templateId > 0) {
|
||||
$template = Db::name('vr_seat_templates')->find($templateId);
|
||||
if (empty($template)) {
|
||||
continue;
|
||||
}
|
||||
$seatMap = json_decode($template['seat_map'] ?? '{}', true);
|
||||
$allRooms = $seatMap['rooms'] ?? [];
|
||||
|
||||
// 按 selected_rooms 过滤,只存用户选中的房间
|
||||
$selectedRoomIds = array_column(
|
||||
array_filter($allRooms, function ($r) use ($config) {
|
||||
return in_array($r['id'], $config['selected_rooms'] ?? []);
|
||||
return isset($r['id']) && in_array($r['id'], $config['selected_rooms'] ?? []);
|
||||
}), null
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue