Commit 0aee42c40ba176f0577970e1c6ae2709609f1273

Authored by zichun
1 parent 4ea83bcc

docs: en wiki — self-driven follow-ups (live findings + dead-source flags)

Live findings from BACK + FROUNT browser session:
- /business/addSysLocking: undocumented optimistic-lock endpoint
  (POST, called when entering edit mode; handler at
  BusinessBaseController.java:400-407). Added to internal.md universal-CRUD
  table.
- BACK admin sidebar fully enumerated (10 modules) and mapped to
  backing form-master sTbName + owning service. 8/10 are framework
  primitives covered elsewhere; 常用操作配置 has no
  gdsconfigformmaster row in this dev DB (SPA-side admin
  special-case); 图表配置 is gdsconfigcharmaster/slave (added to
  the gds prefix entry in modules-forms-vtables.md).
- FROUNT login confirmed; this dev DB exposes only 4 sidebar
  modules (2 are AI/LLM out-of-scope). Production tenants would
  carry the full business-module catalog.
- Slice 1 save endpoint live-corroborated: clicking 新增 → 保存
  fired POST /xlyEntry/business/addUpdateDelBusinessData?sModelsId=13
  → 200 OK. (Audit-tag mutation didn't actually land because the
  Vue model didn't pick up our scripted input change — endpoint
  flowed but with original row state.) Updated slice-01 open-
  verification item with the partial verification.

Dead-source flag (sql-templates.md):
- Two `FileSqlUtil` classes coexist. xlyFlow's loader points at the
  8 templates that exist on disk. xlyApi's loader names 7
  templates (sInSqlStrTemple, sOutSqlStrTemple, sDataSqlTmp[Def],
  sJsonSqlTmp[Out], sDbPro) — NONE of them exist as files.
  Documented as broken-by-default; either restore templates or
  remove the loader.

Auto-catalog regen verified accurate (gdsmodule.md columns match
live DB).
en/docs/api-reference/internal.md
@@ -25,6 +25,7 @@ page is the catalog of HTTP entry points. @@ -25,6 +25,7 @@ page is the catalog of HTTP entry points.
25 | `/business/addUpdateDelBusinessData` | POST | Bundled add+update+delete in one transactional call. The frontend names the target table directly via `sTable`. | 25 | `/business/addUpdateDelBusinessData` | POST | Bundled add+update+delete in one transactional call. The frontend names the target table directly via `sTable`. |
26 | `/business/getSelectDataBysControlId/{sId}` | POST | Dropdown population for a single control, by control `sId`. | 26 | `/business/getSelectDataBysControlId/{sId}` | POST | Dropdown population for a single control, by control `sId`. |
27 | `/business/getSelectLimit/{sId}` | POST | Paginated variant of the dropdown call. | 27 | `/business/getSelectLimit/{sId}` | POST | Paginated variant of the dropdown call. |
  28 +| `/business/addSysLocking` | POST | Optimistic-lock acquisition when a user starts editing a document — inserts a row in the system lock table keyed by `(sFormGuid, sUserId)`. The SPA fires this when entering edit mode so concurrent editors get a conflict warning. Handler: `BusinessBaseController.java:400-407`. |
28 29
29 These endpoints are documented in detail by [Slice 1](../slices/01-hello-world.md) 30 These endpoints are documented in detail by [Slice 1](../slices/01-hello-world.md)
30 (`getModelBysId` + grid load + save) and 31 (`getModelBysId` + grid load + save) and
@@ -82,6 +83,35 @@ get past `@Authorization`; if it does (e.g., an unannotated method), @@ -82,6 +83,35 @@ get past `@Authorization`; if it does (e.g., an unannotated method),
82 that method also bypasses the universal tenant injection in 83 that method also bypasses the universal tenant injection in
83 `RequestAddParamUtil` — and is therefore a multi-tenant bug. 84 `RequestAddParamUtil` — and is therefore a multi-tenant bug.
84 85
  86 +## BACK builder sidebar (admin surface)
  87 +
  88 +The 10 top-level items in the BACK admin sidebar (login `admin`/`123`,
  89 +edition `基础版/8s`) — each is a metadata-driven screen wired through
  90 +the framework primitives above:
  91 +
  92 +| Sidebar | URL fragment | Backing form-master `sTbName` | Owning service |
  93 +|---|---|---|---|
  94 +| 系统模块配置 (System Module Config) | `/xtmkpz` | `gdsmodule` | `GdsmoduleServiceImpl` |
  95 +| 数据表内容配置 (Virtual Table Config) | n/a | `gdsconfigtbmaster`/`slave` | `GdsconfigtbServiceImpl` |
  96 +| 界面显示内容配置 (Form Definition + Customization) | n/a | `gdsconfigformmaster`/`slave`/`customslave`/`personalize` | `GdsconfigformServiceImpl` |
  97 +| 接口自定义配置 (API Definition) | `/sjbnrpz` | `sysapi` family | (xlyApi-side admin) |
  98 +| 系统常量配置 (System Constants) | `/xtclpz` | `gdsformconst` | `GdsformconstServiceImpl` — Slice 1 anchor |
  99 +| 系统权限配置 (Permission Catalog) | n/a | `gdsjurisdiction` | `GdsjurisdictionServiceImpl` |
  100 +| 常用操作配置 (Common Operations / Button Groups) | n/a | (no entry in `gdsconfigformmaster` for this dev DB; the page is rendered as an admin special-case wired directly in the SPA — when extended via metadata, the data lives under the user-defined button-group tier) | n/a |
  101 +| 用户信息配置 (User Info) | n/a | `sftlogininfo` family | `GdslogininfoServiceImpl` |
  102 +| Mysql脚本配置 (SQL Script Authoring) | n/a | (BACK editor over the [`templesql/` scaffolds](../reference/maintainer/sql-templates.md)) | `SqlScriptsServiceImpl` |
  103 +| 图表配置 (Chart Config) | (no `gdsroute` entry; navigated via SPA state) | `gdsconfigcharmaster`/`slave` | `GdsconfigformServiceImpl` (chart subset) |
  104 +
  105 +8 of 10 are framework primitives covered elsewhere in this catalog +
  106 +the [Maintainer Reference](../reference/maintainer/management-services.md).
  107 +**`常用操作配置` is a SPA-side admin special-case** — it appears in the
  108 +sidebar without a corresponding `gdsconfigformmaster` row in the dev
  109 +DB, suggesting the page is hardcoded in BACK rather than metadata-
  110 +driven. **`图表配置`** is fully metadata-driven via two
  111 +`gdsconfigformmaster` rows pointing at `gdsconfigcharmaster` and
  112 +`gdsconfigcharslave`; chart definitions there are consumed by xly's
  113 +dashboard rendering elsewhere in the SPA.
  114 +
85 ## Coverage policy — what this catalog includes 115 ## Coverage policy — what this catalog includes
86 116
87 `xlyEntry` hosts **~71 controllers** in total. This page enumerates 117 `xlyEntry` hosts **~71 controllers** in total. This page enumerates
en/docs/concepts/modules-forms-vtables.md
@@ -100,7 +100,7 @@ any business-data table to its domain by the three-letter prefix: @@ -100,7 +100,7 @@ any business-data table to its domain by the three-letter prefix:
100 100
101 | Prefix | Domain | Sample tables (live count) | 101 | Prefix | Domain | Sample tables (live count) |
102 |---|---|---| 102 |---|---|---|
103 -| `gds` | Framework metadata (modules, forms, fields, permissions, parameters) | `gdsmodule`, `gdsconfigformmaster`, `gdsconfigformslave`, `gdsjurisdiction`, `gdsroute`, `gdsformconst`, `gdsparameter`, … | 103 +| `gds` | Framework metadata (modules, forms, fields, permissions, parameters, charts) | `gdsmodule`, `gdsconfigformmaster`, `gdsconfigformslave`, `gdsjurisdiction`, `gdsroute`, `gdsformconst`, `gdsparameter`, `gdsconfigcharmaster`/`slave` (chart definitions used by the BACK 图表配置 screen), … |
104 | `sys` | Framework system (numbering, jurisdiction grants, reports, search, billing settings) — distinct from `gds*` "definition" tier | `sysjurisdiction`, `sysbillnosettings`, `sysreport`, `syssearch`, `sysapi`, `SysSystemSettings`, … (66 tables) | 104 | `sys` | Framework system (numbering, jurisdiction grants, reports, search, billing settings) — distinct from `gds*` "definition" tier | `sysjurisdiction`, `sysbillnosettings`, `sysreport`, `syssearch`, `sysapi`, `SysSystemSettings`, … (66 tables) |
105 | `sis` | Shared lookup tables / classifiers backing dropdowns | `sisbank`, `siscolor`, `sisversionflow`, `sisjurisdictionclassify`, … (78 tables) | 105 | `sis` | Shared lookup tables / classifiers backing dropdowns | `sisbank`, `siscolor`, `sisversionflow`, `sisjurisdictionclassify`, … (78 tables) |
106 | `sft` | Login-session / group-permission link tables | `sftlogininfo*`, `sftlogininfojurisdictiongroup`, … (8 tables) | 106 | `sft` | Login-session / group-permission link tables | `sftlogininfo*`, `sftlogininfojurisdictiongroup`, … (8 tables) |
en/docs/reference/maintainer/sql-templates.md
@@ -76,6 +76,20 @@ A proc that *doesn't* follow these conventions cannot be invoked @@ -76,6 +76,20 @@ A proc that *doesn't* follow these conventions cannot be invoked
76 through generic dispatch and would have to be called from custom Java 76 through generic dispatch and would have to be called from custom Java
77 code instead. 77 code instead.
78 78
  79 +## Two loaders
  80 +
  81 +There are **two** classes named `FileSqlUtil` in the codebase, with
  82 +very different reliability:
  83 +
  84 +| Loader | What it points at | State |
  85 +|---|---|---|
  86 +| `xlyFlow/src/main/java/com/xly/sqltemplate/util/FileSqlUtil.java` | The 8 scaffolds above | **All 8 files exist** — this is the loader BACK's script-authoring screen actually uses. |
  87 +| `xlyApi/src/main/java/com/xly/api/util/FileSqlUtil.java` | 7 different template constants: `sInSqlStrTemple.sql`, `sOutSqlStrTemple.sql`, `sDataSqlTmpDef.sql`, `sDataSqlTmp.sql`, `sJsonSqlTmp.sql`, `sDbPro.sql`, `sJsonSqlTmpOut.sql` | **None of these files exist** in the live tree. The constants are dead source — likely from an older xlyApi codepath that no longer ships templates. Calls through them will throw `FileNotFoundException` at runtime. |
  88 +
  89 +A maintainer touching the `xlyApi` `FileSqlUtil` should treat it as
  90 +broken-by-default and either restore the missing templates or remove
  91 +the loader.
  92 +
79 ## See also 93 ## See also
80 94
81 - [Generic procedure dispatch](proc-dispatch.md) — how the framework 95 - [Generic procedure dispatch](proc-dispatch.md) — how the framework
en/docs/slices/01-hello-world.md
@@ -275,11 +275,17 @@ Read flow live-corroborated; save flow still pending. @@ -275,11 +275,17 @@ Read flow live-corroborated; save flow still pending.
275 `/xtmkpz` rather than navigating to `/xtclpz` — confirming that URL 275 `/xtmkpz` rather than navigating to `/xtclpz` — confirming that URL
276 fragments are display state, not route drivers (the SPA loads the 276 fragments are display state, not route drivers (the SPA loads the
277 form on demand from the sidebar click). 277 form on demand from the sidebar click).
278 -2. **A live captured save.** The endpoint, handler, and payload shape are  
279 - confirmed from source; the *body of an actual save request* hasn't been  
280 - captured. This requires writing to the dev DB and we deferred it. Closing  
281 - this means: open the module, click 新增, fill the form, click 保存, capture  
282 - the JSON body and the response. 278 +2. **A live captured save (partial).** Endpoint + URL + method
  279 + live-corroborated: clicking 新增 → 保存 in BACK's 系统常量配置 fired
  280 + `POST /xlyEntry/business/addUpdateDelBusinessData?sModelsId=13` →
  281 + 200 OK. (No DB mutation in our test because the audit-tag value
  282 + change didn't propagate through the SPA's Vue model — the save
  283 + ran on the original row state.) The exact request **body** the
  284 + SPA sends is the next thing to capture; for now the documented
  285 + shape rests on `BusinessBaseController.java:161-163` Javadoc.
  286 + The SPA also fires `POST /business/addSysLocking` when entering
  287 + edit mode (optimistic-lock) — see
  288 + [internal API](../api-reference/internal.md#the-universal-crud-surface-business).
283 3. **The exact SQL emitted by save/delete**, captured from `syslog4j` or a 289 3. **The exact SQL emitted by save/delete**, captured from `syslog4j` or a
284 MyBatis debug log, to close the loop end-to-end. 290 MyBatis debug log, to close the loop end-to-end.
285 3. ~~**`sTable` validation in `addUpdateDelBusinessData`.**~~ **CLOSED** — 291 3. ~~**`sTable` validation in `addUpdateDelBusinessData`.**~~ **CLOSED** —