|
@@ -126,7 +126,7 @@ class DevicePushService:
|
|
|
# 发送内容
|
|
|
msg_text = cls.get_msg_text(channel=params['channel'], n_time=params['n_time'], lang=lang,
|
|
|
tz=tz, event_type=params['event_type'],
|
|
|
- electricity=params['electricity'])
|
|
|
+ electricity=params['electricity'], dealings_type=params['dealings_type'])
|
|
|
kwag_args['appBundleId'] = appBundleId
|
|
|
kwag_args['token_val'] = token_val
|
|
|
kwag_args['msg_title'] = msg_title
|
|
@@ -313,7 +313,7 @@ class DevicePushService:
|
|
|
return nickname
|
|
|
|
|
|
@staticmethod
|
|
|
- def get_msg_text(channel, n_time, lang, tz, event_type, electricity='', is_sys=0):
|
|
|
+ def get_msg_text(channel, n_time, lang, tz, event_type, electricity='', is_sys=0, dealings_type=0):
|
|
|
"""
|
|
|
获取消息文本
|
|
|
"""
|
|
@@ -328,6 +328,13 @@ class DevicePushService:
|
|
|
msg_type = '摄像头唤醒'
|
|
|
elif etype == 606:
|
|
|
msg_type = '有人呼叫,请点击查看'
|
|
|
+ elif etype == 1024:
|
|
|
+ if int(dealings_type) == 1:
|
|
|
+ msg_type = '有人进入'
|
|
|
+ elif int(dealings_type) == 2:
|
|
|
+ msg_type = '有人离开'
|
|
|
+ else:
|
|
|
+ msg_type = '往来检测'
|
|
|
else:
|
|
|
msg_type = ''
|
|
|
if is_sys:
|
|
@@ -343,6 +350,13 @@ class DevicePushService:
|
|
|
msg_type = 'Camera wake'
|
|
|
elif etype == 606:
|
|
|
msg_type = 'Someone is calling, please click to view'
|
|
|
+ elif etype == 1024:
|
|
|
+ if dealings_type == 1:
|
|
|
+ msg_type = 'Someone comes in'
|
|
|
+ elif dealings_type == 2:
|
|
|
+ msg_type = 'Someone left'
|
|
|
+ else:
|
|
|
+ msg_type = 'Incoming and outgoing detection'
|
|
|
else:
|
|
|
msg_type = ''
|
|
|
if is_sys:
|