Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaowei
dlink
Commits
be186ad8
Unverified
Commit
be186ad8
authored
Mar 25, 2022
by
aiwenmo
Committed by
GitHub
Mar 25, 2022
Browse files
Options
Browse Files
Download
Plain Diff
[Feature-242][admin] add open api named savepointTask
[Feature-242][admin] add open api named savepointTask
parents
b10c3062
ca4646e3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
0 deletions
+35
-0
APIController.java
...min/src/main/java/com/dlink/controller/APIController.java
+6
-0
APISavePointTaskDTO.java
...dmin/src/main/java/com/dlink/dto/APISavePointTaskDTO.java
+20
-0
openapi_savepointtask.json
...-admin/src/main/resources/json/openapi_savepointtask.json
+9
-0
No files found.
dlink-admin/src/main/java/com/dlink/controller/APIController.java
View file @
be186ad8
...
...
@@ -71,4 +71,10 @@ public class APIController {
public
Result
executeJar
(
@RequestBody
APIExecuteJarDTO
apiExecuteJarDTO
)
{
return
Result
.
succeed
(
apiService
.
executeJar
(
apiExecuteJarDTO
),
"执行成功"
);
}
@PostMapping
(
"/savepointTask"
)
public
Result
savepointTask
(
@RequestBody
APISavePointTaskDTO
apiSavePointTaskDTO
)
{
return
Result
.
succeed
(
taskService
.
savepointTask
(
apiSavePointTaskDTO
.
getTaskId
(),
apiSavePointTaskDTO
.
getType
()),
"执行成功"
);
}
}
dlink-admin/src/main/java/com/dlink/dto/APISavePointTaskDTO.java
0 → 100644
View file @
be186ad8
package
com
.
dlink
.
dto
;
import
lombok.Getter
;
import
lombok.Setter
;
import
com.dlink.gateway.config.SavePointType
;
/**
* APISavePointTaskDTO
*
* @author wenmo
* @since 2022/03/25 19:05
*/
@Getter
@Setter
public
class
APISavePointTaskDTO
{
private
Integer
taskId
;
private
String
type
=
SavePointType
.
TRIGGER
.
getValue
();
}
dlink-admin/src/main/resources/json/openapi_savepointtask.json
0 → 100644
View file @
be186ad8
/*
http
:
//
127.0
.
0.1
:
8888
/openapi/savepointTask
*/
{
/*
required-start
*/
"taskId"
:
"1"
,
/*
required-end
*/
/*
custom-start
*/
"type"
:
"trigger"
//
trigger
|
stop
|
cancel
|
canceljob
/*
custom-start
*/
}
\ No newline at end of file
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