Browse Source

撤销更新套餐

linhaohong 1 year ago
parent
commit
a91e8e26fe
1 changed files with 12 additions and 10 deletions
  1. 12 10
      Controller/CloudStorage.py

+ 12 - 10
Controller/CloudStorage.py

@@ -236,10 +236,6 @@ class CloudStorageView(View):
 
                 if CONFIG_INFO != CONFIG_CN:  # 国内生产环境不筛选像素 加载所有上架套餐
                     store_qs = store_qs.filter(Q(pixel_level=pixel_level))
-                if is_ios:
-                    store_qs = store_qs.filter(pay_type=5)
-                else:
-                    store_qs = store_qs.exclude(pay_type=5)
             else:
                 is_ai = uid_set_qs[0]['is_ai']
                 is_ai = 1 if is_ai != 2 and CONFIG_INFO != CONFIG_CN else 0  # 国内不支持AI服务
@@ -248,12 +244,18 @@ class CloudStorageView(View):
             store_qs = store_qs.annotate(title=F('lang__title'), content=F('lang__content'),
                                          new_title=F('lang__new_title'),
                                          discount_content=F('lang__discount_content'))
-
-            store_qs = store_qs.order_by('sort').values(
-                "id", "title", "content", "price", "day", "currency", "bucket__storeDay", "new_title",
-                "bucket__bucket",
-                "bucket__area", "commodity_code", "commodity_type", "is_discounts", "virtual_price", "expire",
-                "discount_price", "discount_content", "symbol", "cycle_config_id")
+            if is_ios:
+                store_qs = store_qs.order_by('sort').values(
+                    "id", "title", "content", "price", "day", "currency", "bucket__storeDay", "new_title",
+                    "bucket__bucket",
+                    "bucket__area", "commodity_code", "commodity_type", "is_discounts", "virtual_price", "expire",
+                    "discount_price", "discount_content", "symbol", "cycle_config_id", "product_id")
+            else:
+                store_qs = store_qs.order_by('sort').values(
+                    "id", "title", "content", "price", "day", "currency", "bucket__storeDay", "new_title",
+                    "bucket__bucket",
+                    "bucket__area", "commodity_code", "commodity_type", "is_discounts", "virtual_price", "expire",
+                    "discount_price", "discount_content", "symbol", "cycle_config_id")
 
             if not store_qs.exists():
                 return response.json(0)