1、调整不同业务系统使用不同redis的database

2、调整指令库-镜像接口
This commit is contained in:
1378012178@qq.com 2025-08-04 15:36:09 +08:00
parent f692577ae7
commit daec4941e1
5 changed files with 8 additions and 23 deletions

View File

@ -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();
} }

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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