Sfoglia il codice sorgente

修改了版本记录的查询接口

pzb 6 anni fa
parent
commit
530fec5a05
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      Controller/AppColophon.py

+ 3 - 2
Controller/AppColophon.py

@@ -86,16 +86,17 @@ class AppColView(View):
         if own_perm is True:
             page = request_dict.get('page', None)
             line = request_dict.get('line', None)
+            app_type = request_dict.get('app_type', None)
             page = int(page)
             line = int(line)
-            omqs = App_Colophon.objects.order_by('app_id').values_list('app_id__appBundleId', flat=True).distinct()
+            omqs = App_Colophon.objects.filter(app_id__app_type=app_type).order_by('app_id').values_list('app_id__appBundleId', flat=True).distinct()
             if not omqs.exists():
                 return response.json(0, [])
             count = omqs.count()
             omqs = list(omqs[(page - 1) * line:page * line])
             # 查询时候用记得用in,查询是多个
             ev_qs = App_Colophon.objects.filter(app_id__appBundleId__in=list(omqs)).values("id", "lang",
-                     "newApp_version", "content","version_time", "app_id__appBundleId", "app_id__app_type")
+                     "newApp_version", "content","version_time", "app_id__appBundleId", "app_id__appName", "app_id__app_type")
 
             order_list = list(ev_qs)
             datas = {}