Browse Source

东亚地区国家用户分配亚洲区域UID

locky 9 months ago
parent
commit
0a043c0a83
2 changed files with 9 additions and 2 deletions
  1. 4 0
      Ansjer/config.py
  2. 5 2
      Service/CommonService.py

+ 4 - 0
Ansjer/config.py

@@ -26,8 +26,12 @@ RESET_REGION_ID_SERIAL_REDIS_LIST = 'reset_region_id_serial_redis_list'
 
 
 # 地区id列表
 # 地区id列表
 REGION_ID_LIST = [1, 2, 3, 4, 5, 6]
 REGION_ID_LIST = [1, 2, 3, 4, 5, 6]
+
+# tb_country表id
 # 中东西亚国家id列表
 # 中东西亚国家id列表
 ME_COUNTRY_ID_LIST = [31, 32, 36, 39, 48]
 ME_COUNTRY_ID_LIST = [31, 32, 36, 39, 48]
+# 东亚国家id列表,id: 2~16
+EA_COUNTRY_ID_LIST = [i for i in range(2, 17)]
 
 
 # 支付类型
 # 支付类型
 PAY_TYPE_PAYPAL = 1
 PAY_TYPE_PAYPAL = 1

+ 5 - 2
Service/CommonService.py

@@ -20,7 +20,7 @@ from pyipip import IPIPDatabase
 
 
 from Ansjer.config import BASE_DIR, SERVER_DOMAIN_SSL, CONFIG_INFO, CONFIG_TEST, CONFIG_CN, SERVER_DOMAIN_TEST, \
 from Ansjer.config import BASE_DIR, SERVER_DOMAIN_SSL, CONFIG_INFO, CONFIG_TEST, CONFIG_CN, SERVER_DOMAIN_TEST, \
     SERVER_DOMAIN_CN, SERVER_DOMAIN_US, CONFIG_US, CONFIG_EUR, SERVER_DOMAIN_LIST, SERVER_DOMAIN_EUR, ALEXA_DOMAIN, \
     SERVER_DOMAIN_CN, SERVER_DOMAIN_US, CONFIG_US, CONFIG_EUR, SERVER_DOMAIN_LIST, SERVER_DOMAIN_EUR, ALEXA_DOMAIN, \
-    ME_COUNTRY_ID_LIST
+    ME_COUNTRY_ID_LIST, EA_COUNTRY_ID_LIST
 from Controller.CheckUserData import RandomStr
 from Controller.CheckUserData import RandomStr
 from Model.models import iotdeviceInfoModel, Device_Info, UIDModel, AppDeviceType, UIDCompanySerialModel, GatewayPush, \
 from Model.models import iotdeviceInfoModel, Device_Info, UIDModel, AppDeviceType, UIDCompanySerialModel, GatewayPush, \
     Device_User
     Device_User
@@ -604,9 +604,12 @@ GCqvlyw5dfxNA+EtxNE2wCW/LW7ENJlACgcfgPlBZtpLheWoZB/maw4=
         """
         """
         region_id = 3
         region_id = 3
         if CONFIG_INFO == CONFIG_US:  # 美洲
         if CONFIG_INFO == CONFIG_US:  # 美洲
-            # '沙特阿拉伯', '‌阿拉伯联合酋长国','格鲁吉亚','土耳其','阿塞拜疆'返回中东地区id
+            # 中东地区国家id
             if region_country in ME_COUNTRY_ID_LIST:
             if region_country in ME_COUNTRY_ID_LIST:
                 region_id = 6
                 region_id = 6
+            # 东亚地区国家id
+            elif region_country in EA_COUNTRY_ID_LIST:
+                region_id = 2
         elif CONFIG_INFO == CONFIG_EUR:  # 欧洲
         elif CONFIG_INFO == CONFIG_EUR:  # 欧洲
             region_id = 4
             region_id = 4
         elif CONFIG_INFO == CONFIG_CN:  # 中国
         elif CONFIG_INFO == CONFIG_CN:  # 中国