package com.bonus.core.account.v3.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.core.account.v3.model.AccTradeWalletDetail;
import com.bonus.core.account.v3.mq.send.model.RepAccMqDetailModel;
import com.bonus.core.account.v3.po.AccOrdTradeDetailPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface AccTradeWalletDetailMapper extends BaseMapper<AccTradeWalletDetail> {
   List<AccTradeWalletDetail> listCustMonthAccSubsidyExpirationTrade(@Param("custId") Long custId, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime);

   List<RepAccMqDetailModel> listAccTradeWalletDetailForSend(@Param("tradeIdList") List<Long> tradeIdList);

   List<Long> selectCustIdForSubsidyExpireTime(@Param("expireTime") LocalDateTime now);

   AccTradeWalletDetail selectOneSubsidyExpirationTrade(@Param("custId") Long custId, @Param("now") LocalDateTime now);

   List<AccTradeWalletDetail> queryAccTradeWalletDetailByLeOrdNo(@Param("orderId") Long orderId, @Param("tradeTypeList") List<Integer> tradeTypeList);

   List<AccTradeWalletDetail> queryAccTradeWalletDetailByOriginTradeId(@Param("originTradeId") Long originTradeId, @Param("tradeType") Integer tradeType);

   List<AccOrdTradeDetailPO> queryAccTradeOrderDetailByLeOrderNo(@Param("leOrderNo") Long leOrderNo, @Param("leOrderNoList") List<Long> leOrderNoList);


}
