TaskClient.java
1.12 KB
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
package com.viontech.integration.jiaoguansuo.feign;
import com.viontech.fanxing.commons.model.Task;
import com.viontech.fanxing.commons.vo.TaskVo;
import com.viontech.keliu.util.JsonMessageUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* .
*
* @author 谢明辉
* @date 2022/2/21
*/
@FeignClient(value = "fanxing-task")
@Service
public interface TaskClient {
@PostMapping("/tasks")
JsonMessageUtil.JsonMessage<TaskVo> addTask(@RequestBody TaskVo taskVo);
@GetMapping("/tasks")
JsonMessageUtil.JsonMessage<List<Task>> getTask(@SpringQueryMap Task task);
@DeleteMapping("/tasks/{id}")
JsonMessageUtil.JsonMessage removeTask(@PathVariable("id") Long id);
@PostMapping("/tasks/{id}")
JsonMessageUtil.JsonMessage<TaskVo> update(@PathVariable("id") Long id, @RequestBody Task task);
@GetMapping("/tasks/{id}/start")
JsonMessageUtil.JsonMessage<TaskVo> startTask(@PathVariable("id") Long id);
}