浏览代码

网关推送表增加极光推送token

peng 11 月之前
父节点
当前提交
bcd2cf6d53
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      Controller/UserController.py

+ 3 - 4
Controller/UserController.py

@@ -2633,7 +2633,7 @@ class InitInfoView(View):
         @param app_bundle_id: app版本包id
         @param push_type: 推送类型 0:Ios,1:Google,2:国内极光
         @param token_val: 推送token
-        @param token_val: 极光推送token
+        @param jg_token_val: 极光推送token
         @param m_code: 手机唯一标识
         @param lang: 语言
         @param tz: 时区
@@ -2643,9 +2643,8 @@ class InitInfoView(View):
             app_type = 1 if push_type == 0 else 2
             gateway_push_qs = GatewayPush.objects.filter(user_id=user_id, m_code=m_code)
             if gateway_push_qs.exists():
-                if gateway_push_qs.first().token_val != token_val:
-                    gateway_push_qs.update(token_val=token_val, push_type=push_type, logout=False,
-                                           jg_token_val=jg_token_val)
+                gateway_push_qs.update(token_val=token_val, push_type=push_type, logout=False,
+                                       jg_token_val=jg_token_val)
             else:
                 GatewayPush.objects.create(user_id=user_id, app_bundle_id=app_bundle_id, app_type=app_type,
                                            push_type=push_type, token_val=token_val, m_code=m_code, lang=lang, tz=tz,