fix
liuxiaolong
2020-06-30 b78548f07fae65c41759c359b91d1e37b1fb5a7b
fix
1个文件已修改
9 ■■■■ 已修改文件
models/userCar.go 9 ●●●● 补丁 | 查看 | 原始文档 | 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})
}