This commit is contained in:
lijiaqi 2024-05-16 16:36:35 +08:00
parent d22088130d
commit 2032c3201b
1 changed files with 3 additions and 2 deletions

View File

@ -435,7 +435,8 @@ public class UserServiceImpl extends BaseService<UserMapper, User> implements IU
String value = userVo.getValue(); String value = userVo.getValue();
String job = userVo.getJob(); String job = userVo.getJob();
MPJQueryWrapper<User> qw = new MPJQueryWrapper<User>(); MPJQueryWrapper<User> qw = new MPJQueryWrapper<User>();
qw.selectAll(User.class).leftJoin("t_sys_dept dept on dept.id = t.dept"); qw.selectAll(User.class).leftJoin("t_sys_dept dept on dept.id = t.dept")
.leftJoin("t_sys_job job on job.id = t.job");
if (StrUtil.isNotBlank(value)) { if (StrUtil.isNotBlank(value)) {
qw.and(query -> qw.and(query ->
query.like("AES_DECRYPT(from_base64 (t.phone),'" + CodecUtils.KEY + "')", value).lambda() query.like("AES_DECRYPT(from_base64 (t.phone),'" + CodecUtils.KEY + "')", value).lambda()
@ -447,7 +448,7 @@ public class UserServiceImpl extends BaseService<UserMapper, User> implements IU
qw.lambda() qw.lambda()
.in(CollUtil.isNotEmpty(userVo.getDeptIds()), User::getDept, userVo.getDeptIds()) .in(CollUtil.isNotEmpty(userVo.getDeptIds()), User::getDept, userVo.getDeptIds())
.eq(StrUtil.isNotBlank(job), User::getJob, job); .eq(StrUtil.isNotBlank(job), User::getJob, job);
qw.orderByAsc("dept.sort_no"); qw.orderByAsc("dept.sort_no","job.sort_no");
Page<User> pageList = page(new Page<>(userVo.getCurrent(), userVo.getSize()), qw); Page<User> pageList = page(new Page<>(userVo.getCurrent(), userVo.getSize()), qw);