package com.crm.pay.dao.mapper;

import com.crm.rely.backend.model.entity.finance.withdraw.FinanceWithdrawSearchListEntity;
import com.crm.rely.backend.model.pojo.view.FinanceWithdrawView;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

@Repository
public interface FinanceWithdrawMapper {

    Integer countList(FinanceWithdrawSearchListEntity entity);

    List<FinanceWithdrawView> pageList(FinanceWithdrawSearchListEntity entity);

    List<FinanceWithdrawView> listByIds(@Param("ids") List<Long> ids, @Param("stamp") String stamp);

    FinanceWithdrawView getOne(Long id);

    BigDecimal getWithdrawAmountThatDayByCustomIdAndPayType(@Param("customId") Long customId, @Param("payType") String payType);

    Integer getCountByDateAndCId(@Param("startDate") Date startDate, @Param("endDate") Date endDate,
                                 @Param("cId") Long cId, @Param("feeReduction") Integer feeReduction);

}
