瀏覽代碼

添加搜索

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

+ 24 - 1
Controller/UserBrandController.py

@@ -290,6 +290,20 @@ class MyserviceDynamodb(object):
             table = dynamodb.Table(table_name)
             response = table.scan(
                 FilterExpression=Attr(queryname).eq(username)
+                                 | Key('deviceSupplier').eq(username)
+                                 | Key('osType').eq(username)
+                                 | Key('deviceModel').eq(username)
+                                 | Key('osVersion').eq(username)
+                                 | Key('country').eq(username)
+                                 | Key('appId').eq(username)
+                                 | Key('province').eq(username)
+                                 | Key('city').eq(username)
+                                 | Key('area').eq(username)
+                                 | Key('street').eq(username)
+                                 | Key('longitude').eq(username)
+                                 | Key('latitude').eq(username)
+                                 | Key('status_all').eq(username)
+                                 | Key('ip').eq(username)
             )
             items = response['Items']
         except Exception as e:
@@ -458,7 +472,16 @@ class UserBrandInfo(View):
             longitude='无'
         if latitude is None:
             latitude='无'
-
+        if city == '':
+            city = '无'
+        if area == '':
+            area = '无'
+        if street == '':
+            street = '无'
+        if longitude == '':
+            longitude = '无'
+        if latitude == '':
+            latitude = '无'
         param_area = CommonService.get_param_flag(data=[country,province,city])
         must_fill_in = CommonService.get_param_flag(data=[appId,deviceSupplier,deviceModel,osType,osVersion])
         if must_fill_in is False: