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

登录更新网关推送表的登出状态

locky 3 жил өмнө
parent
commit
9fdcee6c0b

+ 3 - 1
Controller/UserController.py

@@ -2027,7 +2027,9 @@ class v3LoginView(TemplateView):
         tz = request_dict.get('tz', None)
         tz = request_dict.get('tz', None)
         if all([app_bundle_id, app_type, push_type, token_val, m_code, tz]):
         if all([app_bundle_id, app_type, push_type, token_val, m_code, tz]):
             gateway_push_qs = GatewayPush.objects.filter(user_id=userID, m_code=m_code)
             gateway_push_qs = GatewayPush.objects.filter(user_id=userID, m_code=m_code)
-            if not gateway_push_qs.exists():
+            if gateway_push_qs.exists():
+                gateway_push_qs.update(logout=False)
+            else:
                 GatewayPush.objects.create(user_id=userID, app_bundle_id=app_bundle_id, app_type=app_type,
                 GatewayPush.objects.create(user_id=userID, 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)
                                            push_type=push_type, token_val=token_val, m_code=m_code, lang=lang, tz=tz)