소스 검색

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]