edbdata_import_fail.go 693 B

123456789101112131415161718192021222324252627282930
  1. package models
  2. import "github.com/beego/beego/v2/client/orm"
  3. type EdbdataImportFail struct {
  4. Id int `orm:"column(id);pk"`
  5. ClassifyName string
  6. CreateDate string
  7. SecName string
  8. Close string
  9. Remark string
  10. SysUserId string
  11. Frequency string
  12. Unit string
  13. }
  14. func AddEdbdataImportFail(item *EdbdataImportFail) (err error) {
  15. o := orm.NewOrmUsingDB("edb")
  16. _, err = o.Insert(item)
  17. return err
  18. }
  19. // DelEdbDataImportFail 删除导入指标失败记录
  20. func DelEdbDataImportFail(userId int) (err error) {
  21. o := orm.NewOrmUsingDB("edb")
  22. sql := `delete from edbdata_import_fail where sys_user_id=?`
  23. _, err = o.Raw(sql, userId).Exec()
  24. return err
  25. }