package com.liquidnet.service.kylin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.kylin.dao.OrderRefundDao;
import com.liquidnet.service.kylin.entity.KylinOrderRefunds;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 订单退款表 Mapper 接口
 * </p>
 *
 * @author jiangxiulong
 * @since 2021-05-26
 */
public interface KylinOrderRefundsMapper extends BaseMapper<KylinOrderRefunds> {
    List<KylinOrderRefunds> getRefundList(
            @Param("whereType") Integer whereType,
            @Param("refundBatchId") String refundBatchId,
            @Param("whereStatus") Integer[] whereStatus,
            @Param("mid") int mid,
            @Param("limitNum") int limitNum
    );

    double refundedTotalPrice(String orderTicketsId);

    List<OrderRefundDao> misRefundList(Map<String,Object> map);

    int selectRefundingCount(
            @Param("orderTicketsId") String orderTicketsId,
            @Param("orderRefundStatusCancel") Integer orderRefundStatusCancel,
            @Param("ticketEntityIds") List<String> ticketEntityIds
    );

    Double RefundPriceExpressSum(
            @Param("orderTicketsId") String orderTicketsId,
            @Param("orderRefundStatusCancel") Integer orderRefundStatusCancel
    );

    int selectEntitiesCount(
            @Param("orderTicketsId") String orderTicketsId,
            @Param("whereRefundingCount") Integer[] whereRefundingCount,
            @Param("orderRefundsId") String orderRefundsId,
            @Param("entitiesId") String entitiesId
    );
}
