24 Commits

Author SHA1 Message Date
Hermes Agent
f05eea19e5 fix: remove parent_id default '0' from product_category model - Root nodes should have parent_id=NULL, not '0' - Tree query already checks 'parent_id IS NULL' - Revert direct edits to generated dspy files 2026-06-22 14:03:41 +08:00
Hermes Agent
f13651e830 fix: product_category tree root node query + parent_id normalization - get_product_category: accept NULL/empty/'0' as root (parent_id IS NULL OR '' OR '0') - new_product_category: normalize empty/0 parent_id to NULL 2026-06-22 13:59:18 +08:00
Hermes Agent
24605f88e8 fix: datetime->timestamp for audit fields + fix sor.U/sor.I misuse in core.py and API dspy
- All 7 models: created_at/updated_at changed from datetime to timestamp type
  (DDL template auto-generates DEFAULT CURRENT_TIMESTAMP for timestamp type)
- core.py: fix all sor.U() calls passing 3 args (id must be in data dict)
- core.py: fix sor.I() misuse for INSERT (should be sor.C())
- API dspy updates: fix sor.U() 3-arg bug in category/product/type_config/resource/subscription/supplier
- product_resource_supplier_update.dspy: add missing updated_at field
2026-06-22 11:04:46 +08:00
Hermes Agent
26d374919c feat: 菜单增加新增功能入口
- 产品资源绑定管理
- 资源供应商关联管理
- 客户订购管理
- 产品消费记录查询
2026-06-21 11:44:59 +08:00
Hermes Agent
0e79ddc939 fix: CRUD JSON合规格式(tblname+params) + CRUD create/update/delete dspy + load_path更新
- 5个CRUD JSON从自定义格式重写为规范格式(tblname/alias/params)
- 13个新CRUD dspy文件(create/update/delete + noop)
- product_resource_delete含级联删除product_resource_supplier
- product_subscription CRUD含完整校验
- product_usage_log只读(noop dspy)
- load_path.py注册所有新增API和CRUD路径
2026-06-21 11:40:33 +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
79e8a5fa69 feat: add i18n translations (zh/en/jp/ko) for all modules 2026-06-19 15:01:36 +08:00
Hermes Agent
bbaa51fcef fix: 补充CRUD自动生成端点的created_at/updated_at时间戳 2026-06-17 17:57:22 +08:00
Hermes Agent
6bf45a2dfc fix: remove imports and use pre-loaded timestampstr/getID in create dspy files
- product_category_create.dspy: removed import json/time/getID, replaced time.strftime with timestampstr(), removed field filter, pass data directly to sor.C()
- product_create.dspy: removed imports, replaced time.strftime with timestampstr()
- product_type_config_create.dspy: removed imports, replaced time.strftime with timestampstr()
2026-06-17 17:49:47 +08:00
Hermes Agent
1bb7c948d6 fix: codes段cond条件改用parentid替代id 2026-06-17 17:35:33 +08:00
Hermes Agent
f1a35163b3 fix: 添加browserfields空对象避免xls2ui报错 2026-06-17 17:28:44 +08:00
Hermes Agent
57767bed4b chore: 添加json/build.sh脚本 2026-06-17 17:26:26 +08:00
Hermes Agent
014d6e593d fix: 产品类别树排除product_type_title编辑,移除冗余alters(框架自动从codes生成) 2026-06-17 17:21:08 +08:00
Hermes Agent
8fda537caa fix: menu and index.ui point directly to CRUD lists instead of iframe wrappers 2026-06-17 16:14:50 +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
82b494ecd9 fix: wrap Tabular in VBox with cheight for proper scrolling 2026-05-29 22:09:54 +08:00
235412c9f7 fix: remove hardcoded dark theme colors for light theme support 2026-05-28 16:16:05 +08:00
5d6538b7d3 refactor: dark theme 3-part layout with filler scrollable content 2026-05-26 14:07:11 +08:00
43787a63a4 fix: spec compliance pass - ServerEnv removal in .dspy, core.py DBPools singleton, scripts/load_path.py
- All .dspy files: replace ServerEnv() org_id access with await get_userorgid()
  (get_userorgid is registered as global in ahserver processorResource)
- core.py: simplify _get_db to use DBPools() singleton directly (DBPools is @SingletonDecorator)
  remove unnecessary db.databases = config.databases assignment
- core.py: add MODULE_NAME constant, use env.get_module_dbname(MODULE_NAME) pattern
- Create scripts/load_path.py with all RBAC paths per module-development-spec
  Covers: entry pages, feature .ui files, CRUD directories, all API .dspy endpoints
- .gitignore: add __pycache__/ exclusion
- All models/*.json and json/*.json pass spec validation checks
2026-05-25 17:03:08 +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
6b37adc92d fix: build.sh symlink generated CRUD directories to Sage wwwroot 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
e90653bc29 Initial commit 2026-05-25 16:39:42 +08:00