Browse Source

封装方法添加飞手租户相关

tags/v2.4.1
xiaoying 1 year ago
parent
commit
0ef562217a
1 changed files with 19 additions and 18 deletions
  1. +19
    -18
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java

+ 19
- 18
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java View File

@@ -128,30 +128,18 @@ public class TenantServiceImpl implements TenantService {
private List<ClientRoleDto> getClientRoleDtos(CreateClientTenantDto createClientTenantDto) {
List<ClientRoleDto> clientRoleDtoList = new ArrayList<>();
//遍历获取参数进项封装
ClientRoleDto clientRoleDto = null;
ClientRoleDto clientRoleDto2 = null;
for (ClientRoleDto dto : createClientTenantDto.getClientRoleDtoList()) {

switch (dto.getClientId()) {
//暂时河湖长,动态匹配其他平台
case HhzUrlConstant.HHZ_CLIENT:
clientRoleDto = new ClientRoleDto();
clientRoleDto2 = new ClientRoleDto();
clientRoleDto.setClientId(HhzUrlConstant.HHZ_CLIENT_MP);
clientRoleDto2.setClientId(HhzUrlConstant.HHZ_CLIENT_ADMIN);
clientRoleDto.setRoleId(dto.getRoleId());
clientRoleDto2.setRoleId(dto.getRoleId());
clientRoleDtoList.add(clientRoleDto);
clientRoleDtoList.add(clientRoleDto2);
addClientRoleDtoList(HhzUrlConstant.HHZ_CLIENT_MP,dto.getRoleId(),clientRoleDtoList);
addClientRoleDtoList(HhzUrlConstant.HHZ_CLIENT_ADMIN,dto.getRoleId(),clientRoleDtoList);
break;
case PilotConstant.PILOT_CLIENT:
addClientRoleDtoList(PilotConstant.PILOT_CLIENT_ADMIN,dto.getRoleId(),clientRoleDtoList);
addClientRoleDtoList(PilotConstant.PILOT_CLIENT_MP,dto.getRoleId(),clientRoleDtoList);
break;
////暂时河湖长,动态匹配其他平台
//case FreeWayConstant.HHZ_CLIENT:
// dto.setClientId(HhzUrlConstant.HHZ_CLIENT_ADMIN);
// clientRoleDtoList.add(dto);
// clientRoleDto.setClientId(HhzUrlConstant.HHZ_CLIENT_MP);
// clientRoleDto.setRoleId(dto.getRoleId());
// clientRoleDtoList.add(clientRoleDto);
// break;
////暂时河湖长,动态匹配其他平台
//case HhzUrlConstant.HHZ_CLIENT:
// dto.setClientId(HhzUrlConstant.HHZ_CLIENT_ADMIN);
@@ -167,6 +155,19 @@ public class TenantServiceImpl implements TenantService {
}
return clientRoleDtoList;
}
/**
* 封装数据到 clientRoleDtoList
* @param clientId
* @param roleId
* @param clientRoleDtoList
*/
private void addClientRoleDtoList(String clientId, Integer roleId, List<ClientRoleDto> clientRoleDtoList) {
ClientRoleDto clientRoleDto = new ClientRoleDto();
clientRoleDto.setClientId(clientId);
clientRoleDto.setRoleId(roleId);
clientRoleDtoList.add(clientRoleDto);
}

/**
* 查询对应租户下的所有用户数据
*

Loading…
Cancel
Save