From d4fbeeda86632717003e92fd2e32d93bcdab30a9 Mon Sep 17 00:00:00 2001 From: FamousMai <906631095@qq.com> Date: Tue, 15 Apr 2025 19:30:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3api=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/controllers/service_api/wraps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/controllers/service_api/wraps.py b/api/controllers/service_api/wraps.py index a25c1e460..8160d95d7 100644 --- a/api/controllers/service_api/wraps.py +++ b/api/controllers/service_api/wraps.py @@ -97,7 +97,7 @@ def validate_app_token(view: Optional[Callable] = None, *, fetch_user_arg: Optio # TODO 需要写入缓存,读缓存 account_money = ( db.session.query(AccountMoneyExtend) - .filter(AccountMoneyExtend.account_id == tenant_account_join.account_id) + .filter(AccountMoneyExtend.account_id == ta.account_id) .first() ) if account_money and account_money.used_quota >= account_money.total_quota: @@ -147,7 +147,7 @@ def validate_app_token(view: Optional[Callable] = None, *, fetch_user_arg: Optio # ---------------------二开部分Begin 额度限制,API调用计费 --------------------- if kwargs.get("end_user"): create_or_update_end_user_account_join_extend( - kwargs["end_user"].id, tenant_account_join.account_id, app_model.id + kwargs["end_user"].id, ta.account_id, app_model.id ) # ---------------------二开部分End 额度限制,API调用计费 ---------------------