package com.pj.api.client.level_two_server;

import com.pj.api.FeignInterceptor;
import com.pj.api.consts.FeignConsts;
import com.pj.api.dto.PurchaserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author Mechrevo
 * @Date 2023 08 01 10 38
 **/
@FeignClient(
        name = FeignConsts.LEVEL_TWO_SERVER, 				// 服务名称
        configuration = FeignInterceptor.class,		// 请求拦截器
        fallbackFactory = LevelTwoServerInterfaceFallback.class	// 服务降级
)
public interface LevelTwoServerInterface {

    @RequestMapping("/app/TbPurchaser/rpc/getByPurchaserId")
    public PurchaserDto getByPurchaserId(@RequestParam("id") Long id);

    /** 添加国内收购商信息 */
    @RequestMapping("/TbPurchaser/purchaserDto")
    public boolean purchaserDto(@RequestBody PurchaserDto purchaserDto);
}
