refactor(msgcenter): 目录键归一 flowcenter→flow-center(D1)——直批出站目标 key 与部署名对齐,私有键 flowcenter-base-url 改名 flow-center-base-url(MsgCenterProperties.flowCenterBaseUrl 同步),注释/常量/测试跟随;私有方法名 getFlowcenter 等为 Java 标识符按惯例保留
build / build-push (push) Successful in 1m40s
build / build-push (push) Successful in 1m40s
This commit is contained in:
@@ -23,9 +23,9 @@ public class MsgCenterProperties {
|
||||
|
||||
/**
|
||||
* flow-center 服务基址(卡片直批 B3 出站,/oapi/flow/**);空 = 走服务目录
|
||||
* flowcenter(PlatformService 枚举兜底)。不可达时直批降级提示,不阻塞消息卡片。
|
||||
* flow-center(PlatformService 枚举兜底,key 与部署名对齐)。不可达时直批降级提示,不阻塞消息卡片。
|
||||
*/
|
||||
private String flowcenterBaseUrl = "";
|
||||
private String flowCenterBaseUrl = "";
|
||||
|
||||
/**
|
||||
* 浏览器可达的 UserMsg WS 端点(实时推送握手地址);空 = 不下发 WS 地址,
|
||||
|
||||
@@ -26,15 +26,15 @@ import java.util.Map;
|
||||
* bizId(业务记录 id)作为通用回落;bizType 过滤键用消息 jumpApp(=流程业务类型,
|
||||
* 消息 bizType「flow.task」是消息分类,与待办的 bizType 不同命名空间,勿混)。</li>
|
||||
* <li>匹配 0 条=已处理或已失效;>1 条(同办件多出口/多节点)=请前往详情页办理(一期不做歧义猜选)。</li>
|
||||
* <li>出站走 {@link YschOpenCall} 签名直调,目标 flowcenter(服务目录/枚举兜底,
|
||||
* flowcenter-base-url 显式覆盖优先)。flow-center 不可达降级为提示,不影响消息卡片其余功能。</li>
|
||||
* <li>出站走 {@link YschOpenCall} 签名直调,目标 flow-center(服务目录/枚举兜底,
|
||||
* flow-center-base-url 显式覆盖优先)。flow-center 不可达降级为提示,不影响消息卡片其余功能。</li>
|
||||
* </ul>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MsgApprovalProxyService {
|
||||
|
||||
private static final String TARGET_FLOWCENTER = "flowcenter";
|
||||
private static final String TARGET_FLOW_CENTER = "flow-center";
|
||||
|
||||
/** 我的待办分页拉取上限:5 页 × 100 条(todo 量级远小于此,防御性封顶) */
|
||||
private static final int TODO_MAX_PAGES = 5;
|
||||
@@ -167,19 +167,19 @@ public class MsgApprovalProxyService {
|
||||
|
||||
/** 显式 base-url → ad-hoc TargetSpec(对齐 usermsg 通道形态);否则按名走服务目录/枚举兜底 */
|
||||
private JsonNode getFlowcenter(String path, Map<String, String> query) {
|
||||
String base = properties.getFlowcenterBaseUrl();
|
||||
String base = properties.getFlowCenterBaseUrl();
|
||||
if (StringUtils.hasText(base)) {
|
||||
return openCall.get(TargetSpec.fromUrl(base.trim()), path, query, JsonNode.class);
|
||||
}
|
||||
return openCall.get(TARGET_FLOWCENTER, path, query, JsonNode.class);
|
||||
return openCall.get(TARGET_FLOW_CENTER, path, query, JsonNode.class);
|
||||
}
|
||||
|
||||
private JsonNode postFlowcenter(String path, Map<String, String> query, Object body) {
|
||||
String base = properties.getFlowcenterBaseUrl();
|
||||
String base = properties.getFlowCenterBaseUrl();
|
||||
if (StringUtils.hasText(base)) {
|
||||
return openCall.post(TargetSpec.fromUrl(base.trim()), path, query, body, JsonNode.class);
|
||||
}
|
||||
return openCall.post(TARGET_FLOWCENTER, path, query, body, JsonNode.class);
|
||||
return openCall.post(TARGET_FLOW_CENTER, path, query, body, JsonNode.class);
|
||||
}
|
||||
|
||||
private static Map<String, Object> fail(Map<String, Object> out, String message) {
|
||||
|
||||
Reference in New Issue
Block a user