Ver Fonte

修改云存购买成功通知文案,云存体验优化判断是否支持AI

zhangdongming há 1 ano atrás
pai
commit
4c0d4c1884

+ 18 - 5
Controller/CloudStorage.py

@@ -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

+ 1 - 1
Controller/Cron/CronTaskController.py

@@ -131,7 +131,7 @@ class CronDelDataView(View):
                           '823C01550VA', '823C01850XA', 'C18201850KA', '823C01850TA', '823C01850VA',
                           '730201450AA', '730201450MA', '730201450NA', '72V201252AA', '72V201253AA',
                           '72V201353AA', '72V201354AA', '72V201355AA', '72V201254AA', 'C22501850VA',
-                          'V82301850AA', 'V82301850XA', '72V201257AA', '72V201256AA']
+                          'V82301850AA', 'V82301850XA', '72V201257AA', '72V201256AA', '730201350AA']
             UidSetModel.objects.filter(ucode__in=ucode_list, is_ai=2).update(is_ai=1)
             return response.json(0)
         except Exception as e:

+ 1 - 1
Controller/PaymentCycle.py

@@ -333,7 +333,7 @@ class PaypalCycleNotify(View):
                 datetime = time.strftime("%Y-%m-%d", time.localtime())
                 sys_msg_text_list = [
                     '温馨提示:尊敬的客户,您的' + device_name + '设备在' + datetime + '已成功订阅云存套餐',
-                    '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())]
                 CloudStorage.CloudStorageView().do_vod_msg_notice(UID, channel, userid, lang, sys_msg_text_list,
                                                                   'SMS_219738485')