|
@@ -141,7 +141,6 @@ class DevicePushService:
|
|
|
def save_msg_push(cls, **params):
|
|
|
"""
|
|
|
推送消息,返回推送数据列表
|
|
|
- @param uid_set_push_list: redis对象
|
|
|
@param params: 推送参数
|
|
|
@return: dict
|
|
|
"""
|
|
@@ -151,11 +150,12 @@ class DevicePushService:
|
|
|
kwag_args = params['kwag_args']
|
|
|
code_data = {'do_apns_code': '', 'do_fcm_code': '', 'do_jpush_code': ''}
|
|
|
local_date_time = ''
|
|
|
- # push_permission = True
|
|
|
+ # 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'] in [606, 607] else \
|
|
|
- cls.is_send_app_push(params['event_type'], params['event_tag'], params['app_push_config'])
|
|
|
+ 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'])
|
|
|
for up in params['uid_set_push_list']:
|
|
|
appBundleId = up['appBundleId']
|
|
|
token_val = up['token_val']
|
|
@@ -727,7 +727,7 @@ class DevicePushService:
|
|
|
return True if c else False
|
|
|
|
|
|
@staticmethod
|
|
|
- def is_send_app_push(event_type, event_tag, app_push_config):
|
|
|
+ def is_send_app_push(event_type, event_tag, app_push_config, msg_interval=None):
|
|
|
"""
|
|
|
是否进行APP消息提醒
|
|
|
@return: True|False
|
|
@@ -739,7 +739,8 @@ class DevicePushService:
|
|
|
is_push = app_push_config['appPush']
|
|
|
if is_push != 1: # 1:进行APP提醒,其它则不执行APP提醒
|
|
|
return False
|
|
|
-
|
|
|
+ if msg_interval: # 存在消息间隔数据缓存 不推送APP消息
|
|
|
+ return False
|
|
|
all_day = app_push_config['pushTime']['allDay']
|
|
|
# 允许设备类型APP提醒列表
|
|
|
app_event_types = app_push_config['eventTypes']['device']
|