package com.cf.imes.module.manage.api.plate;

import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.module.manage.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
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 =
@Tag(name = "RPC 服务 - 多组织")
public interface PlateApi {

    String PREFIX = ApiConstants.PREFIX + "/plate";

    @GetMapping(PREFIX +"/get")
    @Operation(summary = "获得板材信息表")
    @Parameter(name = "id", description = "编号", required = true, example = "1024")
    CommonResult<Boolean> getPlate(@RequestParam("id") Long id);

    @GetMapping(PREFIX +"/getGoodsId")
    @Operation(summary = "判断板材是否存在")
    @Parameter(name = "id", description = "客户的商品编号", required = true, example = "1024")
    CommonResult<Long> getPlateGoods(@RequestParam("id") Long goodsId);
}
