package com.sckw.payment.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sckw.payment.model.KwpLedgerTrade;
import com.sckw.payment.model.dto.LedgerPurchaseDto;
import com.sckw.payment.model.dto.LedgerSellDto;
import com.sckw.payment.model.dto.LedgerTradeDto;
import com.sckw.payment.model.vo.req.TradeReq;
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-17 15:34:43
 */

@Mapper
public interface KwpLedgerTradeMapper extends BaseMapper<KwpLedgerTrade> {

    List<LedgerSellDto> sellList(@Param("tradeReq") TradeReq tradeReq);

    List<LedgerPurchaseDto> purchaseList(@Param("tradeReq") TradeReq tradeReq);

    Map<String, Long> countOrder(@Param("tradeReq") TradeReq tradeReq);

    LedgerTradeDto selectId(@Param("id") Long id, @Param("unitType") Integer unitType);

    List<LedgerSellDto> selectSellIds(@Param("ids") List<Long> ids);

    List<LedgerPurchaseDto> selectPurchaseIds(@Param("ids") List<Long> ids);
}