| | |
| | | } |
| | | |
| | | @Override |
| | | public Users usersDetail(Long userId){ |
| | | Users users = usersMapper.selectById(userId); |
| | | public Users usersDetailByIamId(String iamId){ |
| | | Users users = usersMapper.selectOne(new QueryWrapper<Users>().lambda().eq(Users::getIamId,iamId).last("limit 1")); |
| | | if(Objects.isNull(users)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(users.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"用户已禁用"); |
| | | } |
| | | getUsersDetail(users); |
| | | return users; |
| | | } |
| | | |
| | | @Override |
| | | public Users usersDetailById(Long id){ |
| | | Users users = usersMapper.selectById(id); |
| | | if(Objects.isNull(users)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(users.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"用户已禁用"); |
| | | } |
| | | getUsersDetail(users); |
| | | return users; |
| | | } |
| | | |
| | | public void getUsersDetail(Users users){ |
| | | String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) + |
| | | StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode()); |
| | | if(StringUtils.isNotBlank(users.getImgurl())){ |
| | |
| | | } |
| | | } |
| | | } |
| | | return users; |
| | | } |
| | | |
| | | |