OpsClient.java 910 Bytes
package com.viontech.integration.jiaoguansuo.feign;

import com.viontech.fanxing.commons.model.Channel;
import com.viontech.fanxing.commons.vo.ChannelVo;
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-ops")
@Service
public interface OpsClient {

    @GetMapping("/channels")
    JsonMessageUtil.JsonMessage<List<Channel>> getChannels(@SpringQueryMap Channel channel);

    @PostMapping("/channels")
    JsonMessageUtil.JsonMessage<Channel> add(@RequestBody Channel channel);

    @DeleteMapping("/channels/{id}")
    JsonMessageUtil.JsonMessage remove(@PathVariable("id") Long id);

}