|
@@ -94,7 +94,7 @@ class DevicePushService:
|
|
|
@param event_type: 事件类型
|
|
|
@return: uid_push_qs
|
|
|
"""
|
|
|
- if event_type != 606:
|
|
|
+ if event_type not in [606, 607]:
|
|
|
uid_push_qs = UidPushModel.objects.filter(uid_set__uid=uid, uid_set__detect_status=1). \
|
|
|
values('token_val', 'app_type', 'appBundleId', 'm_code', 'push_type', 'userID_id', 'userID__NickName',
|
|
|
'lang', 'm_code', 'tz', 'uid_set__nickname', 'uid_set__detect_interval', 'uid_set__detect_group',
|
|
@@ -155,7 +155,7 @@ class DevicePushService:
|
|
|
# push_permission = True 多通道权限限制接收
|
|
|
try:
|
|
|
params['event_tag'] = cls.get_event_tag(params['ai_type'], params['event_type'], params['detection'])
|
|
|
- is_app_push = True if params['event_tag'] == 606 else \
|
|
|
+ is_app_push = True if params['event_tag'] in [606, 607] else \
|
|
|
cls.is_send_app_push(params['event_type'], params['event_tag'], params['app_push_config'])
|
|
|
for up in uid_set_push_list:
|
|
|
appBundleId = up['appBundleId']
|
|
@@ -176,7 +176,7 @@ class DevicePushService:
|
|
|
kwag_args['token_val'] = token_val
|
|
|
kwag_args['msg_title'] = msg_title
|
|
|
kwag_args['msg_text'] = msg_text
|
|
|
- if params['event_type'] == 606 and up['push_type'] in [5, 6]:
|
|
|
+ if params['event_type'] in [606, 607] and up['push_type'] in [5, 6]:
|
|
|
kwag_args['jg_token_val'] = up['jg_token_val']
|
|
|
else:
|
|
|
if 'jg_token_val' in kwag_args:
|
|
@@ -455,7 +455,7 @@ class DevicePushService:
|
|
|
msg_type = '摄像头休眠'
|
|
|
elif event_type == 703:
|
|
|
msg_type = '摄像头唤醒'
|
|
|
- elif event_type == 606:
|
|
|
+ elif event_type in [606, 607]:
|
|
|
msg_type = '有人呼叫,请点击查看'
|
|
|
elif ai_type > 0 and event_list:
|
|
|
msg_type = ''.join([DevicePushService.get_event_type_text(lang, item, dealings_type)
|
|
@@ -498,7 +498,7 @@ class DevicePushService:
|
|
|
msg_type = 'Camera sleep'
|
|
|
elif event_type == 703:
|
|
|
msg_type = 'Camera wake'
|
|
|
- elif event_type == 606:
|
|
|
+ elif event_type in [606, 607]:
|
|
|
msg_type = 'Someone is calling, please click to view'
|
|
|
elif ai_type > 0 and event_list:
|
|
|
msg_type = ''.join([DevicePushService.get_event_type_text(lang, item, dealings_type)
|
|
@@ -604,7 +604,7 @@ class DevicePushService:
|
|
|
response = requests.post(push_url, data=push_data, headers=headers)
|
|
|
if response.status_code == 200:
|
|
|
LOGGING.info("oppo推送返回值:{},uid:{},time:{},event:{}".format(response.json(), uid, now_time, event_type))
|
|
|
- if event_type == 606 or event_type == '606':
|
|
|
+ if event_type in [606, 607]:
|
|
|
PushObject.jpush_transparent_transmission(msg_title, msg_text, appBundleId, jg_token_val, extra_data)
|
|
|
return response.json()
|
|
|
|