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


import com.yc.ship.framework.mybatis.core.mapper.BaseMapperX;
import com.yc.ship.framework.tenant.core.aop.TenantIgnore;
import com.yc.ship.module.trade.dal.dataobject.order.TradeDetailDO;
import com.yc.ship.module.trade.dal.dataobject.order.TradeOrderDO;
import com.yc.ship.module.trade.service.order.bo.TradeDetailGuideRefundBO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;


/**
 * 订单明细 业务 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface TradeDetailBizMapper extends BaseMapperX<TradeDetailDO> {

    @TenantIgnore
    List<TradeDetailGuideRefundBO> selectInnerTradeDetailWithBaseByGuideRefund(@Param("refundId") String refundId);
    List<TradeDetailGuideRefundBO> selectTradeDetailWithBaseByGuideRefund(@Param("refundId") String refundId);
    TradeOrderDO selectTradeOrderByGuideRefund(@Param("refundId") String refundId);
    @TenantIgnore
    Integer selectInnerGuideRefundCount(@Param("orderNO") String orderNO,@Param("detailIdList") List<Long> detailIdList);
    Integer selectGuideRefundCount(@Param("orderId") Long orderId,@Param("detailIdList") List<Long> detailIdList);
    Map<String,BigDecimal> selectSelfDetailTotalAmount(@Param("detailId") Long detailId);
}
