package com.sckw.payment.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sckw.payment.model.KwpSettlementTrade;
import com.sckw.payment.model.dto.LedgerUnitDto;
import com.sckw.payment.model.dto.SettlementTradeDto;
import com.sckw.payment.model.vo.req.SettlementTradeReq;
import com.sckw.payment.model.vo.res.SettlementSumVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * @author xucaiqin
 * @date 2023-07-10 16:42:19
 */

@Mapper
public interface KwpSettlementTradeMapper extends BaseMapper<KwpSettlementTrade> {
    List<SettlementTradeDto> pageSelect(@Param("settlementReq") SettlementTradeReq settlementReq);

    SettlementSumVo sumMoney(@Param("settlementReq") SettlementTradeReq settlementReq);

    Map<String, Long> countOrder(@Param("settlementReq") SettlementTradeReq settlementReq);

    List<SettlementTradeDto> selectByIds(@Param("ids") List<Long> ids, @Param("unitType") Integer unitType);

    SettlementTradeDto getById(@Param("id") Long id, @Param("unitType") Integer unitType);

    List<LedgerUnitDto> getListById(@Param("id") Long id);
}