From 54ad4cfcd5fe5cb949ba491370f129a8f6c3846f Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期三, 29 七月 2020 16:30:52 +0800
Subject: [PATCH] add spaceNo data

---
 service/carService.go |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/service/carService.go b/service/carService.go
index edddb6b..4848976 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<89;i++ {
+			pi := models.PosInfo {
+				SpaceNo: strconv.Itoa(i),
+				PosNo: "",
+				State: 1,
+				PlateNo: "",
+				IsMine: false,
+			}
+			resultList = append(resultList, pi)
+		}
+	}
 
 	return resultList
 }

--
Gitblit v1.8.0