From 45ce0183d87f0e624ed00e70c57914df8bc24a36 Mon Sep 17 00:00:00 2001 From: XingQue Date: Thu, 9 Jul 2026 04:43:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20/merchant-staff/me?= =?UTF-8?q?=20=E6=AF=8F=E6=AC=A1=E8=AF=B7=E6=B1=82=E5=85=A8=E9=87=8F?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=A7=92=E8=89=B2=E6=9D=83=E9=99=90=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=204s=20=E5=8D=A1=E9=A1=BF=E6=8B=96=E5=9E=AE?= =?UTF-8?q?=20worker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- merchant_ops/views_staff.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/merchant_ops/views_staff.py b/merchant_ops/views_staff.py index 8992918..7fc8e8c 100644 --- a/merchant_ops/views_staff.py +++ b/merchant_ops/views_staff.py @@ -84,6 +84,7 @@ class StaffBindView(APIView): shangjia = UserShangjia.query.filter(user__UserUID=inv.merchant_id).first() if ctx and shangjia: ctx['merchant_display'] = {'nicheng': shangjia.nicheng, 'merchant_id': inv.merchant_id} + ensure_merchant_roles(inv.merchant_id) audit_staff(member, 'STAFF_BIND', request, resource_id=invite_code) return Response({'code': 0, 'msg': '绑定成功', 'data': {'staff_context': ctx}}) except MerchantStaffInvite.DoesNotExist: @@ -101,9 +102,6 @@ class StaffMeView(APIView): if not ctx: return Response({'code': 404, 'msg': '非子客服身份', 'data': None}) member = get_active_staff_member(request.user) - ensure_merchant_roles(member.merchant_id) - member.refresh_from_db() - ctx = resolve_staff_context(request.user) shangjia = UserShangjia.query.filter(user__UserUID=member.merchant_id).first() ctx['merchant_display'] = { 'nicheng': shangjia.nicheng if shangjia else '',