models/userCar.go
@@ -29,8 +29,8 @@ func (uc *UserCar) Exist(userId string, plateNo string) bool { var list []UserCar o := orm.NewOrm() i,_ := o.Raw("select * from ? where userId=? and plateNo=?", uc.TableName(), userId, plateNo).QueryRows(&list) if i > 0 && len(list) >0 { o.Raw("select * from ? where userId=? and plateNo=?", uc.TableName(), userId, plateNo).QueryRows(&list) if len(list) >0 { return true } return false