fix: job for export table to file
This commit is contained in:
@@ -45,7 +45,7 @@ func (m *SysJob) GetFileExportTable(c *gin.Context) {
|
||||
var response []SysJobResponse
|
||||
for _, job := range results {
|
||||
var params TargetParams
|
||||
if err := json.Unmarshal(job.TargetParams, ¶ms); err != nil {
|
||||
if err := json.Unmarshal([]byte(job.TargetParams), ¶ms); err != nil {
|
||||
c.JSON(http.StatusInternalServerError, services.ErrResp(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package file_export
|
||||
|
||||
import (
|
||||
"be.ems/lib/file"
|
||||
"gorm.io/datatypes"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -10,9 +9,9 @@ const (
|
||||
)
|
||||
|
||||
type SysJob struct {
|
||||
JobID int64 `gorm:"column:job_id;primary_key;auto_increment" json:"job_id"` //任务ID
|
||||
InvokeTarget string `gorm:"column:invoke_target" json:"invoke_target"` //调用目标字符串
|
||||
TargetParams datatypes.JSON `gorm:"column:target_params;type:json" json:"target_params,omitempty"` //调用目标传入参数
|
||||
JobID int64 `gorm:"column:job_id;primary_key;auto_increment" json:"job_id"` //任务ID
|
||||
InvokeTarget string `gorm:"column:invoke_target" json:"invoke_target"` //调用目标字符串
|
||||
TargetParams string `gorm:"column:target_params;type:json" json:"target_params,omitempty"` //调用目标传入参数
|
||||
}
|
||||
|
||||
func (m *SysJob) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user