更新
This commit is contained in:
@@ -32,6 +32,13 @@ foreach ($overview['member_options'] as $member) {
|
||||
throw new RuntimeException('member_options 缺少树形下拉展示部门');
|
||||
}
|
||||
}
|
||||
$memberIds = array_values(array_unique(array_map('intval', array_column($overview['member_options'], 'id'))));
|
||||
if ($memberIds !== []) {
|
||||
$disabledMemberCount = (int) Db::name('admin')->whereIn('id', $memberIds)->where('disable', '<>', 0)->count();
|
||||
if ($disabledMemberCount > 0) {
|
||||
throw new RuntimeException('member_options 返回了已禁用的成员');
|
||||
}
|
||||
}
|
||||
if (!is_array($overview['department_options'])) {
|
||||
throw new RuntimeException('department_options 必须是部门树数组');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user