修正了 property 直接取值的问题
This commit is contained in:
@@ -1490,7 +1490,7 @@ class GuanshiYaoqingDashouListView(APIView):
|
||||
# 5. 应用筛选条件
|
||||
if keyword:
|
||||
base_qs = base_qs.filter(
|
||||
Q(nicheng__icontains=keyword) | Q(user__yonghuid__icontains=keyword)
|
||||
Q(nicheng__icontains=keyword) | Q(user__UserUID__icontains=keyword)
|
||||
)
|
||||
if zhanghaozhuangtai is not None:
|
||||
try:
|
||||
@@ -3136,7 +3136,7 @@ class AdGuanLiYongHu(APIView):
|
||||
|
||||
if keyword:
|
||||
queryset = queryset.filter(
|
||||
Q(user__yonghuid__icontains=keyword) |
|
||||
Q(user__UserUID__icontains=keyword) |
|
||||
Q(nickname__icontains=keyword)
|
||||
)
|
||||
|
||||
@@ -3178,7 +3178,7 @@ class AdGuanLiYongHu(APIView):
|
||||
|
||||
if keyword:
|
||||
queryset = queryset.filter(
|
||||
Q(user__yonghuid__icontains=keyword) |
|
||||
Q(user__UserUID__icontains=keyword) |
|
||||
Q(nicheng__icontains=keyword) |
|
||||
Q(chenghao__icontains=keyword)
|
||||
)
|
||||
@@ -3224,7 +3224,7 @@ class AdGuanLiYongHu(APIView):
|
||||
|
||||
if keyword:
|
||||
queryset = queryset.filter(
|
||||
Q(user__yonghuid__icontains=keyword)
|
||||
Q(user__UserUID__icontains=keyword)
|
||||
)
|
||||
|
||||
# 获取总数
|
||||
@@ -3266,7 +3266,7 @@ class AdGuanLiYongHu(APIView):
|
||||
|
||||
if keyword:
|
||||
queryset = queryset.filter(
|
||||
Q(user__yonghuid__icontains=keyword) |
|
||||
Q(user__UserUID__icontains=keyword) |
|
||||
Q(nicheng__icontains=keyword)
|
||||
)
|
||||
|
||||
@@ -7074,7 +7074,7 @@ class KefuGetOrderListView(APIView):
|
||||
nickname_map = {}
|
||||
if laoban_ids:
|
||||
users = User.query.filter(UserUID__in=laoban_ids).select_related('boss_profile').only(
|
||||
'yonghuid', 'boss_profile__nickname'
|
||||
'UserUID', 'boss_profile__nickname'
|
||||
)
|
||||
for user in users:
|
||||
nickname_map[user.yonghuid] = user.boss_profile.nickname or '' if hasattr(user, 'boss_profile') else ''
|
||||
@@ -7205,7 +7205,7 @@ class KefuGetShangjiaOrderListView(APIView):
|
||||
# 通过商家扩展表关联 UserShangjia 的昵称
|
||||
q_conditions &= Q(shangjia_kuozhan__shangjia_id__in=User.query.filter(
|
||||
shop_profile__nicheng__icontains=shangjia_nicheng
|
||||
).values_list('yonghuid', flat=True))
|
||||
).values_list('UserUID', flat=True))
|
||||
|
||||
# ---------- 统计(仅按发单平台,非跨平台) ----------
|
||||
stats = Dingdan.query.filter(fadan_pingtai=2).aggregate(
|
||||
@@ -7243,7 +7243,7 @@ class KefuGetShangjiaOrderListView(APIView):
|
||||
nickname_map = {}
|
||||
if shangjia_ids:
|
||||
users = User.query.filter(UserUID__in=shangjia_ids).select_related('shop_profile').only(
|
||||
'yonghuid', 'shop_profile__nicheng'
|
||||
'UserUID', 'shop_profile__nicheng'
|
||||
)
|
||||
for user in users:
|
||||
nickname_map[user.yonghuid] = user.shop_profile.nicheng or '' if hasattr(user, 'shop_profile') else ''
|
||||
@@ -8396,7 +8396,7 @@ class KefuGetDashouListView(APIView):
|
||||
if keyword:
|
||||
# 搜索用户ID或打手昵称
|
||||
queryset = queryset.filter(
|
||||
Q(user__yonghuid__icontains=keyword) |
|
||||
Q(user__UserUID__icontains=keyword) |
|
||||
Q(nicheng__icontains=keyword)
|
||||
)
|
||||
|
||||
@@ -10411,9 +10411,9 @@ class AdKfglView(APIView):
|
||||
|
||||
if keyword:
|
||||
queryset = queryset.filter(
|
||||
#Q(user__yonghuid__icontains=keyword) |
|
||||
#Q(user__UserUID__icontains=keyword) |
|
||||
Q(nicheng__icontains=keyword) |
|
||||
Q(user__phone__icontains=keyword)
|
||||
Q(user__Phone__icontains=keyword)
|
||||
)
|
||||
|
||||
# 4. 构建返回数据
|
||||
|
||||
Reference in New Issue
Block a user