1
This commit is contained in:
@@ -1057,22 +1057,30 @@ public class JDOrderController extends BaseController {
|
||||
}
|
||||
|
||||
try {
|
||||
// 构建配置键名
|
||||
String configKey = CONFIG_KEY_PREFIX + distributionMark.trim();
|
||||
|
||||
// 从系统配置中获取接收人列表
|
||||
String trimmed = distributionMark.trim();
|
||||
String configKey = CONFIG_KEY_PREFIX + trimmed;
|
||||
String configValue = sysConfigService.selectConfigByKey(configKey);
|
||||
|
||||
if (StringUtils.hasText(configValue)) {
|
||||
// 清理配置值(去除空格)
|
||||
String touser = configValue.trim().replaceAll(",\\s+", ",");
|
||||
logger.info("从配置获取接收人列表 - 分销标识: {}, 配置键: {}, 接收人: {}",
|
||||
distributionMark, configKey, touser);
|
||||
return touser;
|
||||
} else {
|
||||
logger.debug("未找到接收人配置 - 分销标识: {}, 配置键: {}", distributionMark, configKey);
|
||||
return null;
|
||||
}
|
||||
if (trimmed.startsWith("F-") || "F".equals(trimmed)) {
|
||||
if (!trimmed.equals("F")) {
|
||||
String fallbackKey = CONFIG_KEY_PREFIX + "F";
|
||||
String fallbackVal = sysConfigService.selectConfigByKey(fallbackKey);
|
||||
if (StringUtils.hasText(fallbackVal)) {
|
||||
String touser = fallbackVal.trim().replaceAll(",\\s+", ",");
|
||||
logger.info("从配置获取接收人列表(F 系回退) - 分销标识: {}, 配置键: {}, 接收人: {}",
|
||||
distributionMark, fallbackKey, touser);
|
||||
return touser;
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.debug("未找到接收人配置 - 分销标识: {}, 配置键: {}", distributionMark, configKey);
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
logger.error("获取接收人配置失败 - 分销标识: {}, 错误: {}", distributionMark, e.getMessage(), e);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user