fix: 修复department_id字段错误

This commit is contained in:
Ying
2023-07-04 18:41:34 +08:00
parent 8f8555255c
commit 78160b8058

View File

@@ -48,7 +48,7 @@ class AdminService
} }
if (!empty($params['dep'])) { if (!empty($params['dep'])) {
$where[] = ['branch_id', 'find in set', $params['dep']]; $where[] = ['department_id', 'find in set', $params['dep']];
} }
if (!empty($params['group_id'])) { if (!empty($params['group_id'])) {
@@ -58,7 +58,7 @@ class AdminService
$model = new Admin(); $model = new Admin();
$count = $model->where($where)->count(); $count = $model->where($where)->count();
$page = ($count <= $limit) ? 1 : $page; $page = ($count <= $limit) ? 1 : $page;
$adminList = $model->where($where)->order("id asc")->withoutField('pwd')->limit($limit)->page($page)->select()->toArray(); $adminList = $model->where($where)->order("id asc")->withoutField('pwd')->limit((int)$limit)->page((int)$page)->select()->toArray();
$authService = AuthService::instance(); $authService = AuthService::instance();
foreach ($adminList as $key => $value) { foreach ($adminList as $key => $value) {