From 5b9436b99448a9d21162705edf3d915e4d469b99 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Fri, 19 Jun 2026 00:08:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=20User=20=E8=A1=A8?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/view.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/view.py b/backend/view.py index b40cc4e..fe10864 100644 --- a/backend/view.py +++ b/backend/view.py @@ -800,7 +800,7 @@ class KefuGetDashouDetailView(APIView): # 4. 查询打手主表和扩展表 try: user_main = User.query.select_related('dashou_profile').get( - yonghuid=uid + UserUID=uid ) except User.DoesNotExist: return Response({'code': 404, 'msg': '打手不存在'}) @@ -957,7 +957,7 @@ class KefuGetDashouDetailView(APIView): try: # 使用 select_related 预加载 dashou_profile,减少数据库查询 user_main = User.query.select_related('dashou_profile').get( - yonghuid=uid + UserUID=uid ) except User.DoesNotExist: return Response({'code': 404, 'msg': '打手不存在'}, status=status.HTTP_404_NOT_FOUND) @@ -2888,7 +2888,7 @@ class GetGuanliListView(APIView): # 关键词搜索(用户ID 或 昵称来自 boss_profile.nickname) if keyword: qs = qs.filter( - Q(yonghuid__icontains=keyword) | + Q(UserUID__icontains=keyword) | Q(boss_profile__nickname__icontains=keyword) )