|
@@ -155,7 +155,7 @@ class DevicePushService:
|
|
|
params['event_tag'] = cls.get_event_tag(params['ai_type'], params['event_type'], params['detection'])
|
|
|
is_app_push = True if params['event_type'] in [606, 607] else \
|
|
|
cls.is_send_app_push(params['event_type'], params['event_tag'], params['app_push_config'],
|
|
|
- params['app_push'])
|
|
|
+ params['app_push'], params['uid'])
|
|
|
for up in params['uid_set_push_list']:
|
|
|
appBundleId = up['appBundleId']
|
|
|
token_val = up['token_val']
|
|
@@ -737,7 +737,7 @@ class DevicePushService:
|
|
|
return True if c else False
|
|
|
|
|
|
@staticmethod
|
|
|
- def is_send_app_push(event_type, event_tag, app_push_config, msg_interval=None):
|
|
|
+ def is_send_app_push(event_type, event_tag, app_push_config, msg_interval=None, uid=None):
|
|
|
"""
|
|
|
是否进行APP消息提醒
|
|
|
@return: True|False
|
|
@@ -759,14 +759,14 @@ class DevicePushService:
|
|
|
push_time_config = app_push_config['pushTime']
|
|
|
# 计算当前时间是否在自定义消息提醒范围内
|
|
|
if not DevicePushService.is_push_notify_allowed_now(push_time_config):
|
|
|
- LOGGING.info('APP推送提醒不在自定义时间内:{}'.format(push_time_config))
|
|
|
+ LOGGING.info('{}APP推送提醒不在自定义时间内:{}'.format(uid, push_time_config))
|
|
|
return False
|
|
|
# APP接收提醒,判断识别类型是否勾选提醒
|
|
|
push_result = DevicePushService.is_type_push(event_type, event_tag, app_event_types)
|
|
|
- LOGGING.info('APP推送提醒是否执行:{}'.format(push_result))
|
|
|
+ LOGGING.info('{}APP推送消息类型提醒是否执行:{}'.format(uid, push_result))
|
|
|
return push_result
|
|
|
except Exception as e:
|
|
|
- LOGGING.info('判断是否执行APP推送异常,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
+ LOGGING.info('{}判断是否执行APP推送异常,errLine:{}, errMsg:{}'.format(uid, e.__traceback__.tb_lineno, repr(e)))
|
|
|
return True
|
|
|
|
|
|
@staticmethod
|
|
@@ -779,7 +779,8 @@ class DevicePushService:
|
|
|
return any(item in app_event_types for item in tag_list)
|
|
|
|
|
|
# 检查事件类型和用户所选事件类型是否都存在,并判断事件类型在用户所选事件类型列表中
|
|
|
- return event_type and app_event_types and event_type in app_event_types
|
|
|
+ # return event_type and app_event_types and event_type in app_event_types
|
|
|
+ return True
|
|
|
|
|
|
@staticmethod
|
|
|
def is_push_notify_allowed_now(push_time_config):
|