Browse Source

过滤隐藏套餐

chenshibin 3 years ago
parent
commit
80b23c8396
1 changed files with 3 additions and 2 deletions
  1. 3 2
      Controller/CloudStorage.py

+ 3 - 2
Controller/CloudStorage.py

@@ -203,6 +203,7 @@ class CloudStorageView(View):
             qs = qs.filter(pay_type='10')
 
         qs = qs.filter(~Q(pay_type='11'))  # 过滤不显示激活码套餐
+        qs = qs.filter(is_show=0)  #过滤隐藏套餐
         #qs = qs.filter(id='11111111')
         #qs = qs.filter(bucket__region_id=regionObj.region_id)  # 过滤大洲
         qs = qs.annotate(title=F('lang__title'),content=F('lang__content'),discount_content=F('lang__discount_content'))
@@ -1041,7 +1042,7 @@ class CloudStorageView(View):
 
         # if dv_qs[0]['vodPrimaryUserID'] != '' and dv_qs[0]['vodPrimaryUserID'] != userID:
         #     return response.json(10033)
-        smqs = Store_Meal.objects.filter(id=rank, pay_type=pay_type, lang__lang=lang). \
+        smqs = Store_Meal.objects.filter(id=rank, pay_type=pay_type, lang__lang=lang, is_show=0). \
             values('currency', 'price', 'lang__content', 'day',
                    'commodity_type', 'lang__title',
                    'expire', 'commodity_code', 'discount_price', 'bucket__mold')
@@ -1224,7 +1225,7 @@ class CloudStorageView(View):
 
         orderID = CommonService.createOrderID()
         nowTime = int(time.time())
-        smqs = Store_Meal.objects.filter(id=rank,lang__lang=lang). \
+        smqs = Store_Meal.objects.filter(id=rank,lang__lang=lang,is_show=0). \
             values("day", "bucket_id", "bucket__storeDay", "expire", 'lang__content', 'price', 'currency', 'commodity_type')
         if not smqs.exists():
             return response.json(173)