liuxiaolong
2020-07-29 85f9175b3064094a09dbe9f71ba37b2f11f38e5f
service/userService.go
@@ -30,7 +30,7 @@
         hikPersonId := ""
         if hikPersons != nil {
            for _,hikP := range hikPersons {
               if hikP.Phone == phoneNum {
               if hikP.PhoneNo == phoneNum {
                  found = true
                  hikPersonId = hikP.PersonId
               }
@@ -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)