From 6ecda400e04a118326cabe768f8808e9b5514af6 Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期三, 05 八月 2020 19:46:35 +0800 Subject: [PATCH] set 90 spaceNum,limit <=5 push msg --- service/carService.go | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/service/carService.go b/service/carService.go index edddb6b..d9a9ce0 100644 --- a/service/carService.go +++ b/service/carService.go @@ -7,6 +7,7 @@ "encoding/json" "fmt" "github.com/astaxie/beego" + "strconv" ) type CarService struct { hikUtil *reqUtil.HikHttpUtil @@ -207,6 +208,18 @@ } //} //} + if len(resultList) == 0 { + for i:=1;i<91;i++ { + pi := models.PosInfo { + SpaceNo: strconv.Itoa(i), + PosNo: "", + State: 1, + PlateNo: "", + IsMine: false, + } + resultList = append(resultList, pi) + } + } return resultList } -- Gitblit v1.8.0