peng 2 年 前
コミット
7eb02f810b
1 ファイル変更2 行追加3 行削除
  1. 2 3
      Controller/UserController.py

+ 2 - 3
Controller/UserController.py

@@ -2329,7 +2329,7 @@ class InitInfoView(View):
         now_time = int(time.time())
         now_time = int(time.time())
         if all([token_val, push_type, appBundleId, userID]):
         if all([token_val, push_type, appBundleId, userID]):
             self.save_push_config(userID, appBundleId, push_type, token_val, m_code, lang, tz)
             self.save_push_config(userID, appBundleId, push_type, token_val, m_code, lang, tz)
-            self.save_or_creat_uid_push(userID, appBundleId, push_type, token_val, m_code, lang, tz)
+            self.save_or_creat_uid_push(userID, appBundleId, push_type, token_val, m_code, lang, tz, now_time)
             if appBundleId:
             if appBundleId:
                 user_ex_qs = UserExModel.objects.filter(userID_id=userID)
                 user_ex_qs = UserExModel.objects.filter(userID_id=userID)
                 user_ex = None
                 user_ex = None
@@ -2392,7 +2392,7 @@ class InitInfoView(View):
             print('出错了~异步保存配置信息错误,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
             print('出错了~异步保存配置信息错误,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
 
 
     @staticmethod
     @staticmethod
-    def save_or_creat_uid_push(user_id, app_bundle_id, push_type, token_val, m_code, lang, tz):
+    def save_or_creat_uid_push(user_id, app_bundle_id, push_type, token_val, m_code, lang, tz, now_time):
         """
         """
         异步保存推送配置
         异步保存推送配置
         @param user_id: 用户id
         @param user_id: 用户id
@@ -2406,7 +2406,6 @@ class InitInfoView(View):
         """
         """
         try:
         try:
             app_type = 1 if push_type == 0 else 2
             app_type = 1 if push_type == 0 else 2
-            now_time = int(time.time())
             device_info = Device_Info.objects.filter(userID=user_id).values('UID')
             device_info = Device_Info.objects.filter(userID=user_id).values('UID')
             if device_info.exists():
             if device_info.exists():
                 uid_set = UidSetModel.objects.filter(uid__in=device_info).values('id')
                 uid_set = UidSetModel.objects.filter(uid__in=device_info).values('id')