wangrong
2026-08-30 4c949c0dc9bcae785c281c9d8125295f09810b15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package io.dataease.api.sync.task.api;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.dataease.api.sync.task.dto.TaskGridRequest;
import io.dataease.api.sync.task.dto.TaskInfoDTO;
import io.dataease.api.sync.task.vo.TaskInfoVO;
import io.dataease.auth.DeApiPath;
import io.dataease.exception.DEException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
 
import java.util.List;
 
import static io.dataease.constant.AuthResourceEnum.TASK;
 
/**
 * @author fit2cloud
 * @date 2023/11/20 10:14
 **/
@Tag(name = "同步管理:任务管理")
@ApiSupport(order = 888, author = "fit2cloud-someone")
@DeApiPath(value = "/sync/task", rt = TASK)
public interface TaskApi {
 
    @Operation(hidden = true)
    @PostMapping("/pager/{goPage}/{pageSize}")
    IPage<TaskInfoVO> pager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody TaskGridRequest request);
 
    @Operation(hidden = true)
    @PostMapping("/add")
    void add(@RequestBody TaskInfoDTO jobInfo) throws DEException;
 
    @Operation(hidden = true)
    @PostMapping("/update")
    void update(@RequestBody TaskInfoDTO jobInfo) throws DEException;
 
    @Operation(hidden = true)
    @PostMapping("/remove/{id}")
    void remove(@PathVariable(value = "id") String id) throws DEException;
 
    @Operation(hidden = true)
    @GetMapping("start/{id}")
    void startJob(@PathVariable(value = "id") String id) throws DEException;
 
    @Operation(hidden = true)
    @GetMapping("stop/{id}")
    void stopJob(@PathVariable(value = "id") String id) throws DEException;
 
    @Operation(hidden = true)
    @GetMapping("/get/{id}")
    TaskInfoVO getOneById(@PathVariable(value = "id") String id) throws DEException;
 
    @Operation(summary = "执行一次任务")
    @GetMapping("/execute/{id}")
    void execute(@PathVariable(value = "id") String id) throws DEException;
 
    @Operation(hidden = true)
    @PostMapping("/batch/del")
    void batchDelete(@RequestBody List<String> ids) throws DEException;
 
    @Operation(hidden = true)
    @GetMapping("/count")
    Long count() throws DEException;
 
    @GetMapping("/query2Root/{id}")
    String query2Root(@PathVariable("id") Long id);
 
    @GetMapping("/getLogResourceId/{id}")
    Long getLogResourceId(@PathVariable("id") String id);
 
}