12345678910111213141516171819202122232425262728293031323334 |
- package models
- import (
- "eta_gn/eta_api/global"
- )
- type EdbImportFail struct {
- Id int `gorm:"column:id;primaryKey"` //`orm:"column(id);pk" gorm:"primaryKey" `
- ClassifyName string `gorm:"column:classify_name"`
- Frequency string `gorm:"column:frequency"`
- SecName string `gorm:"column:sec_name"`
- Unit string `gorm:"column:unit"`
- Remark string `gorm:"column:remark"`
- SysUserId string `gorm:"column:sys_user_id"`
- }
- func AddEdbImportFail(item *EdbImportFail) (err error) {
- err = global.DmSQL["edb"].Create(item).Error
- return err
- }
- // DelEdbImportFail 删除导入失败记录
- func DelEdbImportFail(userId int) (err error) {
- sql := `delete from edb_import_fail where sys_user_id=?`
- err = global.DmSQL["edb"].Exec(sql, userId).Error
- return err
- }
- // GetEdbImportFailList 获取指标数据导入失败数据
- func GetEdbImportFailList(sysUserId int) (items []*EdbImportFail, err error) {
- sql := ` SELECT * FROM edb_import_fail WHERE sys_user_id=? `
- err = global.DmSQL["edb"].Raw(sql, sysUserId).Find(&items).Error
- return
- }
|