feat(msgCenter): 补齐消息中心族 50 条端点并同步契约三处
- 影响:面 B 新增 51 条 `/api/message/**` 端点(契约端点 714 → 765,面 B 684 → 735),官方端点覆盖 700/706 → 751/757,`fe-gap` 的 `msgCenter` 列 49/50 → 50/50。
- 改动:新增 `platform/compat/msg_center.rs` —— 真落库 44 条(账号/发送配置/模板含两张子表/敏感词/接收/监控/供应商,落官方 `base_msg_*` + `base_intg_supplier*` 表),诚实失败 7 条(无 HTTP 客户端 ⇒ 接不了任何消息服务商)。
- 改动:契约生成器新增 msgCenter 族(7 个官方 Controller + 3 条官方前端独有路径),`[ENDPOINT]` +51、`[OFFICIAL]` +51,`[FACE]` 面 B 同步。
- 改动:修 8 处创建人/修改人列(存登录账号不是 UUID)、账号复制列与 CAST 长度错位、子表 `SELECT *` 抄错列、复制账号复制出两个默认账号。
- 改动:新增 `tests/batch20_it.rs`(6 条)—— 逐条打 51 条路径防 matchit 冲突 + CRUD 落库 + 两个 ListVO 形状 + 诚实失败断言 + 未登录 602。
- 设计:官方前端 `testConfig` 声明的是动态路径 ⇒ 加同语义别名 `POST /api/message/Account/{id}` 接住;官方 Java 多暴露、官方前端从不调的 12 条端点本期不做。
Co-Authored-By: Claude Code <[email protected]>
This commit is contained in:
1 parent
824a0571e9
commit
fc31804f4e
10 files changed
+5924
-19
No files matched your search
@@ -395,6 +395,94 @@ REPORT_FRONTEND_LINES = {
|
||||
"GET /api/Report/data/{id}/getQueryList": 106,
|
||||
}
|
||||
|
||||
# 🔴 **消息中心族(批次 20)**:官方 `jnpf-message` 的 Controller ⇒ 文件名 + 映射行号。
|
||||
#
|
||||
# 🔴 **范围**:官方前端 `src/api/msgCenter/**` 的**全部 50 个接口**。
|
||||
# 官方 Java 还多暴露 12 条前端从不调的(Account 的 `detail/{id}` / `unable/{id}` /
|
||||
# `Action/Export` / `Action/Import`,Template 的同 4 条,Send 的 `/Selector` /
|
||||
# `getInfoByEnCode/{enCode}` / `detail/{id}`,Monitor 的 `POST /Monitor`)
|
||||
# ⇒ **本期不做**(官方前端不需要)⇒ 记在 `HANDOFF.md` 的已知限制里。
|
||||
_MSG_CENTER_CONTROLLERS = {
|
||||
"AccountController.java": {
|
||||
"GET /api/message/Account": 113,
|
||||
"PUT /api/message/Account/setdefault": 160,
|
||||
"POST /api/message/Account": 176,
|
||||
"GET /api/message/Account/{id}": 205,
|
||||
"PUT /api/message/Account/{id}": 255,
|
||||
"DELETE /api/message/Account/{id}": 324,
|
||||
"POST /api/message/Account/{id}/Actions/Copy": 394,
|
||||
"POST /api/message/Account/testSendMail": 470,
|
||||
},
|
||||
"SendMessageConfigController.java": {
|
||||
"GET /api/message/Send": 143,
|
||||
"GET /api/message/Send/getSendConfigList": 226,
|
||||
"POST /api/message/Send": 304,
|
||||
"GET /api/message/Send/{id}": 443,
|
||||
"PUT /api/message/Send/{id}": 545,
|
||||
"DELETE /api/message/Send/{id}": 657,
|
||||
"POST /api/message/Send/getTestConfig/{id}": 680,
|
||||
"POST /api/message/Send/testSendConfig": 719,
|
||||
"POST /api/message/Send/{id}/Actions/Copy": 757,
|
||||
},
|
||||
"MessageTemplateConfigController.java": {
|
||||
"GET /api/message/Template": 117,
|
||||
"POST /api/message/Template": 174,
|
||||
"GET /api/message/Template/{id}": 250,
|
||||
"PUT /api/message/Template/{id}": 334,
|
||||
"DELETE /api/message/Template/{id}": 518,
|
||||
"POST /api/message/Template/{id}/Actions/Copy": 569,
|
||||
},
|
||||
"MsgSensitiveController.java": {
|
||||
"GET /api/message/Sensitive": 34,
|
||||
"POST /api/message/Sensitive": 42,
|
||||
"GET /api/message/Sensitive/{id}": 49,
|
||||
"DELETE /api/message/Sensitive/{id}": 56,
|
||||
"PUT /api/message/Sensitive/{id}": 63,
|
||||
},
|
||||
"MsgReceiveController.java": {
|
||||
"GET /api/message/Receive": 29,
|
||||
"POST /api/message/Receive": 39,
|
||||
},
|
||||
"MessageMonitorController.java": {
|
||||
"GET /api/message/Monitor": 100,
|
||||
"GET /api/message/Monitor/Info": 139,
|
||||
"DELETE /api/message/Monitor/batchRemove": 176,
|
||||
"DELETE /api/message/Monitor/empty": 190,
|
||||
"GET /api/message/Monitor/detail/{id}": 222,
|
||||
"GET /api/message/Monitor/{id}/RecordList": 277,
|
||||
"POST /api/message/Monitor/{id}/Retry": 315,
|
||||
},
|
||||
"IntgSupplierController.java": {
|
||||
"GET /api/message/Supplier": 86,
|
||||
"POST /api/message/Supplier": 94,
|
||||
"PUT /api/message/Supplier/{id}": 166,
|
||||
"GET /api/message/Supplier/Selector": 193,
|
||||
"GET /api/message/Supplier/{id}": 201,
|
||||
"POST /api/message/Supplier/{id}/Actions/Copy": 209,
|
||||
"DELETE /api/message/Supplier/{id}": 221,
|
||||
"GET /api/message/Supplier/TemplateList": 240,
|
||||
"POST /api/message/Supplier/SyncTemplate": 260,
|
||||
"GET /api/message/Supplier/{id}/VariableList": 266,
|
||||
"PUT /api/message/Supplier/{id}/Actions/State": 275,
|
||||
},
|
||||
}
|
||||
|
||||
# 🔴 消息中心族里**官方 Java 没有对应 `@XxxMapping`** 的 3 条
|
||||
# (官方前端自己声明了这三个接口,官方 Java 后端没实现)⇒ 出处指官方前端。
|
||||
#
|
||||
# 🔴 第三条 `POST /api/message/Account/{id}` 是**动态路径**:
|
||||
# 官方前端 `api/msgCenter/accountConfig.ts:33` 写 `${Api.Prefix}/${data.testType}`
|
||||
# ⇒ 静态抽端点器把最后一段记成路径参数。官方 Java 只有静态端点
|
||||
# `POST /api/message/Account/testSendMail`(`AccountController.java:470`),
|
||||
# 而前端**唯一调用点**(`src/views/integrationCenter/email/Test.vue:59`)把
|
||||
# `testType` 写死成 `'testSendMail'` ⇒ 运行期 URL 就是那个静态端点(**已实现**)。
|
||||
# 这条别名把「前端声明的路径形状」也接住(行为与静态端点完全一致)。
|
||||
_MSG_CENTER_FRONTEND_ONLY = {
|
||||
"POST /api/message/Template/testSendMail": "api/msgCenter/msgTemplate.ts:33",
|
||||
"POST /api/message/Supplier/TestConnect": "api/msgCenter/supplier.ts:45",
|
||||
"POST /api/message/Account/{id}": "api/msgCenter/accountConfig.ts:33",
|
||||
}
|
||||
|
||||
# 🔴 **状态判定**:本仓**诚实失败**(无文件服务 / 无渲染器 / 无数据引擎)
|
||||
# 的端点 ⇒ `partial`(已落地但**形状有偏差**);完全对齐 ⇒ `implemented`。
|
||||
# 键 = `(method, path)`;值 = (status, note)。
|
||||
@@ -606,9 +694,75 @@ PARTIAL_NOTES[("GET", "/api/flowForm/Form/getFormById/{id}")] = (
|
||||
"`workflow_form_relation.f_form_id → f_flow_id` 返流程主键"
|
||||
"(**不返假流程号**)")
|
||||
|
||||
# 🔴 ---- 消息中心族(批次 20)----
|
||||
#
|
||||
# 🔴 **6 条「真发消息 / 真连服务商」** ⇒ 本仓**没有 HTTP 客户端**
|
||||
# ⇒ 一律**明确业务失败**(不返假发送结果、不返假模板)。
|
||||
_MSG_CENTER_SEND_PATHS = [
|
||||
("POST", "/api/message/Account/testSendMail"),
|
||||
("POST", "/api/message/Send/testSendConfig"),
|
||||
("POST", "/api/message/Template/testSendMail"),
|
||||
("POST", "/api/message/Monitor/{id}/Retry"),
|
||||
("POST", "/api/message/Supplier/SyncTemplate"),
|
||||
("POST", "/api/message/Supplier/TestConnect"),
|
||||
]
|
||||
for _m, _p in _MSG_CENTER_SEND_PATHS:
|
||||
PARTIAL_NOTES[(_m, _p)] = (
|
||||
"partial", "本仓无 HTTP 客户端(不接任何消息服务商)⇒ **明确业务失败**"
|
||||
"(不返假发送结果 / 假模板)")
|
||||
|
||||
# 🔴 官方前端 `testConfig` 的**动态路径**别名(`${Api.Prefix}/${data.testType}`):
|
||||
# 官方 Java 只有静态端点 `/Account/testSendMail`,前端调用点把 `testType`
|
||||
# 写死成 `'testSendMail'` ⇒ 运行期就是那个静态端点;本条是**同语义别名**。
|
||||
PARTIAL_NOTES[("POST", "/api/message/Account/{id}")] = (
|
||||
"partial", "官方前端 `testConfig` 的**动态**路径(`${Api.Prefix}/${data.testType}`,"
|
||||
"`api/msgCenter/accountConfig.ts:33`)的**同语义别名**;运行期 "
|
||||
"`testType` 写死为 `testSendMail` ⇒ 打到官方静态端点(已实现)。"
|
||||
"本仓无 HTTP 客户端 ⇒ **明确业务失败**(不返假发送结果)")
|
||||
|
||||
# 🔴 供应商的新增 / 更新:官方会先**真连服务商**做「测试连接」⇒
|
||||
# 本仓跳过连通性检查(**写库照做**),其余校验(名称 / 编码 / 密钥重复)全做。
|
||||
PARTIAL_NOTES[("POST", "/api/message/Supplier")] = (
|
||||
"implemented", "面 B 已落地:官方在落库前会**真连服务商**做「测试连接」⇒ "
|
||||
"本仓**跳过连通性检查**(名称 / 编码 / 密钥重复校验全做,"
|
||||
"落库照做)")
|
||||
PARTIAL_NOTES[("PUT", "/api/message/Supplier/{id}")] = (
|
||||
"implemented", "面 B 已落地:同新增 —— 官方先真连服务商做「测试连接」⇒ "
|
||||
"本仓**跳过连通性检查**(其余校验全做)")
|
||||
|
||||
# 🔴 消息账号 / 供应商的**密钥字段**:官方 DDL 就是**明文**存
|
||||
# (`base_msg_account.f_smtp_password` / `base_intg_supplier.f_secret_key`)
|
||||
# 且官方前端**要拿回来编辑** ⇒ 本仓**照官方**返回(与「用户登录口令不得外泄」
|
||||
# 是两码事 —— 那条只管 `base_user.f_password`)。
|
||||
PARTIAL_NOTES[("GET", "/api/message/Account/{id}")] = (
|
||||
"implemented", "面 B 已落地:`smtpPassword` 等密钥字段**照官方返回明文**"
|
||||
"(官方 DDL 即明文存、前端要拿回来编辑;与「用户登录口令不得外泄」"
|
||||
"是两条不同的红线)")
|
||||
PARTIAL_NOTES[("GET", "/api/message/Supplier")] = (
|
||||
"implemented", "面 B 已落地:`secretKey` **照官方返回明文**(官方 DDL 即明文存);"
|
||||
"官方 VO 里 `supplierName`/`supplierId`/`smsSignature`/`isDefault`/"
|
||||
"`content` **没有数据来源**(实体里没这些字段)⇒ 本仓同官方返 null")
|
||||
PARTIAL_NOTES[("GET", "/api/message/Supplier/{id}")] = (
|
||||
"implemented", "面 B 已落地:`secretKey` **照官方返回明文**;`isEditor` = 该供应商"
|
||||
"**没有模板**(官方:`CollUtil.isEmpty(tplEntities)`)")
|
||||
|
||||
# 🔴 消息审计 `msgTypeInfo.msgTypeList`:官方走 `msgSendType` **字典**
|
||||
# ⇒ 本仓**没有这个字典** ⇒ 改用官方 `MessageTypeEnum` 的 8 个消息类型。
|
||||
PARTIAL_NOTES[("GET", "/api/message/Monitor/Info")] = (
|
||||
"implemented", "面 B 已落地:`msgTypeInfo.msgTypeList` 官方走 `msgSendType` **字典**"
|
||||
"⇒ 本仓**无此字典** ⇒ 改用官方 `MessageTypeEnum` 的 8 个消息类型;"
|
||||
"`noticeInfo` 按官方口径只统计「公告」业务分类"
|
||||
"(`f_category` 含 `2046494646179336192`)")
|
||||
|
||||
# 🔴 消息接收配置 `GET /api/message/Receive`:官方返的是 **ListVO**(不是分页)。
|
||||
PARTIAL_NOTES[("GET", "/api/message/Receive")] = (
|
||||
"implemented", "面 B 已落地:官方返 **ListVO**(`{list:[…]}`,**不是分页**);"
|
||||
"每条含 `channels` / `configJson`(渠道矩阵)与业务分类的"
|
||||
"`categoryName` / `subCategoryName` / `topCategoryName`")
|
||||
|
||||
# 🔴 **端点顺序**:按官方模块分组,组内按路径排 —— 与 `routes.rs` 的注册顺序对齐
|
||||
# (⇒ 契约读起来与代码读起来同序 ⇒ 人工 review 不用来回跳)。
|
||||
MODULE_ORDER = ["core", "online_dev", "report", "workflow"]
|
||||
MODULE_ORDER = ["core", "online_dev", "report", "workflow", "msg_center"]
|
||||
|
||||
# 🔴 **默认 note**(未在 `PARTIAL_NOTES` 里显式标注的端点)。
|
||||
DEFAULT_NOTES = {
|
||||
@@ -621,6 +775,10 @@ DEFAULT_NOTES = {
|
||||
"workflow": "面 B 已落地:流程**元数据**(模板 / 版本 / 节点 / 评论 / 委托 / "
|
||||
"监控 / 触发记录)**真落库**到官方 24 张 `workflow_*` 表(DDL 逐字照官方);"
|
||||
"**引擎动作**(发起 / 审批 / 办理 …)因本仓未接入 Flowable ⇒ **明确业务失败**",
|
||||
"msg_center": "面 B 已落地:消息中心(账号 / 发送配置 / 模板 / 敏感词 / 接收配置 / "
|
||||
"监控 / 供应商)**真落库**到官方 `base_msg_*` + `base_intg_supplier*` "
|
||||
"表(DDL 逐字照官方);**真发消息 / 真连服务商**的动作因本仓无 HTTP "
|
||||
"客户端 ⇒ **明确业务失败**",
|
||||
}
|
||||
|
||||
|
||||
@@ -713,6 +871,19 @@ def official_entry(mod, key, path):
|
||||
status, note = PARTIAL_NOTES.get(key, ("implemented", DEFAULT_NOTES["workflow"]))
|
||||
return src, status, note
|
||||
raise SystemExit("workflow 族没有官方出处可登记:%s %s" % (method, path))
|
||||
if mod == "msg_center":
|
||||
# 🔴 消息中心族(批次 20):官方 `jnpf-message` 的 Controller 优先,
|
||||
# 官方 Java **没有**映射的 2 条 ⇒ 落到官方前端 `api/msgCenter/**`。
|
||||
for ctrl, table in _MSG_CENTER_CONTROLLERS.items():
|
||||
if k in table:
|
||||
src = "%s:%d" % (ctrl, table[k])
|
||||
status, note = PARTIAL_NOTES.get(key, ("implemented", DEFAULT_NOTES["msg_center"]))
|
||||
return src, status, note
|
||||
src = _MSG_CENTER_FRONTEND_ONLY.get(k)
|
||||
if src:
|
||||
status, note = PARTIAL_NOTES.get(key, ("implemented", DEFAULT_NOTES["msg_center"]))
|
||||
return src, status, note
|
||||
raise SystemExit("msg_center 族没有官方出处可登记:%s %s" % (method, path))
|
||||
# onlineDev
|
||||
for ctrl, table in _VISUALDEV_CONTROLLERS.items():
|
||||
if k in table:
|
||||
|
||||
Reference in new issue
Block a user