pengzhibo168 5 年之前
父节点
当前提交
3be7afd606
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Controller/DetectController.py

+ 3 - 1
Controller/DetectController.py

@@ -153,6 +153,7 @@ class NotificationView(View):
         eq_list = []
         sys_msg_list = []
         userID_ids = []
+        do_apnsss = []
         for up in redis_list:
             push_type = up['push_type']
             appBundleId = up['appBundleId']
@@ -172,6 +173,7 @@ class NotificationView(View):
             if detect_med_type == 2 or detect_med_type == 0:
                 if push_type == 0:  # ios apns
                     self.do_apns(**kwag_args)
+                    do_apnsss['do_apns'] = self.do_apns(**kwag_args)
                 elif push_type == 1:  # android gcm
                     self.do_fcm(**kwag_args)
                 elif push_type == 2:  # android jpush
@@ -209,7 +211,7 @@ class NotificationView(View):
         Equipment_Info.objects.bulk_create(eq_list)
         if is_st == '0' or is_st == '2':
             print("is_st=0or2")
-            return JsonResponse(status=200, data={'code': 0, 'msg': 'success2222222222'})
+            return JsonResponse(status=200, data={'code': 0, 'msg': 'success2222222222','do_apnsss' : do_apnsss})
         elif is_st == '1':
             print("is_st=1")
             # Endpoint以杭州为例,其它Region请按实际情况填写。