product_management/wwwroot/api/product_subscription_delete.dspy
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

17 lines
669 B
Plaintext

result = {'widgettype': 'Message', 'options': {'title': 'Error', 'message': 'Invalid', 'type': 'error'}}
try:
dbname = get_module_dbname('product_management')
record_id = params_kw.get('id')
if not record_id:
raise ValueError('Missing id')
async with DBPools().sqlorContext(dbname) as sor:
await sor.D('product_subscription', {'id': record_id})
result = {'widgettype': 'Message', 'options': {'title': 'Success', 'message': '订购已删除', 'type': 'success'}}
except Exception as e:
result['options'] = {'title': 'Error', 'message': '删除失败: ' + str(e), 'type': 'error'}
return json.dumps(result, ensure_ascii=False)