feat(face-b): 应用中心 / 系统配置 / 标签落地(面 B 批次 3,+26 端点)

- schema:新增 base_system_top / base_sys_config / base_tag(DDL 逐字对齐官方
  JNPF-PostgreSQL.sql),tables 23 → 26;ensure_schema 改为逐表探 to_regclass
  ⇒ 老库自动补后加的表(此前见到 base_user 就早退,新表永远不出现)
- 应用中心(SystemController):列表/详情/增删改/复制/置顶/偏好 + 应用授权三件套,
  列表返 ListVO 且 isTop 由 base_system_top 现场拼;删除守两道官方闸(主系统、
  应用下还有 base_module);复制只复制应用行 ⇒ 记 partial
- 系统配置(SysConfigController):键值表逐键 upsert,读回做数字/布尔还原;
  库为空时给 39 键默认对象(前端 state.baseForm = res.data 后立刻读 .logCleanPeriod,
  data 不能是 null);企业微信/钉钉/第三方同步恒返 400 + 人话,不假装成功
- 标签(TagController):ListVO + selector(enCode 空 ⇒ 全部)+ CRUD,编码唯一
- 修 check-contract-scan.py 静默失效:面 B 文件已改名 face_b,尺子只认 jnpf
  ⇒ 整片面 B 的守卫检查没在跑(CC6 warning 从 20+ 降到 2)
- 契约登记三处同步:[ENDPOINT] 26 行 / [OFFICIAL] 26 条(5 条 partial)/ B 146→177;
  测试 495 → 499
This commit is contained in:
admin committed 2026-10-31 22:16:55 +08:00
1 parent 1d1a3b1ef9
commit ba8883dfb0
12 files changed
+2390 -25

No files matched your search

+5 -3
View File
@@ -215,7 +215,7 @@ def resolve_const(orig, masked, name):
def guard_of_platform(plat_files, mod, fn):
"""平台层 handler 的守卫 ⇒ 菜单 key / 点权限编码 / 登录 / 无;推不出 ⇒ None。
`plat_files` = {"sys": (orig, masked), "jnpf": (orig, masked), ...}
`plat_files` = {"sys": (orig, masked), "face_b": (orig, masked), ...}
"""
if mod == "auth" and fn == "login_handler":
return "无"
@@ -247,11 +247,13 @@ def guard_of_platform(plat_files, mod, fn):
if re.search(r"require_login(_any)?\s*\(", body):
return "登录"
return None
if mod == "jnpf":
# 🔴 面 B 的实现文件 2026-10-26 从 `jnpf.rs` 改名为 `face_b.rs`
# ⇒ 这里**两个名字都认**(只认旧名会让整片面 B 的守卫检查静默失效)。
if mod in ("jnpf", "face_b"):
m = re.search(r"guard\(\s*&state\s*,\s*&headers\s*,\s*([A-Z_][A-Z0-9_]*)\s*\)", body)
if m:
return resolve_const(orig, masked, m.group(1))
if re.search(r"require_login_jnpf\s*\(", body):
if re.search(r"require_login_(jnpf|face_b)\s*\(", body):
return "登录"
return None
return None