package cn.iocoder.yudao.module.bpm.dal.mysql.financialpaymentitem;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpaymentitem.FinancialPaymentItemDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.*;

/**
 * 财务支付子表 Mapper
 *
 * @author 艾楷
 */
@Mapper
public interface FinancialPaymentItemMapper extends BaseMapperX<FinancialPaymentItemDO> {

    default PageResult<FinancialPaymentItemDO> selectPage(FinancialPaymentItemPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FinancialPaymentItemDO>()
                .eqIfPresent(FinancialPaymentItemDO::getFinancialPaymentId, reqVO.getFinancialPaymentId())
                .eqIfPresent(FinancialPaymentItemDO::getAmount, reqVO.getAmount())
                .eqIfPresent(FinancialPaymentItemDO::getNotes, reqVO.getNotes())
                .eqIfPresent(FinancialPaymentItemDO::getFileItems, reqVO.getFileItems())
                .betweenIfPresent(FinancialPaymentItemDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FinancialPaymentItemDO::getId));
    }

}