package cn.iocoder.yudao.module.basic.api.dealerinfo;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.basic.api.dealerinfo.dto.DealerInfoRespDTO;
import cn.iocoder.yudao.module.basic.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Api(tags = "RPC 服务 - 经销商")
public interface DealerInfoApi {

    String PREFIX = ApiConstants.PREFIX + "/dealer-info";

    @GetMapping(PREFIX + "/getDealerGoodsInfoByDealerGoodsId")
    @ApiOperation("根据经销商编码获取经销商信息")
    @ApiImplicitParam(name = "dealerId", value = "经销商编号", required = true, example = "1024", dataTypeClass = Long.class)
    CommonResult<DealerInfoRespDTO> getDealerGoodsInfoByDealerGoodsId(@RequestParam("dealerId") String dealerId);

    @GetMapping(PREFIX + "/getDealerInfoByGoods")
    @ApiOperation("根据经销商编码获取经销商信息")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "dealerId", value = "经销商编码", required = true, example = "DACD2023052317274X9K", dataTypeClass = String.class),
        @ApiImplicitParam(name = "businessInfoId", value = "商户信息ID", required = true, example = "1", dataTypeClass = Long.class),
        @ApiImplicitParam(name = "goodsId", value = "商品编码", required = true, example = "GOCD202305221712VZEW", dataTypeClass = String.class)
    })
    CommonResult<DealerInfoRespDTO> getDealerInfoByGoods(@RequestParam("dealerId") String dealerId, @RequestParam("businessInfoId") Long businessInfoId, @RequestParam("goodsId") String goodsId);
}
