切换到生产环境配置并优化服务发现
parent
0c8d3c1dd2
commit
289f62794d
|
|
@ -1,8 +1,8 @@
|
|||
spring:
|
||||
config:
|
||||
import:
|
||||
- classpath:nacos.yml
|
||||
- classpath:sdk.yml
|
||||
# - classpath:prodnacos.yml
|
||||
# - classpath:prodsdk.yml
|
||||
# - classpath:nacos.yml
|
||||
# - classpath:sdk.yml
|
||||
- classpath:prodnacos.yml
|
||||
- classpath:prodsdk.yml
|
||||
- classpath:swagger.yml
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
sdk:
|
||||
server:
|
||||
# 线上环境
|
||||
app-key: 0fde29723e51420d82b7047feaad98c9
|
||||
# 港务局环境
|
||||
# app-key: 7aa164ddb87a450fbcd902b38a49e36e
|
||||
app-key: 8a7f2cbde8424e9ab0def68fbb1213ca
|
||||
client:
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.external}
|
||||
|
|
@ -52,3 +50,7 @@ openapi:
|
|||
apiCode: test:01
|
||||
#多个可以逗号隔开,可以为空
|
||||
tenantIds: 1838408702262321152
|
||||
message:
|
||||
template:
|
||||
assign: MS000128
|
||||
dispose: MS000129
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ sdk:
|
|||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: http://${application.name}
|
||||
uri: lb://${application.name}
|
||||
path: /${application.gateway}/**
|
||||
- client:
|
||||
system-code: ${application.name}-container
|
||||
|
|
@ -25,7 +25,7 @@ sdk:
|
|||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: http://jjb-saas-base
|
||||
uri: lb://jjb-saas-base
|
||||
path: /${application.gateway}/container/**
|
||||
order: -2
|
||||
openapi:
|
||||
|
|
@ -49,3 +49,13 @@ openapi:
|
|||
apiCode: test:01
|
||||
#多个可以逗号隔开,可以为空
|
||||
tenantIds: 1838408702262321152
|
||||
message:
|
||||
template:
|
||||
one-day-before-expire: MS000090
|
||||
three-day-before-expire: MS000091
|
||||
seven-day-before-expire: MS000093
|
||||
fifteen-day-before-expire: MS000095
|
||||
thirty-day-before-expire: MS000096
|
||||
ninety-day-before-expire: MS000097
|
||||
seven-day-before-expire-copy-leader: MS000092
|
||||
fifteen-day-before-expire-copy-leader: MS000094
|
||||
|
|
|
|||
|
|
@ -2,17 +2,14 @@ package com.zcloud.command;
|
|||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.domain.gateway.DeviceRegionGateway;
|
||||
import com.zcloud.domain.gateway.RegionSensorRelGateway;
|
||||
import com.zcloud.domain.model.DeviceRegionE;
|
||||
import com.zcloud.dto.ManagerCmd;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import com.zcloud.gbscommon.utils.UuidUtil;
|
||||
import com.zcloud.persistence.dataobject.DeviceRegionDO;
|
||||
import com.zcloud.persistence.dataobject.UserDO;
|
||||
import com.zcloud.persistence.repository.DeviceRegionRepository;
|
||||
import com.zcloud.service.ExtraUserQueryService;
|
||||
import com.zcloud.persistence.repository.UserRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -29,14 +26,13 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
public class ManagerExe {
|
||||
|
||||
private final DeviceRegionGateway deviceRegionGateway;
|
||||
private final ExtraUserQueryService extraUserQueryService;
|
||||
|
||||
private final UserRepository userRepository;
|
||||
private final DeviceRegionRepository deviceRegionRepository;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(ManagerCmd cmd) {
|
||||
DeviceRegionE existingRegion = new DeviceRegionE();
|
||||
BeanUtil.copyProperties(cmd, existingRegion);
|
||||
UserDO userDO = extraUserQueryService.getRequiredById(cmd.getManagerId());
|
||||
UserDO userDO = userRepository.findById(cmd.getManagerId());
|
||||
existingRegion.setManagerName(userDO.getName());
|
||||
existingRegion.setManagerId(userDO.getId());
|
||||
existingRegion.setDepartmentId(userDO.getDepartmentId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue