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