package com.yc.ship.module.trade.dal.mysql.refund;


import com.yc.ship.framework.mybatis.core.mapper.BaseMapperX;
import com.yc.ship.module.trade.dal.dataobject.refund.RefundDetailDO;
import com.yc.ship.module.trade.service.order.bo.TradeOrderDetailBaseBO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * 退款明细 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface RefundDetailMapper extends BaseMapperX<RefundDetailDO> {

    int recoveryStatusByRefundId(@Param("refundId") Long refundId);

    int updateStatusByRefundId(@Param("refundId") Long refundId,@Param("refundStatus") Integer refundStatus);

    List<Map<String,Object>> selectRefundOrderProduct(@Param("refundId") Long refundId);
    List<Map<String,Object>> selectRefundOrderProductV2(@Param("refundId") Long refundId,@Param("noContainSpecList") List<String> noContainSpecList);
    Map<String,Object> selectOrderRefundAmount(@Param("orderId") Long orderId);
    Map<String,Object> selectOrderRefundFee(@Param("orderId") Long orderId);

    List<TradeOrderDetailBaseBO> selectProductBaseByRefund(@Param("refundId") Long refundId);
    List<TradeOrderDetailBaseBO> selectProjectCountByRefund(@Param("refundId") Long refundId,@Param("orderId") Long orderId);

    Map<String,Object> selectOrderApplyRefundAmount(@Param("orderId") Long orderId);

    List<Map<String,Object>> selectTradeDetailStatusByRefund(@Param("refundId") Long refundId);

    Map<String,Object> selectOrderOriginRefundAmount(@Param("orderId") Long orderId);
    Map<String, Object> selectRefundAmountFromOrderDetail(@Param("orderId")  Long orderId);
}