TaskFeignClient.java 1.32 KB
package com.viontech.fanxing.commons.feign;

import com.alibaba.fastjson.JSONObject;
import com.viontech.fanxing.commons.model.Task;
import com.viontech.fanxing.commons.model.main.VaServerInfo;
import com.viontech.fanxing.commons.vo.TaskVo;
import com.viontech.keliu.util.JsonMessageUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * .
 *
 * @author 谢明辉
 * @date 2021/7/16
 */

@FeignClient(value = "fanxing-task")
@Service
public interface TaskFeignClient {

    /**
     * 获取所有任务
     */
    @GetMapping("/tasks")
    JsonMessageUtil.JsonMessage<List<Task>> getAllTask();

    /**
     * 通过通道号获取任务
     */
    @GetMapping("/tasks")
    JsonMessageUtil.JsonMessage<List<Task>> getTaskByChannelUnid(@RequestParam("channelUnid") String channelUnid);

    /**
     * 更新任务
     */
    @PostMapping("/tasks/{id}")
    JsonMessageUtil.JsonMessage updateById(@PathVariable("id") Long id, @RequestBody TaskVo taskVo);

    /**
     * 获取全部的VaServer信息
     */
    @GetMapping("/vaServerInfo")
    JsonMessageUtil.JsonMessage<List<VaServerInfo>> vaServerInfo();

    @GetMapping("/status")
    JSONObject getVaServerStatusByDevId(@RequestParam String devId);

}