From 85f9175b3064094a09dbe9f71ba37b2f11f38e5f Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期三, 29 七月 2020 14:21:16 +0800
Subject: [PATCH] use sqlite, spaceNo add isMine

---
 service/userService.go |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/service/userService.go b/service/userService.go
index 5bd2303..a3e643f 100644
--- a/service/userService.go
+++ b/service/userService.go
@@ -46,10 +46,18 @@
 				IsDelete: false,
 			}
 			if _, e := u.Insert();e ==nil {
+				var plateNos = make([]string, 0)
+				hikVehicles := carSv.GetVehicleListByPerson(u.Id)
+
+				if hikVehicles != nil {
+					for _,up := range hikVehicles {
+						plateNos = append(plateNos, up.PlateNo)
+					}
+				}
 				return true, &vo.UserInfo{
 					UserId: u.Id,
 					PhoneNum: phoneNum,
-					PlateNos: []string{},
+					PlateNos: plateNos,
 				}, nil
 			} else {
 				fmt.Println("u.Insert err:", e)

--
Gitblit v1.8.0