This commit is contained in:
yumoqing 2026-01-06 16:58:17 +08:00
parent f9681c22ce
commit 190fb2e463

View File

@ -15,11 +15,15 @@ async def checkCustomerBalance(llmid, userorgid):
e = Exception(f'llm({llmid}) not exists')
exception(f'{e}')
raise e
if llms[0].ownerid == userorgid:
llm = llms[0]
if llm.ownerid == userorgid:
return True
balance = await getCustomerBalance(sor, userorgid)
if balance is None: balance = 0.00
return llms[0].ppid and llms[0].min_balance < balance
if balance is None:
balance = 0.00
if llm.min_balance is None:
llm.min_balance = 0.00
return llm.ppid and llm.min_balance < balance
return False
async def llm_accounting(request, llmid,