|
@@ -1009,7 +1009,7 @@ class CloudStorageView(View):
|
|
|
device_name = uid
|
|
|
sys_msg_text_list = [
|
|
|
'温馨提示:尊敬的客户,您的' + device_name + '设备在' + date_time + '已成功购买云存套餐',
|
|
|
- 'Dear customer,you already subscribed the cloud storage package successfully for device ' + device_name + ' on ' + time.strftime(
|
|
|
+ 'Dear customer, you have now successfully subscribed to the cloud storage plan for device ' + device_name + ' on ' + time.strftime(
|
|
|
"%b %dth,%Y", time.localtime())]
|
|
|
|
|
|
self.do_vod_msg_notice(uid, channel, userid, lang, sys_msg_text_list, 'SMS_219738485')
|
|
@@ -1439,10 +1439,13 @@ class CloudStorageView(View):
|
|
|
uid_bucket_qs = UID_Bucket.objects.filter(uid=uid).values("id", "bucket_id", "bucket__region",
|
|
|
"endTime", "use_status")
|
|
|
expire = store_qs[0]['expire']
|
|
|
- uid_set_qs = UidSetModel.objects.filter(uid=uid).values('is_ai')
|
|
|
+ uid_set_qs = UidSetModel.objects.filter(uid=uid).values('is_ai', 'ucode')
|
|
|
if not uid_set_qs.exists():
|
|
|
return response.json(173)
|
|
|
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'])
|
|
|
+
|
|
|
order_type = 1 if is_ai and CONFIG_INFO != CONFIG_CN else 0
|
|
|
use_flag = True
|
|
|
end_time = CommonService.calcMonthLater(expire)
|
|
@@ -1510,7 +1513,7 @@ class CloudStorageView(View):
|
|
|
device_name = uid
|
|
|
sys_msg_text_list = [
|
|
|
'温馨提示:尊敬的客户,您的' + device_name + '设备在' + date_time + '已成功购买云存套餐',
|
|
|
- 'Dear customer,you already subscribed the cloud storage package successfully for device ' + device_name + ' on ' + time.strftime(
|
|
|
+ 'Dear customer, you have now successfully subscribed to the cloud storage plan for device ' + device_name + ' on ' + time.strftime(
|
|
|
"%b %dth,%Y", time.localtime())]
|
|
|
|
|
|
return_url = "{}cloudstorage/payOK?lang={}".format(SERVER_DOMAIN_SSL, lang)
|
|
@@ -1524,7 +1527,7 @@ class CloudStorageView(View):
|
|
|
date_time = time.strftime("%Y-%m-%d", time.localtime())
|
|
|
sys_msg_text_list = [
|
|
|
'温馨提示:尊敬的客户,您的' + device_name + '设备在' + date_time + '已成功开通云存体验套餐',
|
|
|
- 'Dear customer,you already subscribed the free trial cloud storage service successfully for device ' + device_name + ' on ' + time.strftime(
|
|
|
+ 'Dear customer, you have now successfully subscribed to the free trial of cloud storage service for device ' + device_name + ' on ' + time.strftime(
|
|
|
"%b %dth,%Y", time.localtime())]
|
|
|
sms = 'SMS_222870823'
|
|
|
if pay_type == 11:
|
|
@@ -1535,7 +1538,7 @@ class CloudStorageView(View):
|
|
|
date_time = time.strftime("%Y-%m-%d", time.localtime())
|
|
|
sys_msg_text_list = [
|
|
|
'温馨提示:尊敬的客户,您的' + device_name + '设备在' + date_time + '已成功兑换云存套餐',
|
|
|
- 'Dear customer, you already redeemed for the cloud storage package successfully for device ' + device_name + ' on ' + time.strftime(
|
|
|
+ 'Dear customer, you have now successfully redeemed for the cloud storage service for device ' + device_name + ' on ' + time.strftime(
|
|
|
"%b %dth,%Y", time.localtime())]
|
|
|
sms = 'SMS_219748439'
|
|
|
|
|
@@ -2100,3 +2103,13 @@ class CloudStorageView(View):
|
|
|
logger = logging.getLogger('info')
|
|
|
logger.info('异常详情,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
+
|
|
|
+ def check_ucode_exists(self, ucode):
|
|
|
+ if not ucode:
|
|
|
+ return 0
|
|
|
+ ucode_set = {'823C01552AA', '823C01550AA', '823C01550XA', '522001352AA', '823C01550TA', '823C01550VA',
|
|
|
+ '823C01850XA', 'C18201850KA', '823C01850TA', 'C22501850VA', 'V82301850AA',
|
|
|
+ 'V82301850XA', '730201350AA', '730201450AA', '730201450MA', '730201450NA',
|
|
|
+ '72V201252AA', '72V201253AA', '72V201353AA', '72V201354AA', '72V201355AA',
|
|
|
+ '72V201254AA', '72V201256AA', '72V201257AA'}
|
|
|
+ return 1 if ucode in ucode_set else 0
|