fix(build): xls2ui清单改动态扫描pkgs/*/json——根治discount漏列致折扣管理4子菜单500(同款坑pricing后第二次)
This commit is contained in:
parent
58b37588f4
commit
e249ed983b
25
build.sh
25
build.sh
@ -94,17 +94,20 @@ if [ -d "pkgs/pipeline_core/skills_library" ]; then
|
||||
fi
|
||||
|
||||
# 7. Regenerate CRUD from json for all pipeline modules
|
||||
# 注意:凡 json/ 下有 CRUD 定义的模块都必须在列——漏掉则页面从未生成,
|
||||
# 菜单点进去 500(fpath is None)。pricing 曾因遗漏导致定价管理 500。
|
||||
for mod in appbase pipeline_core pipeline_ops pipeline_dist pipeline-sdlc rbac dapi accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain pipeline-bidding pricing pipeline-llm pipeline-opportunity; do
|
||||
json_dir="pkgs/$mod/json"
|
||||
models_dir="pkgs/$mod/models"
|
||||
wwwroot_dir="pkgs/$mod/wwwroot"
|
||||
if [ -d "$json_dir" ] && ls "$json_dir"/*.json >/dev/null 2>&1; then
|
||||
cd "$json_dir"
|
||||
"$cdir/py3/bin/xls2ui" -m "../models" -o "../wwwroot" "$mod" *.json 2>&1 | grep -c 'handle' | xargs -I{} echo " xls2ui $mod: {} tables"
|
||||
cd "$cdir"
|
||||
fi
|
||||
# 历史事故(硬编码清单两次漏项,均致菜单 500 "fpath is None"):
|
||||
# - pricing 漏列 → 定价管理 500(2026-08)
|
||||
# - discount 漏列 → 折扣管理 4 个子菜单全 500(2026-09-09,
|
||||
# discount_list/discount_marketing_list/discount_promo_code_list/discount_customer_bind_list
|
||||
# 从未生成;生成目录在模块 .gitignore 内,只能由部署机生成)
|
||||
# 根治:不再维护硬编码清单,动态扫描 pkgs/*/json/*.json——凡有 CRUD 定义的模块一律生成。
|
||||
# evaluate 例外天然成立:其 json 嵌套在包内(evaluate/evaluate/),不在 pkgs/evaluate/json,扫不到。
|
||||
for json_dir in "$cdir"/pkgs/*/json; do
|
||||
[ -d "$json_dir" ] || continue
|
||||
ls "$json_dir"/*.json >/dev/null 2>&1 || continue
|
||||
mod=$(basename "$(dirname "$json_dir")")
|
||||
cd "$json_dir"
|
||||
"$cdir/py3/bin/xls2ui" -m "../models" -o "../wwwroot" "$mod" *.json 2>&1 | grep -c 'handle' | xargs -I{} echo " xls2ui $mod: {} tables"
|
||||
cd "$cdir"
|
||||
done
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user