package com.yc.ship.module.trade.service.supplier;


import com.yc.ship.framework.common.pojo.CommonResult;
import com.yc.ship.module.trade.dal.dataobject.order.TradeOrderDO;
import com.yc.ship.module.trade.dal.dataobject.order.TradeVisitorDO;
import com.yc.ship.module.trade.service.order.bo.TradeOrderBO;
import com.yc.ship.module.trade.service.refund.bo.RefundAuditNotifyBO;
import com.yc.ship.module.trade.service.refund.bo.TradeRefundBO;
import com.yc.ship.module.trade.service.supplier.bo.TradeSupplierOrderRespBO;

import java.util.List;

/**
 * &#064;Description 平台供应商交易服务
 * &#064;Author qsl
 * &#064;Date 2025/6/4 15:03
 */
public interface TradeSupplierService {

    /**
     * 向供应商下单
     * @param tradeOrderBO
     * @return
     */
    CommonResult<TradeSupplierOrderRespBO> createOrder(TradeOrderBO tradeOrderBO);

    /**
     * 向供应商支付出票
     * @param tradeOrderDO
     * @return
     */
    CommonResult<?> payOrder(TradeOrderDO tradeOrderDO);


    /**
     * 向供应商发起退款
     * @param tradeRefundBO
     * @return
     */
    CommonResult<?> refund(TradeRefundBO tradeRefundBO);

    /**
     * 退款重试
     * @param supplierRefundId
     * @return
     */
    CommonResult<?> retryRefund(Long supplierRefundId);

    /**
     * 支付重试
     * @param supplierOrderId
     * @return
     */
    CommonResult<?> retryPayOrder(Long supplierOrderId);

    /**
     * 处理供应商退款审核结果
     * @param refundAuditNotifyBO
     * @return
     */
    CommonResult<?> handleRefundAuditNotify(RefundAuditNotifyBO refundAuditNotifyBO);

    /**
     * 绑定游客
     * @param orderId
     * @param tradeVisitorDOList
     * @return
     */
    CommonResult<?> bindVisitor(Long orderId,List<TradeVisitorDO> tradeVisitorDOList);

    /**
     * 取消订单
     * @param tradeOrderDO
     * @return
     */
    CommonResult<?> cancelOrder(TradeOrderDO tradeOrderDO,Boolean isManual);

    void mergeSupplierOrder(Long addOrderId, Long mainOrderId);
}
