package models import "github.com/beego/beego/v2/client/orm" type EdbdataImportFail struct { Id int `orm:"column(id);pk"` ClassifyName string CreateDate string SecName string Close string Remark string SysUserId string Frequency string Unit string } func AddEdbdataImportFail(item *EdbdataImportFail) (err error) { o := orm.NewOrmUsingDB("edb") _, err = o.Insert(item) return err } // DelEdbDataImportFail 删除导入指标失败记录 func DelEdbDataImportFail(userId int) (err error) { o := orm.NewOrmUsingDB("edb") sql := `delete from edbdata_import_fail where sys_user_id=?` _, err = o.Raw(sql, userId).Exec() return err }