Browse Source

新增云存 短信及邮件提醒3

chenshibin 4 years ago
parent
commit
3b65e7e661
1 changed files with 19 additions and 6 deletions
  1. 19 6
      Controller/CloudStorage.py

+ 19 - 6
Controller/CloudStorage.py

@@ -789,7 +789,8 @@ class CloudStorageView(View):
                     #     UIDMainUser.objects.create(**uid_main_dict)
 
                     order_qs.update(status=1, updTime=nowTime, uid_bucket_id=uid_bucket_id)
-                    sys_msg_text_list = ['成功购买云存', 'Successful purchase of cloud storage']
+                    datetime = time.strftime("%Y-%m-%d", time.localtime())
+                    sys_msg_text_list = ['尊重的客户,您的'+UID+'设备在'+datetime+'已成功购买云存套餐,特此通知。', 'Dear customer, your '+UID+' device has successfully purchased the cloud storage package at '+datetime+', hereby notified.']
                     self.do_vod_msg_Notice(UID, channel, userid, lang, sys_msg_text_list)
                     red_url = "{SERVER_DOMAIN_SSL}web/paid2/success.html".format(SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL)
                     if lang != 'cn':
@@ -897,7 +898,10 @@ class CloudStorageView(View):
                 #     UIDMainUser.objects.create(**uid_main_dict)
 
                 order_qs.update(status=1, updTime=nowTime, uid_bucket_id=uid_bucket_id)
-                sys_msg_text_list = ['成功购买云存','Successful purchase of cloud storage']
+                datetime = time.strftime("%Y-%m-%d", time.localtime())
+                sys_msg_text_list = ['尊重的客户,您的' + UID + '设备在' + datetime + '已成功购买云存套餐,特此通知。',
+                                     'Dear customer, your ' + UID + ' device has successfully purchased the cloud storage package at ' + datetime + ', hereby notified.']
+
                 self.do_vod_msg_Notice(UID, channel, userid, lang, sys_msg_text_list)
 
                 # return response.json(0)
@@ -999,7 +1003,9 @@ class CloudStorageView(View):
                     #     UIDMainUser.objects.create(**uid_main_dict)
 
                     order_qs.update(status=1, updTime=nowTime, uid_bucket_id=uid_bucket_id)
-                    sys_msg_text_list = ['成功购买云存', 'Successful purchase of cloud storage']
+                    datetime = time.strftime("%Y-%m-%d", time.localtime())
+                    sys_msg_text_list = ['尊重的客户,您的' + UID + '设备在' + datetime + '已成功购买云存套餐,特此通知。',
+                                         'Dear customer, your ' + UID + ' device has successfully purchased the cloud storage package at ' + datetime + ', hereby notified.']
                     self.do_vod_msg_Notice(UID, channel, userid, lang, sys_msg_text_list)
                     return HttpResponse(pay.xml_to_dict({'return_code': 'SUCCESS', 'return_msg': 'OK'}))
             else:
@@ -1278,7 +1284,9 @@ class CloudStorageView(View):
                 #     }
                 #     UIDMainUser.objects.create(**uid_main_dict)
 
-                sys_msg_text_list = ['成功购买云存', 'Successful purchase of cloud storage']
+                datetime = time.strftime("%Y-%m-%d", time.localtime())
+                sys_msg_text_list = ['尊重的客户,您的' + uid + '设备在' + datetime + '已成功购买云存套餐,特此通知。',
+                                     'Dear customer, your ' + uid + ' device has successfully purchased the cloud storage package at ' + datetime + ', hereby notified.']
                 # return response.json(0)
                 returnurl = "{SERVER_DOMAIN_SSL}cloudstorage/payOK?lang={lang}".format(SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL,lang=lang)
                 if pay_type == 10:
@@ -1288,7 +1296,9 @@ class CloudStorageView(View):
                         do_time=nowTime
                     )
                     returnurl = "{SERVER_DOMAIN_SSL}cloudstorage/payOK?paytype=10&lang={lang}".format(SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL,lang=lang)
-                    sys_msg_text_list = ['成功体验云存', 'Successful experience of cloud storage']
+                    datetime = time.strftime("%Y-%m-%d", time.localtime())
+                    sys_msg_text_list = ['尊重的客户,您的' + uid + '设备在' + datetime + '已成功体验云存,特此通知。',
+                                         'Dear customers, your '+uid+' device has successfully experienced cloud storage at '+datetime+', hereby notified.']
 
                 if pay_type == 11:
                     update_dict = {}
@@ -1296,7 +1306,10 @@ class CloudStorageView(View):
                     update_dict['order'] = orderID
                     CDKcontextModel.objects.filter(cdk=cdk).update(**update_dict)
                     returnurl = "{SERVER_DOMAIN_SSL}cloudstorage/payOK?paytype=11&lang={lang}".format(SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL,lang=lang)
-                    sys_msg_text_list = ['成功兑换云存', 'Successful exchange of cloud storage']
+
+                    datetime = time.strftime("%Y-%m-%d", time.localtime())
+                    sys_msg_text_list = ['尊重的客户,您的' + uid + '设备在' + datetime + '已成功兑换云存,特此通知。',
+                                         'Dear customer, your '+uid+' device has been redeemed for cloud deposit at '+datetime+', hereby notified.']
 
 
                 self.do_vod_msg_Notice(uid, channel, userID, lang, sys_msg_text_list)