签入版本
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# 6.12 字典管理
|
||||
|
||||
:::tip 概述
|
||||
字典管理页维护 gin_dict + gin_dict_item 两表:字典定义与字典项。它是字典机制([5.11 字典模块](/zh/core/dict.html))的数据维护入口,变更自动联动缓存失效。
|
||||
:::
|
||||
|
||||
## 功能清单
|
||||
|
||||
### 字典(dict)
|
||||
|
||||
| 接口 | 说明 |
|
||||
|---|---|
|
||||
| Page / Detail / Add / Update / Delete / BatchDelete | 字典定义维护 |
|
||||
| RefreshCache | 手动刷新字典缓存(运维兜底) |
|
||||
| AliasList / AliasInfo | 按别名批量/单个取字典项(业务侧常用入口) |
|
||||
|
||||
### 字典项(dict_item)
|
||||
|
||||
| 接口 | 说明 |
|
||||
|---|---|
|
||||
| Page / Detail / Add / Update / Delete / BatchDelete | 字典项维护 |
|
||||
| QuickList | 按字典编码快速取全部字典项(前端下拉数据源) |
|
||||
|
||||
## 缓存联动
|
||||
|
||||
字典项变更(Add/Update/Delete/BatchDelete)自动删除对应 `dict:{code}` 缓存键,下次读取回源重建——管理页保存即生效,无需重启。RefreshCache 用于缓存异常时的手动兜底。
|
||||
|
||||
## 字典项变更的影响面
|
||||
|
||||
字典值改动会即时影响:
|
||||
|
||||
- 后端 SerializeMaps 回填的 `{field}Text` 显示名
|
||||
- 前端下拉/标签的选项文案
|
||||
- 导出文件中的翻译列
|
||||
|
||||
改字典前评估正在使用的模块(尤其对外导出格式)。
|
||||
|
||||
## 管理界面
|
||||
|
||||
`data/dict`:字典列表 + 明细面板(字典项行内维护 + 排序 + 启停)。
|
||||
|
||||
## 相关
|
||||
|
||||
- [5.11 字典模块](/zh/core/dict.html)(机制)
|
||||
- [8.6 字典数据接口](/zh/api-spec/dict-api.html)(契约)
|
||||
Reference in New Issue
Block a user