Compare commits
2 Commits
9ea13564ef
...
66db401fcb
| Author | SHA1 | Date | |
|---|---|---|---|
| 66db401fcb | |||
| 8e2c701e23 |
@ -38,10 +38,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"editexclouded": ["id", "created_by", "created_at", "updated_at", "org_id"],
|
"editexclouded": ["id", "created_by", "created_at", "updated_at", "org_id"],
|
||||||
"editable": {
|
"new_data_url": "{{entire_url('/product_management/api/product_create.dspy')}}",
|
||||||
"new_data_url": "{{entire_url('../api/product_create.dspy')}}",
|
"update_data_url": "{{entire_url('/product_management/api/product_update.dspy')}}",
|
||||||
"update_data_url": "{{entire_url('../api/product_update.dspy')}}",
|
"delete_data_url": "{{entire_url('/product_management/api/product_delete.dspy')}}"
|
||||||
"delete_data_url": "{{entire_url('../api/product_delete.dspy')}}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1456,7 +1456,7 @@ WHERE resource_ref_id = ${llm_id}$ AND product_type = 'llm_model' LIMIT 1"""
|
|||||||
# PAY*: owner → supplier, amount = raw_cost * supplier_discount
|
# PAY*: owner → supplier, amount = raw_cost * supplier_discount
|
||||||
supplier_amount = raw_cost * last_link_discount
|
supplier_amount = raw_cost * last_link_discount
|
||||||
accounting_items.append(DictObject(
|
accounting_items.append(DictObject(
|
||||||
action='PAY*', customerid=ownerid, resellerid=providerid,
|
action='PAY*', customerid=ownerid, resellerid=ownerid,
|
||||||
providerid=providerid, biz_date=biz_date, timestamp=timestamp,
|
providerid=providerid, biz_date=biz_date, timestamp=timestamp,
|
||||||
productid=product_id, transamt=supplier_amount,
|
productid=product_id, transamt=supplier_amount,
|
||||||
currency=prod_currency, base_amount=cost_base,
|
currency=prod_currency, base_amount=cost_base,
|
||||||
@ -1492,7 +1492,7 @@ WHERE resource_ref_id = ${llm_id}$ AND product_type = 'llm_model' LIMIT 1"""
|
|||||||
# Final PAY*: top of chain → supplier
|
# Final PAY*: top of chain → supplier
|
||||||
supplier_amount = raw_cost * last_link_discount
|
supplier_amount = raw_cost * last_link_discount
|
||||||
accounting_items.append(DictObject(
|
accounting_items.append(DictObject(
|
||||||
action='PAY*', customerid=chain[0], resellerid=providerid,
|
action='PAY*', customerid=chain[0], resellerid=chain[0],
|
||||||
providerid=providerid, biz_date=biz_date, timestamp=timestamp,
|
providerid=providerid, biz_date=biz_date, timestamp=timestamp,
|
||||||
productid=product_id, transamt=supplier_amount,
|
productid=product_id, transamt=supplier_amount,
|
||||||
currency=prod_currency, base_amount=cost_base,
|
currency=prod_currency, base_amount=cost_base,
|
||||||
|
|||||||
@ -3,6 +3,8 @@ ns = params_kw.copy()
|
|||||||
|
|
||||||
|
|
||||||
userorgid = await get_userorgid()
|
userorgid = await get_userorgid()
|
||||||
|
userid = await get_user()
|
||||||
|
info(f'[get_product] userorgid={userorgid} userid={userid} ns_keys={list(ns.keys())[:10]}')
|
||||||
if not userorgid:
|
if not userorgid:
|
||||||
return {
|
return {
|
||||||
"widgettype":"Error",
|
"widgettype":"Error",
|
||||||
@ -16,6 +18,7 @@ if not userorgid:
|
|||||||
}
|
}
|
||||||
ns['org_id'] = userorgid
|
ns['org_id'] = userorgid
|
||||||
ns['userorgid'] = userorgid
|
ns['userorgid'] = userorgid
|
||||||
|
del ns['org_id'] # 防止 default_filterjson 生成 AND org_id=... 抵消 OR 子查询
|
||||||
|
|
||||||
debug(f'get_product.dspy:{ns=}')
|
debug(f'get_product.dspy:{ns=}')
|
||||||
if not ns.get('page'):
|
if not ns.get('page'):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user