This commit is contained in:
Your Name
2026-08-25 15:05:49 +08:00
parent 381fe65367
commit b5b14516a1
3 changed files with 12 additions and 1 deletions
@@ -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 必须是部门树数组');
}