| | |
| | | @GetMapping("/page-security") |
| | | public R<IPage<UserVO>> pageSecurity(@ApiIgnore User user, Query query, Long deptId, BladeUser bladeUser) { |
| | | user.setAccount("admin"); |
| | | bladeUser.setTenantId("000000"); |
| | | IPage<User> pages = userService.selectUserPageSecurity(Condition.getPage(query), user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId())); |
| | | return R.data(UserWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 自定义用户列表(只有保安员) |
| | | */ |
| | | @GetMapping("/page-security-unit") |
| | | public List<User> pageSecurityUnit(@ApiIgnore User user, Query query, Long deptId, BladeUser bladeUser) { |
| | | user.setAccount("admin"); |
| | | bladeUser.setTenantId("000000"); |
| | | List<User> pages = userService.selectUserPageSecurityUnit(Condition.getPage(query), user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId())); |
| | | return pages; |
| | | } |
| | | |
| | | } |
| | |
| | | <if test="user.nativeplace!=null and user.nativeplace != ''"> |
| | | and bu.nativeplace = #{user.nativeplace} |
| | | </if> |
| | | <if test="user.deptId!=null and user.deptId != ''"> |
| | | and bu.dept_id = #{user.deptId} |
| | | </if> |
| | | <if test="user.sex!=null and user.sex != ''"> |
| | | and bu.sex = #{user.sex} |
| | | </if> |
| | |
| | | <if test="user.hold!=null and user.hold != ''"> |
| | | and bu.hold = #{user.hold} |
| | | </if> <if test="user.jurisdiction!=null and user.jurisdiction != ''"> |
| | | and bu.jurisdiction = #{user.jurisdiction} |
| | | </if> |
| | | and bu.jurisdiction = #{user.jurisdiction} |
| | | </if> |
| | | <if test="user.securitynumber!=null and user.securitynumber != ''"> |
| | | and bu.securitynumber = #{user.securitynumber} |
| | | </if> |
| | | <if test="deptIdList!=null and deptIdList.size>0"> |
| | | and id in ( |
| | | and bu.id in ( |
| | | SELECT |
| | | user_id |
| | | FROM |
| | |
| | | * 自定义用户列表(只有保安员) |
| | | */ |
| | | IPage<User> selectUserPageSecurity(IPage<User> page, User user, Long deptId, String s); |
| | | |
| | | /** |
| | | * 自定义用户列表(只有保安员),根据保安员查 |
| | | */ |
| | | List<User> selectUserPageSecurityUnit(IPage<User> page, User user, Long deptId, String s); |
| | | } |
| | |
| | | return page.setRecords(baseMapper.selectUserPageSecurity(page, user, deptIdList, tenantId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 自定义用户列表(只有保安员),根据保安员查 |
| | | */ |
| | | @Override |
| | | public List<User> selectUserPageSecurityUnit(IPage<User> page, User user, Long deptId, String tenantId) { |
| | | List<Long> deptIdList = SysCache.getDeptChildIds(deptId); |
| | | return baseMapper.selectUserPageSecurity(page, user, deptIdList, tenantId); |
| | | } |
| | | } |