浏览代码

修复发送云存系统消息错误

lang 3 年之前
父节点
当前提交
67da829ead
共有 1 个文件被更改,包括 9 次插入4 次删除
  1. 9 4
      Controller/PaymentCycle.py

+ 9 - 4
Controller/PaymentCycle.py

@@ -263,8 +263,9 @@ class PaypalCycleNotify(View):
                 sys_msg_text_list = ['温馨提示:尊敬的客户,您的' + UID + '设备在' + datetime + '已成功订阅云存套餐',
                                      'Dear customer,you already subscribed the cloud storage package successfully for device ' + UID + ' on ' + time.strftime(
                                          "%b %dth,%Y", time.localtime())]
-
-                CloudStorage.CloudStorageView.do_vod_msg_Notice(self, UID, channel, userid, lang, sys_msg_text_list, 'SMS_219738485')
+                # 如果存在序列号,消息提示用序列号
+                device_name = CommonService.query_serial_with_uid(uid=UID)
+                CloudStorage.CloudStorageView.do_vod_msg_Notice(self, UID, channel, userid, lang, sys_msg_text_list, 'SMS_219738485', device_name)
 
                 # return response.json(0)
                 red_url = "{SERVER_DOMAIN_SSL}web/paid2/success.html".format(SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL)
@@ -436,8 +437,10 @@ class PaypalCycleNotify(View):
                             lang = 'en'
                         else:
                             lang = 'cn'
+                        # 如果存在序列号,消息提示用序列号
+                        device_name = CommonService.query_serial_with_uid(uid=UID)
                         CloudStorage.CloudStorageView.do_vod_msg_Notice(self, UID, channel, userid, lang,
-                                                                        sys_msg_text_list, 'SMS_219738485')
+                                                                        sys_msg_text_list, 'SMS_219738485',device_name)
                         logger.info('-----------------------result')
                         logger.info('success')
 
@@ -605,8 +608,10 @@ class PaypalCycleNotify(View):
                             lang = 'en'
                         else:
                             lang = 'cn'
+                        # 如果存在序列号,消息提示用序列号
+                        device_name = CommonService.query_serial_with_uid(uid=UID)
                         CloudStorage.CloudStorageView.do_vod_msg_Notice(self, UID, channel, userid, lang,
-                                                                        sys_msg_text_list, 'SMS_219738485')
+                                                                        sys_msg_text_list, 'SMS_219738485', device_name)
                         return HttpResponse('success')
                 except Exception as e:
                     print(e)