models/userCar.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
models/userCar.go
@@ -1,7 +1,6 @@ package models import ( "fmt" "github.com/astaxie/beego/orm" ) @@ -41,11 +40,5 @@ func (uc *UserCar) Delete(userId string, plateNo string) (int64, error) { o := orm.NewOrm() sql := fmt.Sprintf("delete from "+uc.TableName()+" where userId=%s and plateNo=%s", userId, plateNo) fmt.Println("sql:", sql) result, err := o.Raw(sql).Exec() if err != nil { return 0, err } return result.RowsAffected() return o.Delete(&UserCar{UserId: userId, PlateNo: plateNo}) }