|
|
|
@ -49,25 +49,24 @@ public class UserAccountController {
|
|
|
|
|
static class ListUAParam {
|
|
|
|
|
private int pageNum;
|
|
|
|
|
private int pageSize;
|
|
|
|
|
@Schema(title = "userId")
|
|
|
|
|
private Integer userId;
|
|
|
|
|
@Schema(title = "账号状态")
|
|
|
|
|
@Schema(title = "用户名")
|
|
|
|
|
private String name;
|
|
|
|
|
@Schema(title = "账号状态",description = "0审核中;1审核通过;2审核拒绝;3已停用")
|
|
|
|
|
private Integer status;
|
|
|
|
|
@Schema(title = "部门id")
|
|
|
|
|
private Integer departmentId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "关联账号列表")
|
|
|
|
|
@PostMapping("/list")
|
|
|
|
|
@adminTokenValid
|
|
|
|
|
public Result list(@Validated @RequestBody ListUAParam param) {
|
|
|
|
|
QueryWrapper<UserAccount> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
if(param.getStatus() != null){
|
|
|
|
|
queryWrapper.eq("t1.status", param.getStatus());
|
|
|
|
|
}
|
|
|
|
|
if(param.getUserId() != null){
|
|
|
|
|
queryWrapper.eq("t1.userId", param.getUserId());
|
|
|
|
|
}
|
|
|
|
|
queryWrapper.orderByDesc("updateAt","creatAt");
|
|
|
|
|
return Result.success(userAccountService.listAll(MybatisPlusUtil.SetNumPage(param.getPageNum(), param.getPageSize()),queryWrapper));
|
|
|
|
|
QueryWrapper<UserAccount> qw = new QueryWrapper<>();
|
|
|
|
|
qw.eq(param.getStatus() != null,"t1.status", param.getStatus());
|
|
|
|
|
qw.eq(param.getName() != null,"t2.name", param.getName());
|
|
|
|
|
qw.eq(param.getDepartmentId() != null,"t3.departmentId", param.getDepartmentId());
|
|
|
|
|
qw.orderByDesc("updateAt","creatAt");
|
|
|
|
|
return Result.success(userAccountService.listAll(MybatisPlusUtil.SetNumPage(param.getPageNum(), param.getPageSize()),qw));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Data
|
|
|
|
|