瀏覽代碼

优化退出登录推送

peng 11 月之前
父節點
當前提交
06007ef373
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      Controller/TransparentTransmissionPushController.py

+ 6 - 3
Controller/TransparentTransmissionPushController.py

@@ -46,9 +46,12 @@ class TransparentTransmissionPushView(View):
         if not all([push_token, user_id, app_bundle_id]):
         if not all([push_token, user_id, app_bundle_id]):
             return response.json(444)
             return response.json(444)
         try:
         try:
-            uid_push_qs = GatewayPush.objects.filter(user_id=user_id, app_bundle_id=app_bundle_id).exclude(
-                token_val=push_token).values('token_val', 'push_type', 'app_bundle_id',
-                                             'jg_token_val').distinct().order_by('token_val')
+            uid_push_qs = GatewayPush.objects.filter(user_id=user_id, app_bundle_id=app_bundle_id,
+                                                     logout=False).exclude(token_val=push_token).values('token_val',
+                                                                                                        'push_type',
+                                                                                                        'app_bundle_id',
+                                                                                                        'jg_token_val').distinct().order_by(
+                'token_val')
             if not uid_push_qs.exists():
             if not uid_push_qs.exists():
                 return response.json(173)
                 return response.json(173)
             uid_push_list = list(uid_push_qs)
             uid_push_list = list(uid_push_qs)