From f3f7088545c2be0b6da1b4e5e1d8461fa57a63fc Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期二, 08 九月 2020 15:03:56 +0800 Subject: [PATCH] fix url and fix testNightPush --- service/msgPush.go | 9 +++++++-- routers/router.go | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/routers/router.go b/routers/router.go index 7606e6f..4cdf460 100644 --- a/routers/router.go +++ b/routers/router.go @@ -61,7 +61,7 @@ beego.Router(preApi+"/car/crossRecord", &controllers.CarController{}, "*:CrossRecord") beego.Router(preApi+"/car/testPush", &controllers.CarController{}, "*:TestPush") - beego.Router(preApi+"/testNightPush", &controllers.CarController{}, "*:TestNightPush") + beego.Router(preApi+"/car/testNightPush", &controllers.CarController{}, "*:TestNightPush") beego.Router(preApi+"/car/pushLog", &controllers.CarController{}, "*:PushLog") beego.Router(preApi+"/car/spaceInfo", &controllers.CarController{}, "*:SpaceInfo") beego.Router(preApi+"/car/spaceUser", &controllers.CarController{}, "*:SpaceUser") diff --git a/service/msgPush.go b/service/msgPush.go index 2a0c879..f23263c 100644 --- a/service/msgPush.go +++ b/service/msgPush.go @@ -194,6 +194,7 @@ } iosPush := map[string]interface{}{ "type":"notify", + "payload": "鑲茶嫳涓鍋滆溅", "aps":map[string]interface{}{ "alert":map[string]string{ "title": title, @@ -560,10 +561,14 @@ if personId,ok := carPersonM[inCnPlateNo];ok { if v,ex := hikPersonMap[personId]; ex { - carOwners = append(carOwners, v.PersonName) + carOwners = append(carOwners, sn.PlateNo+"("+v.PersonName+")") } } else { //鎵句笉鍒拌溅涓伙紝鍗宠涓轰复鏃惰溅锛屽皢杞︾墝浣滀负杞︿富濮撳悕鎺ㄩ�� - carOwners = append(carOwners, sn.PlateNo) + if sn.PlateNo == "鏃犺溅鐗�" { + carOwners = append(carOwners, sn.PlateNo) + } else { + carOwners = append(carOwners, sn.PlateNo+"()") + } } } } -- Gitblit v1.8.0