This commit is contained in:
Your Name
2026-04-07 18:13:03 +08:00
parent a780356908
commit fdf714f833
397 changed files with 15086 additions and 1043 deletions
+18 -2
View File
@@ -112,12 +112,28 @@ class AdminLists extends BaseAdminDataLists implements ListsExtendInterface, Lis
public function queryWhere()
{
$where = [];
if (isset($this->params['role_id']) && $this->params['role_id'] != '') {
$adminIds = AdminRole::where('role_id', $this->params['role_id'])->column('admin_id');
$progressBoard = (int) ($this->params['progress_board'] ?? 0) === 1;
if ($progressBoard) {
// 面诊进度:固定只拉「医生」角色且未禁用,忽略客户端篡改的 role_id
$adminIds = AdminRole::where('role_id', 1)->column('admin_id');
if (!empty($adminIds)) {
$where[] = ['id', 'in', $adminIds];
}
$where[] = ['disable', '=', 0];
} else {
if (isset($this->params['role_id']) && $this->params['role_id'] != '') {
$adminIds = AdminRole::where('role_id', $this->params['role_id'])->column('admin_id');
if (!empty($adminIds)) {
$where[] = ['id', 'in', $adminIds];
}
}
// 排除禁止登录(disable=1),医生选择器等场景
if ((int) ($this->params['exclude_disabled'] ?? 0) === 1) {
$where[] = ['disable', '=', 0];
}
}
return $where;
}