From 4ded4ea50ac17cd27897a33e83882d1140c07d17 Mon Sep 17 00:00:00 2001 From: XingQue Date: Sat, 20 Jun 2026 00:44:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AE=A1=E7=90=86=E5=91=98=E6=8D=A2?= =?UTF-8?q?=E6=89=93=E6=89=8B=E8=B7=B3=E8=BF=87=E5=AE=A2=E6=9C=8D=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/view.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/view.py b/backend/view.py index 141a685..79ad357 100644 --- a/backend/view.py +++ b/backend/view.py @@ -8135,11 +8135,12 @@ class ZxkfghdsView(APIView): except Exception as e: logger.error(f"打手每日统计更新失败: {e}") - # 5.5 客服处理统计 - kefu.jinrichuli += 1 - kefu.jinyuechuli += 1 - kefu.zongchuli += 1 - kefu.save() + # 5.5 客服处理统计(管理员无 KefuProfile,跳过) + if hasattr(kefu, 'jinrichuli'): + kefu.jinrichuli += 1 + kefu.jinyuechuli += 1 + kefu.zongchuli += 1 + kefu.save() # 至此,原订单已退款,事务提交