fix
liuxiaolong
2020-06-30 23ff36c6b535ee9ff9c72f666214589535a9400c
models/userCar.go
@@ -1,6 +1,7 @@
package models
import (
   "fmt"
   "github.com/astaxie/beego/orm"
)
@@ -40,5 +41,10 @@
func (uc *UserCar) Delete(userId string, plateNo string) (int64, error) {
   o := orm.NewOrm()
   return o.Delete(&UserCar{UserId: userId, PlateNo: plateNo})
   sql := fmt.Sprintf("delete from "+uc.TableName()+" where userId='%s' and plateNo='%s'", userId, plateNo)
   result, err := o.Raw(sql).Exec()
   if err != nil {
      return 0, err
   }
   return result.RowsAffected()
}