From 82ce930416994c2119416caed713e976f8d7aede Mon Sep 17 00:00:00 2001 From: ping <1017253325@qq.com> Date: Fri, 5 Jun 2026 17:58:11 +0800 Subject: [PATCH] update --- b/cntoai/process_user_billing.dspy | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/b/cntoai/process_user_billing.dspy b/b/cntoai/process_user_billing.dspy index 2dc2e17..dc8c87a 100644 --- a/b/cntoai/process_user_billing.dspy +++ b/b/cntoai/process_user_billing.dspy @@ -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 {