use of com.paascloud.provider.model.dto.group.GroupBindUserDto in project paascloud-master by paascloud.
the class UacGroupServiceImpl method getGroupBindUserDto.
@Override
@Transactional(readOnly = true, rollbackFor = Exception.class)
public GroupBindUserDto getGroupBindUserDto(Long groupId, Long currentUserId) {
GroupBindUserDto groupBindUserDto = new GroupBindUserDto();
Set<Long> alreadyBindUserIdSet = Sets.newHashSet();
UacGroup uacGroup = uacGroupMapper.selectByPrimaryKey(groupId);
if (PublicUtil.isEmpty(uacGroup)) {
logger.error("找不到uacGroup={}, 的组织", uacGroup);
throw new UacBizException(ErrorCodeEnum.UAC10015001, groupId);
}
// 查询所有用户包括已禁用的用户
List<BindUserDto> bindUserDtoList = uacRoleMapper.selectAllNeedBindUser(GlobalConstant.Sys.SUPER_MANAGER_ROLE_ID, currentUserId);
// 该组织已经绑定的用户
List<UacGroupUser> setAlreadyBindUserSet = uacGroupUserMapper.listByGroupId(groupId);
Set<BindUserDto> allUserSet = new HashSet<>(bindUserDtoList);
for (UacGroupUser uacGroupUser : setAlreadyBindUserSet) {
alreadyBindUserIdSet.add(uacGroupUser.getUserId());
}
groupBindUserDto.setAllUserSet(allUserSet);
groupBindUserDto.setAlreadyBindUserIdSet(alreadyBindUserIdSet);
return groupBindUserDto;
}
use of com.paascloud.provider.model.dto.group.GroupBindUserDto in project paascloud-master by paascloud.
the class UacGroupBindUserController method getGroupBindUserPageInfo.
/**
* 组织绑定用户页面数据
*
* @param groupId the group id
*
* @return the group bind user page info
*/
@PostMapping(value = "/getBindUser/{groupId}")
@ApiOperation(httpMethod = "POST", value = "获取组织绑定用户页面数据")
public Wrapper<GroupBindUserDto> getGroupBindUserPageInfo(@ApiParam(name = "groupId", value = "组织id") @PathVariable Long groupId) {
logger.info("查询组织绑定用户页面数据 groupId={}", groupId);
LoginAuthDto loginAuthDto = super.getLoginAuthDto();
Long currentUserId = loginAuthDto.getUserId();
GroupBindUserDto bindUserDto = uacGroupService.getGroupBindUserDto(groupId, currentUserId);
return WrapMapper.ok(bindUserDto);
}
Aggregations