Forráskód Böngészése

Merge branch 'dev' of http://192.168.136.99:3000/SERVER/AnsjerServer

chenshibin 4 éve
szülő
commit
72199a8e07

+ 3 - 0
Ansjer/config_formal.py

@@ -28,6 +28,9 @@ PAYPAL_CRD = {
 }
 }
 
 
 DETECT_PUSH_DOMAIN = 'http://push.dvema.com/'
 DETECT_PUSH_DOMAIN = 'http://push.dvema.com/'
+DETECT_PUSH_DOMAINS = 'https://push.dvema.com/'
+DETECT_PUSH_DOMAIN_JIUAN = 'http://jiuan.push.dvema.com/'
+DETECT_PUSH_DOMAINS_JIUAN = 'https://jiuan.push.dvema.com/'
 # 数据库dyanamo品牌日志数据库
 # 数据库dyanamo品牌日志数据库
 USER_BRAND = 'user_brand'
 USER_BRAND = 'user_brand'
 USER_BRAND_ALL = 'user_brand_all'
 USER_BRAND_ALL = 'user_brand_all'

+ 4 - 1
Ansjer/config_test.py

@@ -38,7 +38,10 @@ PAYPAL_CRD = {
 #     "client_id": "ATXTpWs8sajNYeU46jNs1yzpy4H_o3RRrGVIJ8Tscc312BjMx12cpRgCucfWX07a4G6GbK8hzElB04Pd",
 #     "client_id": "ATXTpWs8sajNYeU46jNs1yzpy4H_o3RRrGVIJ8Tscc312BjMx12cpRgCucfWX07a4G6GbK8hzElB04Pd",
 #     "client_secret": "EHcnfrpL1o1ev9WnlQ-C1uymeRKDoJ6li6Y0d6iHoRGj4u8Sx5lSEEH774XphP4LQZ0DrDUdvxbux0T2"
 #     "client_secret": "EHcnfrpL1o1ev9WnlQ-C1uymeRKDoJ6li6Y0d6iHoRGj4u8Sx5lSEEH774XphP4LQZ0DrDUdvxbux0T2"
 # }
 # }
-DETECT_PUSH_DOMAIN = 'http://test.push.dvema.com/'
+DETECT_PUSH_DOMAIN = 'http://push.dvema.com/'
+DETECT_PUSH_DOMAINS = 'https://push.dvema.com/'
+DETECT_PUSH_DOMAIN_JIUAN = 'http://jiuan.push.dvema.com/'
+DETECT_PUSH_DOMAINS_JIUAN = 'https://jiuan.push.dvema.com/'
 # 数据库dyanamo品牌日志数据库
 # 数据库dyanamo品牌日志数据库
 USER_BRAND = 'test_user_brand'
 USER_BRAND = 'test_user_brand'
 USER_BRAND_ALL = 'test_user_brand_all'
 USER_BRAND_ALL = 'test_user_brand_all'

+ 1 - 0
Controller/CloudStorage.py

@@ -196,6 +196,7 @@ class CloudStorageView(View):
             qs = qs.filter(pay_type='10')
             qs = qs.filter(pay_type='10')
 
 
         qs = qs.filter(~Q(pay_type='11'))  # 过滤不显示激活码套餐
         qs = qs.filter(~Q(pay_type='11'))  # 过滤不显示激活码套餐
+        qs = qs.filter(id='11111111')
         #qs = qs.filter(bucket__region_id=regionObj.region_id)  # 过滤大洲
         #qs = qs.filter(bucket__region_id=regionObj.region_id)  # 过滤大洲
         qs = qs.annotate(title=F('lang__title'),content=F('lang__content'),discount_content=F('lang__discount_content'))
         qs = qs.annotate(title=F('lang__title'),content=F('lang__content'),discount_content=F('lang__discount_content'))
         qs = qs.values("id", "title", "content", "price", "day", "currency", "bucket__storeDay",
         qs = qs.values("id", "title", "content", "price", "day", "currency", "bucket__storeDay",

+ 17 - 6
Controller/DetectControllerV2.py

@@ -21,8 +21,10 @@ from django.http import JsonResponse
 from django.views.generic.base import View
 from django.views.generic.base import View
 from pyfcm import FCMNotification
 from pyfcm import FCMNotification
 from Object.RedisObject import RedisObject
 from Object.RedisObject import RedisObject
-from Ansjer.config import OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET, DETECT_PUSH_DOMAIN, JPUSH_CONFIG, \
-    FCM_CONFIG, APNS_CONFIG, BASE_DIR, APNS_MODE
+from Ansjer.config import OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET, DETECT_PUSH_DOMAIN, DETECT_PUSH_DOMAIN_V2, \
+    JPUSH_CONFIG, \
+    FCM_CONFIG, APNS_CONFIG, BASE_DIR, APNS_MODE, DETECT_PUSH_DOMAINS, DETECT_PUSH_DOMAIN_JIUAN, \
+    DETECT_PUSH_DOMAINS_JIUAN
 from Model.models import Device_Info, VodHlsModel, Equipment_Info, UidSetModel, UidPushModel, CompanyModel
 from Model.models import Device_Info, VodHlsModel, Equipment_Info, UidSetModel, UidPushModel, CompanyModel
 from Object.ETkObject import ETkObject
 from Object.ETkObject import ETkObject
 from Object.RedisObject import RedisObject
 from Object.RedisObject import RedisObject
@@ -127,9 +129,9 @@ class DetectControllerViewV2(View):
         # ipInfo = CommonService.getIpIpInfo(ip=ip, lang='EN')
         # ipInfo = CommonService.getIpIpInfo(ip=ip, lang='EN')
         # area = ipInfo['country_name']
         # area = ipInfo['country_name']
         # if area == 'China':
         # if area == 'China':
-        #     DETECT_PUSH_DOMAIN = 'cn.push.dvema.com'
+        #     DETECT_PUSH_DOMAIN_V2 = 'cn.push.dvema.com'
         # else:
         # else:
-        #     DETECT_PUSH_DOMAIN = 'en.push.dvema.com'
+        #     DETECT_PUSH_DOMAIN_V2 = 'en.push.dvema.com'
 
 
         nowTime = int(time.time())
         nowTime = int(time.time())
         if dvqs.exists():
         if dvqs.exists():
@@ -216,9 +218,18 @@ class DetectControllerViewV2(View):
                 # utko.generate(data={'uid': uid})
                 # utko.generate(data={'uid': uid})
                 etkObj = ETkObject(etk='')
                 etkObj = ETkObject(etk='')
                 etk = etkObj.encrypt(uid)
                 etk = etkObj.encrypt(uid)
+
+                if company_secrete == 'MTEyMTNB':
+                    url = DETECT_PUSH_DOMAIN
+                    urls = DETECT_PUSH_DOMAINS
+                else:
+                    url = DETECT_PUSH_DOMAIN_JIUAN
+                    urls = DETECT_PUSH_DOMAINS_JIUAN
                 detectUrl = "{DETECT_PUSH_DOMAIN}notifyV2/push?etk={etk}&company_secrete={company_secrete}". \
                 detectUrl = "{DETECT_PUSH_DOMAIN}notifyV2/push?etk={etk}&company_secrete={company_secrete}". \
-                    format(etk=etk, company_secrete=company_secrete, DETECT_PUSH_DOMAIN=DETECT_PUSH_DOMAIN)
-                return response.json(0, {'detectUrl': detectUrl})
+                    format(etk=etk, company_secrete=company_secrete, DETECT_PUSH_DOMAIN=url)
+                detectUrls = "{DETECT_PUSH_DOMAIN_V2}notifyV2/push?etk={etk}&company_secrete={company_secrete}". \
+                    format(etk=etk, company_secrete=company_secrete, DETECT_PUSH_DOMAIN_V2=urls)
+                return response.json(0, {'detectUrl': detectUrl, 'detectUrls': detectUrls})
         else:
         else:
             return response.json(14)
             return response.json(14)