feat(api): A4 数据字典与系统配置后端
背景:A4 需要字典三层合并、配置单一来源与阈值同源。\n改动:新增 catalog 模块(类型/条目/三层合并/编码不可改/快照工具);platform 新增 SystemConfigService/Controller、NamingService 与配置版本历史;roles/users/customers/customer-fields 改为读 system_configs 上限。\n影响面:新增 13 个 REST 端点与 4 个模块注入;system_configs 写入走事务/乐观锁/版本历史;OpenAPI 快照更新。\n回滚:回滚本提交并恢复 shared 契约;新增表可保留。\n验证:api typecheck/build;单测 137;集成 58;OpenAPI diff 无破坏性变更。
This commit is contained in:
1 parent
cc6e84cdbc
commit
e4330a43e4
25 files changed
+4189
-30
No files matched your search
@@ -922,6 +922,256 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/dicts": {
|
||||
"get": {
|
||||
"operationId": "DictsController_list",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "字典类型列表(分组顺序 + 排序;含条目 / 行业层统计)",
|
||||
"tags": [
|
||||
"catalog-dicts"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "DictsController_create",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "新建字典类型(编码唯一;builtin=false)",
|
||||
"tags": [
|
||||
"catalog-dicts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/dicts/{code}": {
|
||||
"get": {
|
||||
"operationId": "DictsController_detail",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "字典类型详情(不存在 40401)",
|
||||
"tags": [
|
||||
"catalog-dicts"
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"operationId": "DictsController_update",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "更新字典类型(编码 / 形态 / 行业作用域不可改)",
|
||||
"tags": [
|
||||
"catalog-dicts"
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"operationId": "DictsController_remove",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "删除自定义字典类型(内置 / 有子条目时不可删)",
|
||||
"tags": [
|
||||
"catalog-dicts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/dicts/{code}/status": {
|
||||
"patch": {
|
||||
"operationId": "DictsController_setStatus",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "启用 / 停用字典类型(内置类型允许停用)",
|
||||
"tags": [
|
||||
"catalog-dicts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/dicts/{code}/items": {
|
||||
"get": {
|
||||
"operationId": "DictsController_listItems",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "生效条目列表(industry_id 三层合并;非行业类型忽略该参数)",
|
||||
"tags": [
|
||||
"catalog-dicts"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "DictsController_createItem",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "新建字典条目(编码 / 父级 / 行业校验;编码创建后不可改)",
|
||||
"tags": [
|
||||
"catalog-dicts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/dicts/{code}/items/{itemId}": {
|
||||
"patch": {
|
||||
"operationId": "DictsController_updateItem",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "更新字典条目(仅名称 / 排序 / 启停 / 备注)",
|
||||
"tags": [
|
||||
"catalog-dicts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/system/configs": {
|
||||
"get": {
|
||||
"operationId": "SystemConfigController_list",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "全量系统配置(定义元数据 + 当前值 / 版本)",
|
||||
"tags": [
|
||||
"platform-system-configs"
|
||||
]
|
||||
},
|
||||
"put": {
|
||||
"operationId": "SystemConfigController_update",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "批量保存配置(乐观锁 expectedVersion;写版本历史与审计)",
|
||||
"tags": [
|
||||
"platform-system-configs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/system/configs/effective": {
|
||||
"get": {
|
||||
"operationId": "SystemConfigController_effective",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "生效配置(仅登录;只返回 public 项,前端上限读取入口)",
|
||||
"tags": [
|
||||
"platform-system-configs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/system/configs/history": {
|
||||
"get": {
|
||||
"operationId": "SystemConfigController_history",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "配置变更记录(按变更时间倒序;操作人为用户姓名)",
|
||||
"tags": [
|
||||
"platform-system-configs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/health": {
|
||||
"get": {
|
||||
"description": "真实检查 PostgreSQL 与 Redis;任一不可用返回 503 与统一错误体。",
|
||||
|
||||
Reference in new issue
Block a user