Quellcode durchsuchen

修复旧推送接口问题,修改自定义键值对

locky vor 2 Jahren
Ursprung
Commit
14d97eafa2

+ 2 - 2
Controller/DetectController.py

@@ -127,7 +127,7 @@ class NotificationView(View):
             params = {'nickname': nickname, 'uid': uid, 'kwag_args': kwag_args, 'is_st': is_st,
                       'is_sys_msg': is_sys_msg, 'channel': channel, 'event_type': event_type, 'n_time': n_time,
                       'electricity': '', 'bucket': bucket, 'app_push': '', 'storage_location': 1, 'ai_type': 0,
-                      'dealings_type': 0, 'detection': 0}
+                      'dealings_type': 0, 'detection': 0, 'device_type': 1}
             #  推送以及报警消息存库
             result = DevicePushService.save_msg_push(uid_set_push_list=uid_push_list, **params)
             if result['code_date'] is None:
@@ -212,7 +212,7 @@ class NotificationView(View):
                 res_data = {'code': 0, 'img_url_list': img_url_list, 'msg': 'success 3'}
                 return JsonResponse(status=200, data=res_data)
         except Exception as e:
-            logger.info('消息推送-异常详情,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
+            logger.info('旧推送接口异常,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
             data = {
                 'errLine': e.__traceback__.tb_lineno,
                 'errMsg': repr(e),

+ 1 - 1
Controller/DetectControllerV2.py

@@ -142,7 +142,7 @@ class NotificationV2View(View):
             result_dict = DevicePushService.get_push_url(**params)  # 获取S3对象上传链接
             return JsonResponse(status=200, data=result_dict)
         except Exception as e:
-            logger.info('消息推送-异常详情,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
+            logger.info('V2推送接口异常, errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
             data = {
                 'errLine': e.__traceback__.tb_lineno,
                 'errMsg': repr(e),

+ 2 - 1
Service/HuaweiPushService/HuaweiPushService.py

@@ -60,7 +60,8 @@ class HuaweiPushObject:
             # 自定义键值对
             data = {'alert': 'Motion', 'msg': '', 'sound': 'sound.aif', 'zpush': '1', 'uid': uid, 'nickname': nickname,
                     'event_type': event_type, 'received_at': n_time, 'event_time': n_time,
-                    'action': 'com.ansjer.zccloud_a.AJ_MainView.AJ_Home.AJMainActivity'
+                    'intent': 'intent://com.vivo.pushvideo/detail?#Intent;scheme=vpushscheme;launchFlags=0x10000000;S.uid={};S.event_type={};S.event_time={};end'.format(
+                        uid, event_type, n_time)
                     }
             data = json.dumps(data)
             # 推送通知内容配置