ChannelRiskClient.java 1.33 KB
package cn.com.glsx.stdinterface.api;

import cn.com.glsx.stdinterface.dto.ChannelRiskDto;
import cn.com.glsx.stdinterface.factory.ChannelRiskFallbackFactory;
import com.glsx.plat.core.web.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author zhouhaibao
 * @date 2021/5/24 9:49
 */
@FeignClient(name = "ne-shield-standard-interfaces", path = "/nesi/channelrisk", fallbackFactory = ChannelRiskFallbackFactory.class, decode404 = true)
public interface ChannelRiskClient {

    @GetMapping(value = "/selectbyworkstandsn", consumes = MediaType.APPLICATION_JSON_VALUE)
    R selectByWorkStandSn(@RequestParam(value = "workorderNo") String workorderNo, @RequestParam(value = "vin") String vin, @RequestParam(value = "sn") String sn);

    @PostMapping(value = "/insertchannelriskdata", consumes = MediaType.APPLICATION_JSON_VALUE)
    R insertChannelRiskData(@RequestBody ChannelRiskDto newData);

    @PostMapping(value = "/updatechannelriskdata", consumes = MediaType.APPLICATION_JSON_VALUE)
    R updateChannelRiskData(@RequestBody ChannelRiskDto newData);

}