123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package models
- import (
- "eta_gn/eta_api/utils"
- "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
- }
- // MultiAddEdbdataImportFail
- // @Description: 批量添加导入失败的信息
- // @author: Roc
- // @datetime 2024-07-30 19:48:06
- // @param items []*EdbdataImportFail
- // @return err error
- func MultiAddEdbdataImportFail(items []*EdbdataImportFail) (err error) {
- o := orm.NewOrmUsingDB("edb")
- _, err = o.InsertMulti(utils.MultiAddNum, items)
- 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
- }
|