|
@@ -54,6 +54,8 @@ class NotificationV2View(View):
|
|
electricity = request_dict.get('electricity', '')
|
|
electricity = request_dict.get('electricity', '')
|
|
time_token = request_dict.get('time_token', None)
|
|
time_token = request_dict.get('time_token', None)
|
|
uid = request_dict.get('uid', None)
|
|
uid = request_dict.get('uid', None)
|
|
|
|
+ # 往来检测 1:来,2:离开
|
|
|
|
+ dealings_type = request_dict.get('dealingsType', 0)
|
|
|
|
|
|
if not all([channel, n_time]):
|
|
if not all([channel, n_time]):
|
|
return JsonResponse(status=200, data={
|
|
return JsonResponse(status=200, data={
|
|
@@ -120,7 +122,8 @@ class NotificationV2View(View):
|
|
params = {'nickname': nickname, 'uid': uid, 'kwag_args': kwag_args, 'is_st': is_st, 'region': region,
|
|
params = {'nickname': nickname, 'uid': uid, 'kwag_args': kwag_args, 'is_st': is_st, 'region': region,
|
|
'is_sys_msg': is_sys_msg, 'channel': channel, 'event_type': event_type, 'n_time': n_time,
|
|
'is_sys_msg': is_sys_msg, 'channel': channel, 'event_type': event_type, 'n_time': n_time,
|
|
'electricity': electricity, 'bucket': bucket, 'aws_s3_client': aws_s3_client,
|
|
'electricity': electricity, 'bucket': bucket, 'aws_s3_client': aws_s3_client,
|
|
- 'app_push': cache_app_push, 'storage_location': 2, 'ai_type': ai_type}
|
|
|
|
|
|
+ 'app_push': cache_app_push, 'storage_location': 2, 'ai_type': ai_type,
|
|
|
|
+ 'dealings_type': dealings_type}
|
|
logger.info('已创建s3对象,推送数据为:{}'.format(params))
|
|
logger.info('已创建s3对象,推送数据为:{}'.format(params))
|
|
# APP消息推送与获取报警消息数据列表
|
|
# APP消息推送与获取报警消息数据列表
|
|
result = DevicePushService.save_msg_push(uid_set_push_list, **params)
|
|
result = DevicePushService.save_msg_push(uid_set_push_list, **params)
|