update
This commit is contained in:
parent
2032c3201b
commit
f973de4f6f
|
@ -7,6 +7,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.github.yulichang.query.MPJQueryWrapper;
|
||||||
import com.ydool.common.base.BaseService;
|
import com.ydool.common.base.BaseService;
|
||||||
import com.ydool.common.data.dto.AjaxResult;
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.integrated.entity.Meeting;
|
import com.ydool.integrated.entity.Meeting;
|
||||||
|
@ -243,10 +244,13 @@ public class MeetingService extends BaseService<MeetingMapper, Meeting> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public AjaxResult user() {
|
public AjaxResult user() {
|
||||||
List<User> userList = userService.list(new QueryWrapper<User>()
|
MPJQueryWrapper<User> qw = new MPJQueryWrapper<User>();
|
||||||
|
qw.selectAll(User.class).leftJoin("t_sys_dept dept on dept.id = t.dept")
|
||||||
|
.leftJoin("t_sys_job job on job.id = t.job")
|
||||||
.lambda()
|
.lambda()
|
||||||
.in(User::getUserName, "沈佳峰", "屠勇", "王焕", "朱宗华", "王孟卓")
|
.in(User::getUserName, "沈佳峰", "屠勇", "王焕", "朱宗华", "王孟卓");
|
||||||
);
|
qw.orderByAsc("dept.sort_no","job.sort_no");
|
||||||
|
List<User> userList = userService.list(qw);
|
||||||
return AjaxResult.ok().data(UserWrapper.INSTANCE.toDto(userList));
|
return AjaxResult.ok().data(UserWrapper.INSTANCE.toDto(userList));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,8 @@ public class UserServiceImpl extends BaseService<UserMapper, User> implements IU
|
||||||
public AjaxResult userList(Page page, String value, String column, String orderBy, Boolean status, String role,
|
public AjaxResult userList(Page page, String value, String column, String orderBy, Boolean status, String role,
|
||||||
String dept, String job) {
|
String dept, String job) {
|
||||||
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()
|
||||||
|
@ -177,7 +178,7 @@ public class UserServiceImpl extends BaseService<UserMapper, User> implements IU
|
||||||
qw.orderByAsc("t." + StrUtil.toUnderlineCase(column));
|
qw.orderByAsc("t." + StrUtil.toUnderlineCase(column));
|
||||||
}
|
}
|
||||||
if (StrUtil.isBlank(column)) {
|
if (StrUtil.isBlank(column)) {
|
||||||
qw.orderByAsc("dept.sort_no");
|
qw.orderByAsc("dept.sort_no","job.sort_no");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue