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


import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.basic.api.dealergoods.dto.DealerGoodsRespDTO;
import cn.iocoder.yudao.module.basic.enums.ApiConstants;
import io.swagger.annotations.Api;
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;

import javax.annotation.security.PermitAll;
import java.util.List;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Api(tags = "RPC 服务 - 经销商经销产品")
public interface DealerGoodsApi {
    String PREFIX = ApiConstants.PREFIX + "/dealer-goods";

    @GetMapping( PREFIX +"/getSaleAreasByGoodsAndDealer")
    @PermitAll // 无需登陆
    @ApiOperation("根据商品ID和经销商ID获取所有对应的销售区域")
    CommonResult<List<DealerGoodsRespDTO>> getSaleAreasByGoodsAndDealer(@RequestParam("goodsId") String goodsId,
                                                                        @RequestParam("dealerId") String dealerId);
}
