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

消息推送V2修改IPC默认不推移动侦测

zhangdongming 9 сар өмнө
parent
commit
9f2b8d64c0

+ 5 - 1
Controller/DetectControllerV2.py

@@ -221,8 +221,12 @@ class DetectControllerViewV2(View):
                     uid_set_data['msg_notify'] = msg_data
                 elif status == 1 and uid_set_qs.first().detect_status == 0:
                     uid_set_data['detect_interval'] = 60
+
                     types = ALGORITHM_COMBO_TYPES
-                    types = [x for x in types if x != 51]
+                    device_type = device_info_qs[0].Type
+                    # IPC默认关闭移动侦测APP通知
+                    if device_type and device_type not in [1, 2, 3, 4, 10001]:
+                        types = [x for x in types if x != 51]
                     msg_data = {'appPush': 1,
                                 'pushTime': {'allDay': 1, 'repeat': 127, 'endTime': 0, 'timeZone': '+08.00',
                                              'startTime': 0},