parent
f692577ae7
commit
daec4941e1
|
@ -357,34 +357,18 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param dataSourceCode 源数据机构编码
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "服务指令-指令同步")
|
@AutoLog(value = "服务指令-指令同步")
|
||||||
@ApiOperation(value = "服务指令-指令同步", notes = "服务指令-指令同步")
|
@ApiOperation(value = "服务指令-指令同步", notes = "服务指令-指令同步")
|
||||||
@PostMapping(value = "/syncDirective")
|
@PostMapping(value = "/syncDirective")
|
||||||
@DS("#sourceOrgCode")
|
|
||||||
public Result<Map> syncDirective(@RequestParam(name = "sourceOrgCode") String sourceOrgCode, @RequestBody ConfigServiceDirective dto) {
|
public Result<Map> syncDirective(@RequestParam(name = "sourceOrgCode") String sourceOrgCode, @RequestBody ConfigServiceDirective dto) {
|
||||||
//处理接口地址
|
//同步
|
||||||
// String fullPath = "";
|
|
||||||
// if ("all".equals(dto.getSyncOption()) || "media".equals(dto.getSyncOption()) || StringUtils.isNotBlank(dto.getUpIds())) {
|
|
||||||
// JSONObject deptInfo = configServiceDirectiveService.getDeptInfo("master", dataSourceCode);
|
|
||||||
// String url = deptInfo.getString("url");
|
|
||||||
// String contextPath = deptInfo.getString("contextPath");
|
|
||||||
// String baseUrl = url.endsWith("/") ? url.substring(0, url.length() - 1) : url;
|
|
||||||
// String normalizedContextPath = contextPath.startsWith("/") ? contextPath : "/" + contextPath;
|
|
||||||
// normalizedContextPath = normalizedContextPath.endsWith("/")
|
|
||||||
// ? normalizedContextPath.substring(0, normalizedContextPath.length() - 1)
|
|
||||||
// : normalizedContextPath;
|
|
||||||
// //接口协议、域名、上下文路径
|
|
||||||
// fullPath = baseUrl + normalizedContextPath;
|
|
||||||
// }
|
|
||||||
|
|
||||||
//同步-新增服务指令
|
|
||||||
if (StringUtils.isNotBlank(dto.getSyncIds())) {
|
if (StringUtils.isNotBlank(dto.getSyncIds())) {
|
||||||
configServiceDirectiveService.syncDirective(sourceOrgCode, dto.getSyncIds());
|
new Thread(() -> {
|
||||||
|
configServiceDirectiveService.syncDirective(sourceOrgCode, dto.getSyncIds());
|
||||||
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
//发送消息
|
//发送消息
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
|
@ -514,6 +514,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
* @param syncIds 需要同步的指令ID
|
* @param syncIds 需要同步的指令ID
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@DS("#sourceOrgCode")
|
||||||
public DirectiveMQDto syncDirective(String sourceOrgCode,String syncIds) {
|
public DirectiveMQDto syncDirective(String sourceOrgCode,String syncIds) {
|
||||||
DirectiveMQDto directiveMQDto = new DirectiveMQDto();
|
DirectiveMQDto directiveMQDto = new DirectiveMQDto();
|
||||||
List<ConfigServiceDirective> directives;
|
List<ConfigServiceDirective> directives;
|
||||||
|
|
|
@ -214,7 +214,7 @@ spring:
|
||||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
#redis 配置
|
#redis 配置
|
||||||
redis:
|
redis:
|
||||||
database: 0
|
database: 3
|
||||||
host: redis
|
host: redis
|
||||||
port: 6379
|
port: 6379
|
||||||
password: uUgrUus4JAYuwxzo
|
password: uUgrUus4JAYuwxzo
|
||||||
|
|
|
@ -214,7 +214,7 @@ spring:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
#redis 配置
|
#redis 配置
|
||||||
redis:
|
redis:
|
||||||
database: 0
|
database: 4
|
||||||
host: redis
|
host: redis
|
||||||
port: 6379
|
port: 6379
|
||||||
password: uUgrUus4JAYuwxzo
|
password: uUgrUus4JAYuwxzo
|
||||||
|
|
|
@ -214,7 +214,7 @@ spring:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
#redis 配置
|
#redis 配置
|
||||||
redis:
|
redis:
|
||||||
database: 0
|
database: 5
|
||||||
host: redis
|
host: redis
|
||||||
port: 6379
|
port: 6379
|
||||||
password: uUgrUus4JAYuwxzo
|
password: uUgrUus4JAYuwxzo
|
||||||
|
|
Loading…
Reference in New Issue