package cn.newfeifan.mall.module.distri.dal.mysql.ptdailywithdrawal;


import cn.newfeifan.mall.framework.common.pojo.PageResult;
import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.newfeifan.mall.framework.mybatis.core.mapper.BaseMapperX;
import cn.newfeifan.mall.module.distri.dal.dataobject.ptdailywithdrawal.PtDailyWithdrawalDO;
import org.apache.ibatis.annotations.Mapper;
import cn.newfeifan.mall.module.distri.controller.admin.ptdailywithdrawal.vo.*;

/**
 * 平台每日提现记录 Mapper
 *
 * @author 非繁人
 */
@Mapper
public interface PtDailyWithdrawalMapper extends BaseMapperX<PtDailyWithdrawalDO> {

    default PageResult<PtDailyWithdrawalDO> selectPage(PtDailyWithdrawalPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PtDailyWithdrawalDO>()
                .eqIfPresent(PtDailyWithdrawalDO::getAmount, reqVO.getAmount())
                .eqIfPresent(PtDailyWithdrawalDO::getCount, reqVO.getCount())
                .eqIfPresent(PtDailyWithdrawalDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(PtDailyWithdrawalDO::getStartTime, reqVO.getStartTime())
                .betweenIfPresent(PtDailyWithdrawalDO::getEndTime, reqVO.getEndTime())
                .betweenIfPresent(PtDailyWithdrawalDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(PtDailyWithdrawalDO::getId));
    }

}