diff --git a/src/main/java/com/ydool/system/service/impl/UserServiceImpl.java b/src/main/java/com/ydool/system/service/impl/UserServiceImpl.java index f9d643d..ee3b894 100644 --- a/src/main/java/com/ydool/system/service/impl/UserServiceImpl.java +++ b/src/main/java/com/ydool/system/service/impl/UserServiceImpl.java @@ -435,7 +435,8 @@ public class UserServiceImpl extends BaseService implements IU String value = userVo.getValue(); String job = userVo.getJob(); MPJQueryWrapper qw = new MPJQueryWrapper(); - 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)) { qw.and(query -> query.like("AES_DECRYPT(from_base64 (t.phone),'" + CodecUtils.KEY + "')", value).lambda() @@ -447,7 +448,7 @@ public class UserServiceImpl extends BaseService implements IU qw.lambda() .in(CollUtil.isNotEmpty(userVo.getDeptIds()), User::getDept, userVo.getDeptIds()) .eq(StrUtil.isNotBlank(job), User::getJob, job); - qw.orderByAsc("dept.sort_no"); + qw.orderByAsc("dept.sort_no","job.sort_no"); Page pageList = page(new Page<>(userVo.getCurrent(), userVo.getSize()), qw);