|
|
@@ -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); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询对应租户下的所有用户数据 |
|
|
|
* |