8 Commits

Author SHA1 Message Date
275806c1cc fix(product): 账号/存储产品展示缺失——建树KeyError+幽灵列+IN占位符三处修复
根因链(2026-09-06):
1. core.get_category_tree 单遍建树隐含「父节点排序在子前」假设:
   子类别 sort_order=0 < 顶级 10/20,ORDER BY 后子先处理,
   parent['children'].append 时父未初始化 → KeyError → storefront 500
2. storefront get_products.dspy SELECT p.icon——product 表无 icon 列 → 1054
3. 同文件 IN 占位符 f'${key}$' 生成 $cid_0$(缺花括号)sqlor 不识别

配套:init/data.json resource_module 字典补 account_resource/storage_resource
(类别编辑下拉可选),product_type 字典对应项由测试库同步补充。

数据:测试库已建账号资源/存储资源顶级类别并执行导入
(账号3产品:试用7天/月租/年租;存储1产品:工作空间标准存储)。
2026-09-06 14:03:44 +08:00
8f3bd268ad feat(product): 产线模型产品化接入——product_accounting_generic暴露到env(独立记账进程调用)+resource_module种子加pipeline_llm 2026-09-04 19:32:42 +08:00
Hermes Agent
0f321b8185 feat: add resource_module field and import sub-categories/products tool
- Add resource_module field to product_category model (stores module name like 'llmage')
- Add resource_module appcode with llmage/supplychain entries to init/data.json
- Add '添加子产品类和产品导入' toolbar tool to tree CRUD (json + generated index.ui)
- Create import_category_products.dspy API endpoint
- Add import_categories_and_products() generic import engine to core.py
- Register import function on ServerEnv
- Update load_path.py with new API endpoint
2026-06-23 13:47:05 +08:00
Hermes Agent
e8860401bc feat: 产品模块完整功能实现 — 资源绑定/多供应商路由/包月订购/消耗引擎/成本计算
新增模型: product_resource, product_resource_supplier, product_subscription, product_usage_log
新增API: 15个.dspy端点(资源绑定/供应商管理/订购/超额/消耗/统计)
新增UI: 4个管理界面(资源绑定/供应商关联/订购管理/消费记录)
核心逻辑: ProductManager新增 bind/unbind/subscribe/product_use/check_quota 等完整业务方法
设计文档: DESIGN.md 完整架构规范
2026-06-20 12:10:32 +08:00
Hermes Agent
9dcef6a1a9 fix: 修正appcodes_kv数据格式,id唯一且parentid指向appcodes 2026-06-17 15:35:55 +08:00
Hermes Agent
e3df4132cb feat: 补充enabled_flg编码字典到init/data.json 2026-06-17 15:22:26 +08:00
4fd136bf53 refactor: reseller org_id isolation for product_management module
- product_category: org_id scoped tree, product_table_name -> product_type
- product: org_id scoped, added extra_json for custom attributes, product_type field
- product_type_config: org_id + operator_id dual isolation, unique key on (org_id, operator_id, category_id, config_name)
- All 18 API endpoints enforce org_id filtering via ServerEnv
- core.py: all methods accept optional org_id, default to current user's org
- CRUD definitions: logined_userorgid set to org_id on all lists
- init/data.json: removed hardcoded global categories (managed per reseller)
- Rebuilt mysql.ddl.sql and all CRUD UI files
2026-05-25 17:03:08 +08:00
d1ceed9cb9 feat: initial product_management module - category tree, product registry, operator config, standardized API 2026-05-25 17:03:08 +08:00