Files
svc-hall-service/src/main/java/com/yunhai/svchall/entity/ServiceFlowReg.java
T
chenxing eb0a8ded2f
build / build-push (push) Successful in 1m37s
refactor(oapi): 收敛 Notice 范式——回调收口+提供方强制验签迁 starter(审计 P1 / L2-7 L2-8)
回调(对齐《子应用流程与消息对接手册-20260929》Notice 线上形态):
- yh.flow-callback.path 迁 /oapi/flow/callback;删 callback-url(改 starter 三段推导:
  base-host+前缀三层回落+path,生产=http://open-gateway-service:10013/svc-hall/oapi/flow/callback)
- verify-flw-signature=false(平台应用签名承担,X-Flw 不启用);reconcile-on-register=true
  (路径漂移自动重注册,160 存量 /callback/flow 行靠它收敛)
- 删 svchall.public-base-url(唯一消费方即 callback-url 拼接)与 yh.open.base-path
  (对齐 Notice 形态;该键代码默认值即 /userbase,删键无行为变化)
- deriveCallbackBasePath 剥尾段口径同步 /oapi/flow/callback(契约测试断言更新)

提供方(flow-center 同款组合链):
- 删自写 OpenApiAuthEnforceConfiguration(starter 版 RequireAppSignFilter 承接,order+11 等价)
- yh.app-auth.server.enforce-patterns=[/oapi/*] + trust-registry=true;trusted-apps 保留
  100005(CMS) 并增 100019(flow-center 回调推送兜底);pom 显式引 data-redis(optional 不传递)
- management.health.redis.enabled=false(Redis 抖动不拉 DOWN 整机健康)

门禁:mvn test 127/127 绿
2026-10-05 22:26:22 +08:00

50 lines
1.8 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.yunhai.svchall.entity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
/**
* 流程回调注册(V2.0 Part B.2.6):管理端在事项绑定 flow_guid 时经
* POST /oapi/flow/callback/reg 向流程中心注册并保存下发的 secret(回调签名密钥,
* 与应用级 appSecret 分离、粒度到"应用×流程"——流程中心概览 §4.8)。
* 同 flow_guid 多事项共享一条注册。
*/
@Getter
@Setter
@Entity
@Table(name = "service_flow_reg",
uniqueConstraints = @UniqueConstraint(name = "uk_svc_flow_reg", columnNames = {"sch_id", "flow_guid"}),
indexes = @Index(name = "idx_svc_flow_reg_guid", columnList = "flow_guid"))
public class ServiceFlowReg extends BaseEntity {
/** 租户键 */
@Column(name = "sch_id", nullable = false)
private Long schId;
/** 订阅的流程 */
@Column(name = "flow_guid", nullable = false, length = 32)
private String flowGuid;
/** 回调接收端点(2026-10-05 起 = 平台推导地址 + /oapi/flow/callback;权威镜像在 starter 表 flow_callback_reg) */
@Column(name = "callback_url", nullable = false, length = 500)
private String callbackUrl;
/** 订阅事件逗号分隔(空=全部;flow.submitted/task.created/task.handled/completed/rejected/withdrawn) */
@Column(name = "event_types", length = 200)
private String eventTypes;
/** reg 接口下发的回调签名密钥(HmacSHA256;不回显给前端) */
@Column(name = "secret", nullable = false, length = 64)
private String secret;
/** 0 启用 / 1 停用 */
@Column(name = "status", nullable = false)
private Integer status = 0;
}