From 2c6ad22bf27127c5fda8bb5bc6e209627d184a13 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 27 Feb 2025 19:31:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=BC=E5=87=BA=E8=A1=A8=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B9=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/lm/file_export/controller.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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 }