Эх сурвалжийг харах

国内支付宝、微信支付成功检查是否云服务代理产品

zhangdongming 1 жил өмнө
parent
commit
ceb4e2465e

+ 6 - 1
Controller/CloudStorage.py

@@ -20,6 +20,7 @@ from django.db.models import Q, F
 from django.http import JsonResponse, HttpResponseRedirect, HttpResponse
 from django.views.generic.base import View
 
+from AdminController.CloudServiceManage.AgentOrderController import AgentOrderView
 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, CONFIG_INFO, CONFIG_CN, BINOCULAR_DEVICE_TYPE
 from Controller.CheckUserData import DataValid
@@ -1015,6 +1016,8 @@ class CloudStorageView(View):
                         'Dear customer,you already subscribed the cloud storage package successfully 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')
+                    # 检查是否云服务代理订单
+                    AgentOrderView.check_agent_service_package(order_id, uid, rank)
                     red_url = "{}web/paid2/success.html".format(SERVER_DOMAIN_SSL)
                     if lang != 'cn':
                         red_url = red_url.replace('success.html', 'en_success.html')
@@ -1345,6 +1348,8 @@ class CloudStorageView(View):
                         'Dear customer,you already subscribed the cloud storage package successfully 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')
+                    # 检查是否云服务代理订单
+                    AgentOrderView.check_agent_service_package(order_id, uid, rank)
                     redis_obj.del_data(key=order_id + 'do_notify')
                     return HttpResponse("<xml>\
                       <return_code><![CDATA[SUCCESS]]></return_code>\
@@ -1813,7 +1818,7 @@ class CloudStorageView(View):
         if not device_info_qs.exists():
             return response.json(12)
         device_vo = device_info_qs.first()
-        if device_vo.Type == 103 or device_vo.Type == 26:
+        if device_vo.Type == 103 or device_vo.Type == 26 or device_vo.Type == 39:
             return response.json(10064)
         order_id = CommonService.createOrderID()
         now_time = int(time.time())

+ 4 - 0
Controller/UnicomCombo/UnicomComboPayNotifyController.py

@@ -15,6 +15,7 @@ from django.db import transaction
 from django.http import HttpResponse
 from django.views import View
 
+from AdminController.CloudServiceManage.AgentOrderController import AgentOrderView
 from Controller.UnicomCombo.UnicomComboController import UnicomComboView
 from Model.models import Order_Model, UnicomDeviceInfo, UnicomCombo, Device_User
 from Object.AliPayObject import AliPayObject
@@ -190,7 +191,10 @@ class UnicomComboPayNotifyView(View):
                                                         iccid, combo_id)
             order_qs.update(trade_no=trade_no, status=1, payTime=now_time, updTime=now_time)
             logger.info('购买联通套餐成功,序列号为:{}'.format(serial_no))
+            # 购买套餐成功异步短信推送
             cls.buy_async_sms_sen(user_id, serial_no, combo_id)
+            # 检查是否代理商设备
+            AgentOrderView.check_agent_service_package(order_id, device_uid, combo_id)
         redisObj.del_data(key=request_key)
         if is_wechat_pay:
             return HttpResponse("<xml>\