liuxiaolong
2020-06-29 9b5710f23d6cbda9f2b0e650cf8916e7707d5588
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