|
@@ -95,7 +95,7 @@ class NotificationV2View(View):
|
|
|
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',
|
|
|
- 'uid_set__channel', 'uid_set__ai_type')
|
|
|
+ 'uid_set__channel', 'uid_set__ai_type', 'uid_set__new_detect_interval')
|
|
|
if not uid_push_qs.exists():
|
|
|
logger.info('uid_push 数据不存在')
|
|
|
return JsonResponse(status=200, data={'code': 176, 'msg': 'no uid_push data'})
|
|
@@ -116,13 +116,14 @@ class NotificationV2View(View):
|
|
|
|
|
|
if not have_dkey:
|
|
|
# 设置推送消息的时间间隔
|
|
|
+ new_detect_interval = redis_list[0]['uid_set__new_detect_interval']
|
|
|
+ detect_interval = new_detect_interval if new_detect_interval > 0 else detect_interval
|
|
|
+ detect_interval = 60 if detect_interval < 60 else detect_interval
|
|
|
if detect_group == '0' or detect_group == '':
|
|
|
redisObj.set_data(key=dkey, val=1, expire=detect_interval)
|
|
|
else:
|
|
|
detect_group_list = detect_group.split(',')
|
|
|
if event_type in detect_group_list:
|
|
|
- if detect_interval < 60:
|
|
|
- detect_interval = 60
|
|
|
redisObj.set_data(key=dkey, val=1, expire=detect_interval)
|
|
|
|
|
|
if is_st == 1 or is_st == 3: # 使用aws s3
|
|
@@ -321,6 +322,7 @@ class NotificationV2View(View):
|
|
|
try:
|
|
|
if ai_type != 47:
|
|
|
return event_type
|
|
|
+ logger.info('LOG------算法小店组合类型十进制值:{}'.format(event_type))
|
|
|
# 如触发一个事件,则匹配已用类型 1替换后变成51代表移动侦测 1:移动侦测,2:人形,4:车型,8:人脸
|
|
|
event_dict = {
|
|
|
1: 51,
|