Преглед на файлове

Merge branch 'pzb' of ssh://192.168.136.45:10022/SERVER/AnsjerServer into pzb

chenjunkai преди 6 години
родител
ревизия
78028eb8fc
променени са 1 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 4 3
      Controller/AppInfo.py

+ 4 - 3
Controller/AppInfo.py

@@ -144,9 +144,10 @@ class AppInfo(View):
             return response.json(404)
         page = int(request_dict.get('page', None))
         line = int(request_dict.get('line', None))
-        if not page or not line:
-            return response.json(444, 'page,line')
-        queryset = App_Info.objects.all()
+        app_type = request_dict.get('app_type', None)
+        if not page or not line or not app_type:
+            return response.json(444, 'page,line,app_type')
+        queryset = App_Info.objects.filter(app_type=app_type)
         if queryset.exists():
             count = queryset.count()
             res = queryset[(page - 1) * line:page * line]