| | |
| | | hikPersonId := "" |
| | | if hikPersons != nil { |
| | | for _,hikP := range hikPersons { |
| | | if hikP.Phone == phoneNum { |
| | | if hikP.PhoneNo == phoneNum { |
| | | found = true |
| | | hikPersonId = hikP.PersonId |
| | | } |
| | |
| | | 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) |