Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-operation-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-operation-api
Commits
75e139c0
Commit
75e139c0
authored
Jul 10, 2023
by
陈子龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-czl' into dev
parents
f320e6d8
d83da738
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
src/bean/vo/response/task_history.go
src/bean/vo/response/task_history.go
+2
-0
src/service/task_history.go
src/service/task_history.go
+3
-1
No files found.
src/bean/vo/response/task_history.go
View file @
75e139c0
...
@@ -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:"-"`
// 执行耗时
...
...
src/service/task_history.go
View file @
75e139c0
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment