Commit 75e139c0 authored by 陈子龙's avatar 陈子龙

Merge branch 'dev-czl' into dev

parents f320e6d8 d83da738
...@@ -25,6 +25,8 @@ type TaskInfoListRes struct { ...@@ -25,6 +25,8 @@ type TaskInfoListRes struct {
type TaskExecLogRes struct { type TaskExecLogRes struct {
Id int `json:"id"` // 主键id Id int `json:"id"` // 主键id
ExecDesc string `json:"exec_desc"` // 执行说明
TaskName string `json:"task_name"` // 任务名称
ExecStartTime time.Time `json:"exec_start_time" ` // 执行开始时间 ExecStartTime time.Time `json:"exec_start_time" ` // 执行开始时间
ExecEndTime time.Time `json:"exec_end_time"` // 执行结束时间 ExecEndTime time.Time `json:"exec_end_time"` // 执行结束时间
ExecTime int `json:"exec_time" xorm:"-"` // 执行耗时 ExecTime int `json:"exec_time" xorm:"-"` // 执行耗时
......
...@@ -122,7 +122,9 @@ func (t *TaskHistorySvc) TaskExecLog(id int) (taskExecLogRes response.TaskExecLo ...@@ -122,7 +122,9 @@ func (t *TaskHistorySvc) TaskExecLog(id int) (taskExecLogRes response.TaskExecLo
} }
//查询 //查询
_, err = db.Table("task_history").Where("id = ?", id).Get(&taskExecLogRes) _, err = db.Table("task_history").Alias("th").Where("id = ?", id).
Select("th.id,th.exec_desc,(select tm.task_name from task_manage tm where th.task_id = tm.id and tm.is_delete = 0) as task_name," +
"th.exec_start_time,th.exec_end_time,th.state,th.exec_log").Get(&taskExecLogRes)
if err != nil { if err != nil {
err = resp.DbSelectError.WithError(err) err = resp.DbSelectError.WithError(err)
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment