package cn.iocoder.yudao.module.product.api.harvestbatch;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.product.api.harvestbatch.dto.HarvestBatchDTO;
import cn.iocoder.yudao.module.product.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
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 java.util.List;


@FeignClient(name = ApiConstants.NAME)
@Api(tags = "管理后台 - 采收批次")
public interface HarvestBatchApi {
    String PREFIX = ApiConstants.PRODUCT + "/harvest-batch";

    @GetMapping(PREFIX + "/getHarvestInfoListByInputId")
    @ApiOperation("获得采收批次列表")
    @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
    CommonResult<List<HarvestBatchDTO>> getHarvestInfoListByInputId(@RequestParam("ids") List<String> ids);

    @GetMapping(PREFIX + "/getHarvestInfoListByGoodsId")
    @ApiOperation("获得采收批次列表,根据商品编码")
    @ApiImplicitParam(name = "goodsId", value = "商品编码", required = true, example = "GOCD202304131028TSOC", dataTypeClass = String.class)
    CommonResult<List<HarvestBatchDTO>> getHarvestInfoListByGoodsId(@RequestParam("goodsId") String goodsId);

    @GetMapping(PREFIX + "/getHarvestBatchById")
    @ApiOperation("根据采收批次ID获取采收批次信息")
    @ApiImplicitParam(name = "harvestBatchId", value = "采收批次编码", required = true, example = "1", dataTypeClass = String.class)
    CommonResult<HarvestBatchDTO> getHarvestBatchById(@RequestParam("harvestBatchId") String harvestBatchId);
}

