Selaa lähdekoodia

cdk根据套餐判断是否开通AI服务

peng 1 vuosi sitten
vanhempi
commit
fff0dc9742
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      Controller/CloudStorage.py

+ 3 - 1
Controller/CloudStorage.py

@@ -1826,7 +1826,7 @@ class CloudStorageView(View):
         order_id = CommonService.createOrderID()
         now_time = int(time.time())
         store_qs = Store_Meal.objects.filter(id=rank, lang__lang=lang, is_show=0).values("day", "bucket_id",
-                                                                                         "expire",
+                                                                                         "expire", "is_ai",
                                                                                          'lang__content', 'price',
                                                                                          'currency', 'commodity_type',
                                                                                          'icloud_store_meal_id')
@@ -1842,6 +1842,8 @@ class CloudStorageView(View):
         is_ai = 1 if uid_set_qs[0]['is_ai'] != 2 else 0
         if is_ai != 1:
             is_ai = self.check_ucode_exists(uid_set_qs[0]['ucode'])
+        if cdk:
+            is_ai = store_qs[0]['is_ai']
 
         order_type = 1 if is_ai and CONFIG_INFO != CONFIG_CN else 0
         use_flag = True