package com.zt.plat.module.contractorder.api;

import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.contractorder.api.dto.order.OrderDTO;
import com.zt.plat.module.contractorder.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 订单")
public interface OrderApi {
    String PREFIX = ApiConstants.PREFIX + "/order";
    @PostMapping(PREFIX + "/order-by-order-ids")
    @Operation(summary = "通过订单id获取订单信息", description = "通过订单编号获取订单信息")
    CommonResult<List<OrderDTO>> getOrderByOrderIds(@RequestBody List<Long> ids);

    @PostMapping(PREFIX + "/order-by-order-nos")
    @Operation(summary = "通过订单号批量获取订单信息", description = "通过订单编号获取订单信息")
    CommonResult<List<OrderDTO>> getOrderByOrderNos(@RequestBody List<String> orderNoS);
}
