优化代码

main
gzydong 2021-03-27 15:21:07 +08:00
parent 96484b8111
commit f3b4a43b19
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class GroupService extends BaseService
])->get(['group_id', 'not_disturb'])->keyBy('group_id')->toArray();
foreach ($items as $key => $item) {
$items[$key]['not_disturb'] = $arr[$item['id']] ? $arr[$item['id']]['not_disturb'] : 0;
$items[$key]['not_disturb'] = isset($arr[$item['id']]) ? $arr[$item['id']]['not_disturb'] : 0;
}
return $items;