edbdata_import_fail.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package models
  2. import (
  3. "eta_gn/eta_api/global"
  4. "eta_gn/eta_api/utils"
  5. )
  6. type EdbdataImportFail struct {
  7. Id int `gorm:"column:id;primaryKey;autoIncrement" description:"主键ID"`
  8. ClassifyName string `gorm:"column:classify_name" description:"分类名称"`
  9. CreateDate string `gorm:"column:create_date" description:"创建日期"`
  10. SecName string `gorm:"column:sec_name" description:"部门名称"`
  11. Close string `gorm:"column:close" description:"关闭状态"`
  12. Remark string `gorm:"column:remark" description:"备注"`
  13. SysUserId string `gorm:"column:sys_user_id" description:"系统用户ID"`
  14. Frequency string `gorm:"column:frequency" description:"频率"`
  15. Unit string `gorm:"column:unit" description:"单位"`
  16. }
  17. // MultiAddEdbdataImportFail
  18. // @Description: 批量添加导入失败的信息
  19. // @author: Roc
  20. // @datetime 2024-07-30 19:48:06
  21. // @param items []*EdbdataImportFail
  22. // @return err error
  23. func MultiAddEdbdataImportFail(items []*EdbdataImportFail) (err error) {
  24. err = global.DmSQL["edb"].CreateInBatches(items, utils.MultiAddNum).Error
  25. return err
  26. }
  27. // DelEdbDataImportFail 删除导入指标失败记录
  28. func DelEdbDataImportFail(userId int) (err error) {
  29. sql := `delete from edbdata_import_fail where sys_user_id=?`
  30. err = global.DmSQL["edb"].Exec(sql, userId).Error
  31. return err
  32. }