src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -132,6 +132,20 @@ /** * 自定义用户列表, */ @GetMapping("/pages") @ApiImplicitParams({ @ApiImplicitParam(name = "account", value = "账号名", paramType = "query", dataType = "string"), @ApiImplicitParam(name = "realName", value = "姓名", paramType = "query", dataType = "string") }) public R<IPage<UserVO>> pages(@ApiIgnore User user, Query query) { IPage<User> pages = userService.selectUserPages(Condition.getPage(query), user); return R.data(UserWrapper.build().pageVO(pages)); } /** * 自定义用户列表(只有保安员) */ @GetMapping("/page-security") src/main/java/org/springblade/modules/system/mapper/UserMapper.java
@@ -84,4 +84,12 @@ * @return */ List<User> getNotAuditAllUserList(); /** * 自定义列表,... * @param page * @param user * @return */ List<User> selectUserPages(IPage<User> page,@Param("user") User user); } src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -143,6 +143,40 @@ ORDER BY id </select> <select id="selectUserPages" resultMap="userResultMap"> select * from blade_user where is_deleted = 0 <if test="user.realName!=null and user.realName != ''"> and real_name like concat(concat('%', #{user.realName}),'%') </if> <if test="user.deptId!=null and user.deptId != ''"> and dept_id like concat(concat('%', #{user.deptId}),'%') </if> <if test="user.userType!=null and user.userType != ''"> and user_type = #{user.userType} </if> <if test="user.nativeplace!=null and user.nativeplace != ''"> and nativeplace = #{user.nativeplace} </if> <if test="user.examinationType!=null and user.examinationType != ''"> and examination_type = #{user.examinationType} </if> <if test="user.sex!=null and user.sex != ''"> and sex = #{user.sex} </if> <if test="user.status!=null and user.status != ''"> and status = #{user.status} </if> <if test="user.hold!=null and user.hold != ''"> and hold = #{user.hold} </if> <if test="user.jurisdiction!=null and user.jurisdiction != ''"> and jurisdiction = #{user.jurisdiction} </if> <if test="user.securitynumber!=null and user.securitynumber != ''"> and securitynumber = #{user.securitynumber} </if> ORDER BY id </select> <!--保安员列表--> <select id="selectUserPageSecurity" resultMap="userResultMaps"> src/main/java/org/springblade/modules/system/service/IUserService.java
@@ -224,4 +224,12 @@ * @return */ List<User> getNotAuditAllUserList(); /** * 自定义列表,... * @param page * @param user * @return */ IPage<User> selectUserPages(IPage<User> page, User user); } src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -453,4 +453,15 @@ public List<User> getNotAuditAllUserList() { return baseMapper.getNotAuditAllUserList(); } /** * 自定义列表,... * @param page * @param user * @return */ @Override public IPage<User> selectUserPages(IPage<User> page, User user) { return page.setRecords(baseMapper.selectUserPages(page, user)); } }