update
This commit is contained in:
parent
7cbea24489
commit
82ce930416
@ -260,6 +260,13 @@ async def process_user_billing(ns={}):
|
||||
'status': 'error',
|
||||
'msg': 'llmid必传'
|
||||
}
|
||||
model_name = ns.get('model')
|
||||
if not model_name:
|
||||
debug(f"{userid} process_user_billing model必传")
|
||||
return {
|
||||
'status': 'error',
|
||||
'msg': 'model必传'
|
||||
}
|
||||
|
||||
try:
|
||||
amount = round(float(amount), 12)
|
||||
@ -275,6 +282,9 @@ async def process_user_billing(ns={}):
|
||||
async with db.sqlorContext('kboss') as sor:
|
||||
try:
|
||||
product_li = await sor.R('product', {'providerpid': llmid, 'del_flg': '0'})
|
||||
if not product_li:
|
||||
product_li = await sor.R('product', {'product_code': model_name, 'del_flg': '0'})
|
||||
|
||||
if not product_li:
|
||||
debug(f"{userid} process_user_billing 未找到对应产品,请确认")
|
||||
return {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user