|
|
d7fe217fc6
|
docs: 补全 README(storres_表/meter_mode定价映射/容量采样汇总出账/直购)
|
2026-09-07 11:42:17 +08:00 |
|
ymq
|
577f1f1561
|
feat(purchase): 一次性直购计费 storage_direct_charging(选A购买即记账)
存储买断模式:不依赖采样,按购买容量×月数直接计费出账。
- storage_direct_charging(spec, storage_gb, valid_months):package定价×月数
- calculate_product_cost 支持 direct 模式复用 package 定价 + 月数乘法
- 注册 env.storage_direct_charging + __init__ 导出
|
2026-08-27 10:40:53 +08:00 |
|
ymq
|
3e6f448a39
|
fix(pricing): storage_charging 用错定价函数——pricing_program_charging(三参) 改 buffered_charging(两参)
buffered_charging 返回价格对象列表,需 sum(getattr(p,'amount',0)) 汇总。
原用 pricing_program_charging=charging(sor,ppid,data) 三参,传两参导致
'missing 1 required positional argument: data',存储计费金额恒为 0。
|
2026-08-26 17:33:04 +08:00 |
|
ymq
|
7f586a9b12
|
feat(entitlement): execute_product_service 返回存储容量配额信息
|
2026-08-26 17:17:23 +08:00 |
|
ymq
|
86cafaadfd
|
refactor: calculate_product_cost 去掉客户级折扣,只算原价
折扣移到产品层按 product_id 精确计算(产品级折扣)。资源层不碰折扣。
|
2026-08-26 16:04:44 +08:00 |
|
ymq
|
b81d1e0bfc
|
feat(discount): calculate_product_cost 接入客户折扣
成交价 = 资源真实定价 × 客户折扣(照 llmage 范式 get_customer_discount)
返回 amount(成交价)/original_amount(原价)/discount(折扣率)
|
2026-08-26 15:47:00 +08:00 |
|
ymq
|
22e5e49a83
|
fix: product_interface import 补 spec_list 函数
|
2026-08-26 15:40:30 +08:00 |
|
ymq
|
3fb367c61e
|
feat(product_interface): 实现 product_management 资源模块接口
参照 llmage/product_interface.py 范式:
- load_product_category_product(): 返回类别+产品标准数据,供产品导入
- get_product_display/check_product_availability/check_product_consumable
/execute_product_service/execute_product_service_stream/calculate_product_cost
- load_xxx() 设置 env.product_interface
- calculate_product_cost 按 charge_mode/meter_mode 解析 ppid → buffered_charging 计费
- 延迟导入避免与 init 循环 import
|
2026-08-26 15:39:02 +08:00 |
|
ymq
|
846e2dec0d
|
fix(crud): json 定义改为 xls2ui 真实格式
browserfields 必须是对象 {exclouded:[], cwidth:{}},写成数组会让 xls2ui 崩:
AttributeError: 'list' object has no attribute 'alters'
崩溃点之后的表全部不生成 → 页面 500 invalid path。
格式对照 pipeline_core/json/llm.json。
|
2026-08-26 15:00:43 +08:00 |
|
ymq
|
04b1b19b94
|
feat: storage_resource 资源模块
参照 llmage 范式(llm主表无ppid + llm_api_map挂ppid + llmusage计费六件套):
- 资源主表不带 ppid,定价挂在「资源×用法」映射表上
- 对外统一 resolve_ppid(resource_ref_id, ctx),load 时注册到产品层解析器注册表
- 含 models 四段式/json CRUD/i18n四语言/load_path/init 种子数据
|
2026-08-26 14:51:29 +08:00 |
|
|
|
b174a1a169
|
Initial commit
|
2026-08-26 14:50:17 +08:00 |
|