perf: 导出数据支持搜索离职会员

This commit is contained in:
kuaifan
2023-04-10 10:48:45 +08:00
parent 06795ca32c
commit 1cf5a24c26
5 changed files with 22 additions and 5 deletions

View File

@@ -450,7 +450,7 @@ class UsersController extends AbstractController
*
* @apiParam {Object} keys 搜索条件
* - keys.key 昵称、拼音、邮箱关键字
* - keys.disable 0-排除禁止默认1-仅禁止2-含禁止
* - keys.disable 0-排除离职默认1-仅离职2-含离职
* - keys.bot 0-排除机器人默认1-仅机器人2-含机器人
* - keys.project_id 在指定项目ID
* - keys.no_project_id 不在指定项目ID
@@ -527,7 +527,12 @@ class UsersController extends AbstractController
if (in_array($sorts['az'], ['asc', 'desc'])) {
$builder->orderBy('az', $sorts['az']);
} else {
$builder->orderBy('bot');
if (intval($keys['disable']) == 2) {
$builder->orderBy('disable_at');
}
if (intval($keys['bot']) == 2) {
$builder->orderBy('bot');
}
}
//
if (Request::exists('page')) {