parent
f692577ae7
commit
daec4941e1
|
@ -357,34 +357,18 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
|||
}
|
||||
|
||||
/**
|
||||
* @param dataSourceCode 源数据机构编码
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令-指令同步")
|
||||
@ApiOperation(value = "服务指令-指令同步", notes = "服务指令-指令同步")
|
||||
@PostMapping(value = "/syncDirective")
|
||||
@DS("#sourceOrgCode")
|
||||
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())) {
|
||||
configServiceDirectiveService.syncDirective(sourceOrgCode, dto.getSyncIds());
|
||||
new Thread(() -> {
|
||||
configServiceDirectiveService.syncDirective(sourceOrgCode, dto.getSyncIds());
|
||||
}).start();
|
||||
}
|
||||
|
||||
//发送消息
|
||||
return Result.ok();
|
||||
}
|
||||
|
|
|
@ -514,6 +514,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
|||
* @param syncIds 需要同步的指令ID
|
||||
*/
|
||||
@Override
|
||||
@DS("#sourceOrgCode")
|
||||
public DirectiveMQDto syncDirective(String sourceOrgCode,String syncIds) {
|
||||
DirectiveMQDto directiveMQDto = new DirectiveMQDto();
|
||||
List<ConfigServiceDirective> directives;
|
||||
|
|
|
@ -214,7 +214,7 @@ spring:
|
|||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#redis 配置
|
||||
redis:
|
||||
database: 0
|
||||
database: 3
|
||||
host: redis
|
||||
port: 6379
|
||||
password: uUgrUus4JAYuwxzo
|
||||
|
|
|
@ -214,7 +214,7 @@ spring:
|
|||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#redis 配置
|
||||
redis:
|
||||
database: 0
|
||||
database: 4
|
||||
host: redis
|
||||
port: 6379
|
||||
password: uUgrUus4JAYuwxzo
|
||||
|
|
|
@ -214,7 +214,7 @@ spring:
|
|||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#redis 配置
|
||||
redis:
|
||||
database: 0
|
||||
database: 5
|
||||
host: redis
|
||||
port: 6379
|
||||
password: uUgrUus4JAYuwxzo
|
||||
|
|
Loading…
Reference in New Issue