This commit is contained in:
parent
42a9a604cd
commit
69c319eaf1
|
@ -53,6 +53,7 @@ public class UserController extends BaseController {
|
||||||
@ApiImplicitParam(name = "status", value = "启用状态", dataType = "Boolean"),
|
@ApiImplicitParam(name = "status", value = "启用状态", dataType = "Boolean"),
|
||||||
@ApiImplicitParam(name = "role", value = "角色"),
|
@ApiImplicitParam(name = "role", value = "角色"),
|
||||||
@ApiImplicitParam(name = "dept", value = "部门"),
|
@ApiImplicitParam(name = "dept", value = "部门"),
|
||||||
|
@ApiImplicitParam(name = "dept", value = "岗位"),
|
||||||
})
|
})
|
||||||
@ApiOperationSupport(
|
@ApiOperationSupport(
|
||||||
responses = @DynamicResponseParameters(properties = {
|
responses = @DynamicResponseParameters(properties = {
|
||||||
|
@ -65,9 +66,10 @@ public class UserController extends BaseController {
|
||||||
String orderBy,
|
String orderBy,
|
||||||
Boolean status,
|
Boolean status,
|
||||||
String role,
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -64,7 +64,6 @@ public interface IUserService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户列表
|
* 用户列表
|
||||||
*
|
|
||||||
* @param page
|
* @param page
|
||||||
* @param value
|
* @param value
|
||||||
* @param column
|
* @param column
|
||||||
|
@ -72,10 +71,11 @@ public interface IUserService {
|
||||||
* @param status
|
* @param status
|
||||||
* @param role
|
* @param role
|
||||||
* @param dept
|
* @param dept
|
||||||
|
* @param job
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult userList(Page page, String value, String column, String orderBy, Boolean status, String role,
|
AjaxResult userList(Page page, String value, String column, String orderBy, Boolean status, String role,
|
||||||
String dept);
|
String dept,String job);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置密码
|
* 重置密码
|
||||||
|
|
|
@ -145,11 +145,12 @@ public class UserServiceImpl extends BaseService<UserMapper, User> implements IU
|
||||||
* @param status
|
* @param status
|
||||||
* @param role
|
* @param role
|
||||||
* @param dept
|
* @param dept
|
||||||
|
* @param job
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
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 dept, String job) {
|
||||||
QueryWrapper<User> qw = new QueryWrapper<User>();
|
QueryWrapper<User> qw = new QueryWrapper<User>();
|
||||||
if (StrUtil.isNotBlank(value)) {
|
if (StrUtil.isNotBlank(value)) {
|
||||||
qw.like("AES_DECRYPT(from_base64 (phone),'" + CodecUtils.KEY + "')", value).lambda()
|
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)
|
qw.lambda().eq(ObjectUtil.isNotNull(status), User::getStatus, status)
|
||||||
.eq(StrUtil.isNotBlank(dept), User::getDept, dept)
|
.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)) {
|
if ("desc".equals(orderBy) && StrUtil.isNotBlank(column)) {
|
||||||
qw.orderByDesc(StrUtil.toUnderlineCase(column));
|
qw.orderByDesc(StrUtil.toUnderlineCase(column));
|
||||||
|
@ -334,7 +336,6 @@ public class UserServiceImpl extends BaseService<UserMapper, User> implements IU
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue