|
@@ -21,7 +21,7 @@ from django.http import JsonResponse, HttpResponseRedirect, HttpResponse
|
|
|
from django.views.generic.base import View
|
|
|
|
|
|
from Ansjer.config import SERVER_DOMAIN, PAYPAL_CRD, SERVER_DOMAIN_SSL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, \
|
|
|
- AWS_ARN, OAUTH_ACCESS_TOKEN_SECRET, DETECT_PUSH_DOMAINS
|
|
|
+ AWS_ARN, OAUTH_ACCESS_TOKEN_SECRET, DETECT_PUSH_DOMAINS, CONFIG_INFO, CONFIG_CN
|
|
|
from Controller.CheckUserData import DataValid
|
|
|
from Controller.CloudPhoto.CloudServiceController import CloudServiceController
|
|
|
from Controller.PaymentCycle import Paypal
|
|
@@ -206,7 +206,7 @@ class CloudStorageView(View):
|
|
|
store_qs = store_qs.filter(~Q(pay_type='10'))
|
|
|
else:
|
|
|
store_qs = store_qs.filter(pay_type='10')
|
|
|
- if is_ai != 2: # 返回支持AI的套餐
|
|
|
+ if CONFIG_INFO != CONFIG_CN and is_ai != 2: # 返回支持AI的套餐
|
|
|
store_qs = store_qs.filter(is_ai=1)
|
|
|
else: # 返回不支持AI的套餐
|
|
|
store_qs = store_qs.filter(is_ai=0)
|
|
@@ -993,7 +993,7 @@ class CloudStorageView(View):
|
|
|
promotion_rule_id=promotion_rule_id)
|
|
|
date_time = time.strftime("%Y-%m-%d", time.localtime())
|
|
|
# 开通AI服务
|
|
|
- if store_qs[0]['is_ai']:
|
|
|
+ if store_qs[0]['is_ai'] and CONFIG_INFO != CONFIG_CN:
|
|
|
ai_service_qs = AiService.objects.filter(uid=uid, channel=channel)
|
|
|
if ai_service_qs.exists(): # 有正在使用的套餐,套餐结束时间保存为套餐有效期
|
|
|
ai_service_qs.update(endTime=end_time, use_status=1, updTime=now_time)
|
|
@@ -1182,7 +1182,7 @@ class CloudStorageView(View):
|
|
|
promotion_rule_id=promotion_rule_id)
|
|
|
date_time = time.strftime("%Y-%m-%d", time.localtime())
|
|
|
# 开通AI服务
|
|
|
- if store_qs[0]['is_ai']:
|
|
|
+ if store_qs[0]['is_ai'] and CONFIG_INFO != CONFIG_CN:
|
|
|
ai_service_qs = AiService.objects.filter(uid=uid, channel=channel)
|
|
|
if ai_service_qs.exists(): # 有正在使用的套餐,套餐结束时间保存为套餐有效期
|
|
|
ai_service_qs.update(endTime=end_time, use_status=1, updTime=now_time)
|
|
@@ -1354,7 +1354,7 @@ class CloudStorageView(View):
|
|
|
promotion_rule_id=promotion_rule_id)
|
|
|
date_time = time.strftime("%Y-%m-%d", time.localtime())
|
|
|
# 开通AI服务
|
|
|
- if store_qs[0]['is_ai']:
|
|
|
+ if store_qs[0]['is_ai'] and CONFIG_INFO != CONFIG_CN:
|
|
|
ai_service_qs = AiService.objects.filter(uid=uid, channel=channel)
|
|
|
if ai_service_qs.exists(): # 有正在使用的套餐,套餐结束时间保存为套餐有效期
|
|
|
ai_service_qs.update(endTime=end_time, use_status=1, updTime=now_time)
|
|
@@ -1700,7 +1700,7 @@ class CloudStorageView(View):
|
|
|
uid_bucket_qs = UID_Bucket.objects.filter(uid=uid).values("id", "bucket_id", "bucket__storeDay",
|
|
|
"bucket__region", "endTime", "use_status")
|
|
|
expire = store_qs[0]['expire']
|
|
|
- icloud_store_meal_id = store_qs[0]['icloud_store_meal_id']
|
|
|
+ # icloud_store_meal_id = store_qs[0]['icloud_store_meal_id']
|
|
|
# icloud_meal_qs = ICloudStoreMeal.objects.filter(id=icloud_store_meal_id).values('size')
|
|
|
# if not icloud_meal_qs.exists():
|
|
|
# return response.json(173)
|
|
@@ -1731,7 +1731,7 @@ class CloudStorageView(View):
|
|
|
use_status=1)
|
|
|
uid_bucket_id = uid_bucket.id
|
|
|
# 开通AI体验
|
|
|
- if store_qs[0]['is_ai']:
|
|
|
+ if store_qs[0]['is_ai'] and CONFIG_INFO != CONFIG_CN:
|
|
|
order_type = 1
|
|
|
ai_service_qs = AiService.objects.filter(uid=uid, channel=channel)
|
|
|
if ai_service_qs.exists():
|