|
|
@@ -12,7 +12,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.tuoheng.common.CommonConfig; |
|
|
|
import com.tuoheng.common.ServiceException; |
|
|
|
import com.tuoheng.common.ServiceExceptionEnum; |
|
|
|
import com.tuoheng.constant.*; |
|
|
|
import com.tuoheng.constant.CommonConstant; |
|
|
|
import com.tuoheng.constant.DictConstant; |
|
|
|
import com.tuoheng.enums.MarkTypeEnum; |
|
|
|
import com.tuoheng.mapper.*; |
|
|
|
import com.tuoheng.model.dto.LoginUser; |
|
|
@@ -36,7 +37,6 @@ import com.tuoheng.model.vo.UserVo; |
|
|
|
import com.tuoheng.service.TenantService; |
|
|
|
import com.tuoheng.until.JsonResult; |
|
|
|
import com.tuoheng.until.MapUtils; |
|
|
|
import jdk.nashorn.internal.ir.annotations.Ignore; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@@ -48,10 +48,7 @@ import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Optional; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
@@ -419,6 +416,8 @@ public class TenantServiceImpl implements TenantService { |
|
|
|
} |
|
|
|
CreateClientTenantDto dto = new CreateClientTenantDto(); |
|
|
|
dto.setId(query.getId()); |
|
|
|
//默认是否包含机场为false |
|
|
|
Boolean isAirport = false; |
|
|
|
//查询出租户的相关信息 |
|
|
|
Long tenantId = query.getId(); |
|
|
|
//项目相关信息 |
|
|
@@ -436,6 +435,10 @@ public class TenantServiceImpl implements TenantService { |
|
|
|
List<ClientRoleDto> list = new ArrayList<>(); |
|
|
|
List<ClientUserRolePo> clientUserRolePos = clientUserRoleMapper.selectListByUserId(tenantPo.getUserId()); |
|
|
|
for (ClientUserRolePo clientUserRolePo : clientUserRolePos) { |
|
|
|
//判断是否包含机场 |
|
|
|
if ("tuoheng-airport-admin".equals(clientUserRolePo.getClientId())) { |
|
|
|
isAirport = true; |
|
|
|
} |
|
|
|
ClientRoleDto clientRoleDto = new ClientRoleDto(); |
|
|
|
//此处 暂时格式都为 tuoheng-hhz-web 等格式 如后续维护需要变更形式则此处代码需要更改 |
|
|
|
clientRoleDto.setRoleId(clientUserRolePo.getRoleId()); |
|
|
@@ -450,6 +453,7 @@ public class TenantServiceImpl implements TenantService { |
|
|
|
list.add(clientRoleDto); |
|
|
|
} |
|
|
|
dto.setClientRoleDtoList(list.stream().distinct().collect(Collectors.toList())); |
|
|
|
dto.setIsAirport(isAirport); |
|
|
|
return JsonResult.success(dto); |
|
|
|
} |
|
|
|
|