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 }