This commit is contained in:
lijiaqi 2023-02-09 10:53:09 +08:00
parent 42a9a604cd
commit 69c319eaf1
3 changed files with 12 additions and 9 deletions

View File

@ -53,6 +53,7 @@ public class UserController extends BaseController {
@ApiImplicitParam(name = "status", value = "启用状态", dataType = "Boolean"),
@ApiImplicitParam(name = "role", value = "角色"),
@ApiImplicitParam(name = "dept", value = "部门"),
@ApiImplicitParam(name = "dept", value = "岗位"),
})
@ApiOperationSupport(
responses = @DynamicResponseParameters(properties = {
@ -65,9 +66,10 @@ public class UserController extends BaseController {
String orderBy,
Boolean status,
String role,
String dept
String dept,
String job
) {
return userService.userList(getPage(), value, column, orderBy, status, role, dept);
return userService.userList(getPage(), value, column, orderBy, status, role, dept, job);
}
/**

View File

@ -64,7 +64,6 @@ public interface IUserService {
/**
* 用户列表
*
* @param page
* @param value
* @param column
@ -72,10 +71,11 @@ public interface IUserService {
* @param status
* @param role
* @param dept
* @param job
* @return
*/
AjaxResult userList(Page page, String value, String column, String orderBy, Boolean status, String role,
String dept);
String dept,String job);
/**
* 重置密码

View File

@ -145,11 +145,12 @@ public class UserServiceImpl extends BaseService<UserMapper, User> implements IU
* @param status
* @param role
* @param dept
* @param job
* @return
*/
@Override
public AjaxResult userList(Page page, String value, String column, String orderBy, Boolean status, String role,
String dept) {
String dept, String job) {
QueryWrapper<User> qw = new QueryWrapper<User>();
if (StrUtil.isNotBlank(value)) {
qw.like("AES_DECRYPT(from_base64 (phone),'" + CodecUtils.KEY + "')", value).lambda()
@ -160,7 +161,8 @@ public class UserServiceImpl extends BaseService<UserMapper, User> implements IU
qw.lambda().eq(ObjectUtil.isNotNull(status), User::getStatus, status)
.eq(StrUtil.isNotBlank(dept), User::getDept, dept)
.like(StrUtil.isNotBlank(role), User::getRoles, role);
.like(StrUtil.isNotBlank(role), User::getRoles, role)
.eq(StrUtil.isNotBlank(job), User::getJob, job);
if ("desc".equals(orderBy) && StrUtil.isNotBlank(column)) {
qw.orderByDesc(StrUtil.toUnderlineCase(column));
@ -334,7 +336,6 @@ public class UserServiceImpl extends BaseService<UserMapper, User> implements IU
}
return null;
}