| | |
| | | } |
| | | |
| | | /** |
| | | * 用户数据导出 |
| | | */ |
| | | @GetMapping("/getAllUser") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "account", value = "账号名", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "realName", value = "姓名", paramType = "query", dataType = "string") |
| | | }) |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "列表", notes = "传入account和realName") |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<List<UserVO>> getAllUser(@ApiIgnore UserVO user, Long deptId, BladeUser bladeUser) { |
| | | List<UserVO> list = userService.getAllUser(user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId())); |
| | | return R.data(UserVOWrapper.build().listVO(list)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | */ |
| | | List<UserVO> selectUserPage(IPage<UserVO> page, @Param("user") UserVO user, @Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId); |
| | | |
| | | List<UserVO> getAllUser(@Param("user")UserVO user,@Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId); |
| | | |
| | | |
| | | /** |
| | | * 获取用户 |
| | | * |
| | |
| | | List<User> selectUserByPhoneOrAccount(@Param("tenantId")String tenantId, @Param("key")String key); |
| | | |
| | | List<User> getUserByPhoneIds(@Param("phoneIds") String phoneIds); |
| | | |
| | | } |
| | |
| | | ORDER BY bu.id |
| | | </select> |
| | | |
| | | <select id="getAllUser" resultType="cn.gistack.system.user.vo.UserVO"> |
| | | select bu.*,armp.jobName from blade_user bu |
| | | left join ( |
| | | select "user_phone" as userPhone,CONCAT_WS('-',"user_unit","position") jobName from SJZT_MD."att_res_manage_person" where "guid" in ( |
| | | select max("guid") as guid from SJZT_MD."att_res_manage_person" group by "user_phone" |
| | | ) |
| | | ) armp on bu.phone = armp.userPhone |
| | | where bu.is_deleted = 0 |
| | | <if test="tenantId!=null and tenantId != ''"> |
| | | and bu.tenant_id = #{tenantId} |
| | | </if> |
| | | <if test="user.tenantId!=null and user.tenantId != ''"> |
| | | and bu.tenant_id = #{user.tenantId} |
| | | </if> |
| | | <if test="user.account!=null and user.account != ''"> |
| | | and bu.account = #{user.account} |
| | | </if> |
| | | <if test="user.realName!=null and user.realName != ''"> |
| | | and bu.real_name like concat(concat('%',#{user.realName}),'%') |
| | | </if> |
| | | <if test="user.userType!=null and user.userType != ''"> |
| | | and bu.user_type = #{user.userType} |
| | | </if> |
| | | <if test="user.roleId!=null and user.roleId != ''"> |
| | | and bu.role_id like concat('%',#{user.roleId},'%') |
| | | </if> |
| | | <if test="deptIdList!=null and deptIdList.size()>0"> |
| | | and id in ( |
| | | SELECT |
| | | user_id |
| | | FROM |
| | | blade_user_dept |
| | | WHERE |
| | | dept_id IN |
| | | <foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | </if> |
| | | ORDER BY bu.id |
| | | </select> |
| | | |
| | | <select id="getUser" resultMap="userResultMap"> |
| | | SELECT |
| | | * |
| | |
| | | WHERE IS_DELETED = 0 AND PHONE LIKE CONCAT('%',#{phoneIds},'%') |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | */ |
| | | IPage<UserVO> selectUserPage(IPage<UserVO> page, UserVO user, Long deptId, String tenantId); |
| | | |
| | | List<UserVO> getAllUser(UserVO user, Long deptId, String tenantId); |
| | | |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | |
| | | List<User> userInfoByPhoneOrAccount(String tenantId, String key); |
| | | |
| | | List<User> getUserByPhoneIds(String phoneIds); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<UserVO> getAllUser(UserVO user, Long deptId, String tenantId) { |
| | | List<Long> deptIdList = new ArrayList<>(); |
| | | if (null!=user.getIsDept()) { |
| | | deptIdList.add(deptId); |
| | | }else { |
| | | deptIdList = SysCache.getDeptChildIds(deptId); |
| | | } |
| | | return baseMapper.getAllUser(user, deptIdList, tenantId); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<UserVO> selectUserSearch(UserVO user, Query query) { |
| | | LambdaQueryWrapper<User> queryWrapper = Wrappers.<User>query().lambda(); |
| | | String tenantId = AuthUtil.getTenantId(); |