liuxiaolong
2020-06-29 9b5710f23d6cbda9f2b0e650cf8916e7707d5588
service/userService.go
@@ -58,6 +58,19 @@
}
func (sv *UserService) AddPlateNo(userId, plateNo string) bool {
   var uc models.UserCar
   if uc.Exist(userId, plateNo) {
      return true
   }
   tmp := models.UserCar{
      Id: uuid.NewV4().String(),
      UserId: userId,
      PlateNo: plateNo,
   }
   _, err := tmp.Insert()
   if err == nil {
      return true
   }
   return false
}