pzb 6 年之前
父節點
當前提交
f3372b6333
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Controller/UserBrandController.py

+ 2 - 1
Controller/UserBrandController.py

@@ -249,6 +249,7 @@ class UserBrandInfo(View):
     # 区域统计的接口
     def query_area_info(self, request_dict, userID,response):
         check_perm = ModelService.check_perm(userID=userID,permID=30)
+        district = request_dict.get('district', None)
         if check_perm is True:
             # 按照用户去重复查询
             user_brand_queryset = User_Brand.objects.all().order_by('userID').values_list('userID', flat=True).distinct()
@@ -264,7 +265,7 @@ class UserBrandInfo(View):
                 send_jsons.append(user_brand_querysetlast["datas"][0])
             deviceSupplier=[]
             for k, v in enumerate(send_jsons):
-                deviceSupplier.append(v['fields']['city'])
+                deviceSupplier.append(v['fields'][district])
             deviceSupplier = Counter(deviceSupplier)
             deviceSupplier = deviceSupplier