diff --git a/features/lm/file_export/controller.go b/features/lm/file_export/controller.go index 020968d8..ab2f506f 100644 --- a/features/lm/file_export/controller.go +++ b/features/lm/file_export/controller.go @@ -29,21 +29,17 @@ type SysJobResponse struct { } type TargetParams struct { - Duration int `json:"duration"` - TableName string `json:"tableName"` - Columns string `json:"columns"` // exported column name of time string - TimeCol string `json:"timeCol"` // time stamp of column name - TimeUnit string `json:"timeUnit"` // timestamp unit: second/micro/milli - Extras string `json:"extras"` // extras condition for where - FilePath string `json:"filePath"` // file path + Hour int `json:"hour"` // hour + TableName string `json:"tableName"` + Columns []string `json:"columns"` + FilePath string `json:"filePath"` // file path } func (m *SysJob) GetFileExportTable(c *gin.Context) { var results []SysJob - err := db.DB("").Table(m.TableName()).Where("invoke_target=? and status=1", INVOKE_FILE_EXPORT). - Find(&results).Error - if err != nil { + tx := db.DB("").Table("sys_job").Where("invoke_target=?", INVOKE_FILE_EXPORT) + if err := tx.Find(&results).Error; err != nil { c.JSON(http.StatusOK, services.ErrResp(err.Error())) return }