增加构建通知

This commit is contained in:
dengqichen 2025-11-18 13:56:00 +08:00
parent 0128d7b03b
commit 7a3bfac44e
2 changed files with 9 additions and 6 deletions

View File

@ -221,15 +221,13 @@ public class ExternalSystemServiceImpl extends BaseServiceImpl<ExternalSystem, E
throw new BusinessException(ResponseCode.EXTERNAL_SYSTEM_DISABLED); throw new BusinessException(ResponseCode.EXTERNAL_SYSTEM_DISABLED);
} }
// 解密密码和Token用于连接测试
ExternalSystem decryptedSystem = decryptSystemForUse(system);
IExternalSystemIntegration integration = integrationMap.get(system.getType()); IExternalSystemIntegration integration = integrationMap.get(system.getType());
if (integration == null) { if (integration == null) {
throw new BusinessException(ResponseCode.EXTERNAL_SYSTEM_TYPE_NOT_SUPPORTED); throw new BusinessException(ResponseCode.EXTERNAL_SYSTEM_TYPE_NOT_SUPPORTED);
} }
boolean success = integration.testConnection(decryptedSystem); // 直接传入原始系统对象Integration层会自动处理解密和缓存
boolean success = integration.testConnection(system);
if (success) { if (success) {
system.setLastConnectTime(LocalDateTime.now()); system.setLastConnectTime(LocalDateTime.now());
externalSystemRepository.save(system); externalSystemRepository.save(system);
@ -362,8 +360,13 @@ public class ExternalSystemServiceImpl extends BaseServiceImpl<ExternalSystem, E
/** /**
* 解密系统信息用于实际调用外部系统 * 解密系统信息用于实际调用外部系统
* 创建一个临时对象不影响原对象 * 创建一个临时对象不影响原对象
*
* @deprecated 不再使用此方法解密职责已移至Integration层统一处理
* 保留此方法仅用于兼容性实际上不应再调用
*/ */
@Deprecated
private ExternalSystem decryptSystemForUse(ExternalSystem system) { private ExternalSystem decryptSystemForUse(ExternalSystem system) {
log.warn("decryptSystemForUse方法已废弃请直接使用Integration层的解密机制");
ExternalSystem decrypted = new ExternalSystem(); ExternalSystem decrypted = new ExternalSystem();
// 复制所有属性 // 复制所有属性
decrypted.setId(system.getId()); decrypted.setId(system.getId());

View File

@ -107,7 +107,7 @@ deploy:
encryption: encryption:
# 加密密钥(强烈建议使用环境变量 ENCRYPTION_SECRET_KEY # 加密密钥(强烈建议使用环境变量 ENCRYPTION_SECRET_KEY
# 生产环境务必修改为强随机字符串密钥长度至少32位 # 生产环境务必修改为强随机字符串密钥长度至少32位
secret-key: ${ENCRYPTION_SECRET_KEY:CHANGE-THIS-IN-PRODUCTION-ENV-32CHARS} secret-key: ${ENCRYPTION_SECRET_KEY:deploy-ease-platform-secret-key-2025}
# 加密盐值(强烈建议使用环境变量 ENCRYPTION_SALT # 加密盐值(强烈建议使用环境变量 ENCRYPTION_SALT
# 盐值必须是16位十六进制字符串只能包含0-9和a-f # 盐值必须是16位十六进制字符串只能包含0-9和a-f
salt: ${ENCRYPTION_SALT:0123456789abcdef} salt: ${ENCRYPTION_SALT:a1b2c3d4e5f6a7b8}