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


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.applicationforwithdrawalchannel.ApplicationForWithdrawalChannelDO;
import org.apache.ibatis.annotations.Mapper;
import cn.newfeifan.mall.module.distri.controller.app.applicationforwithdrawalchannel.vo.*;

/**
 * 提现渠道记录 Mapper
 *
 * @author 非繁人
 */
@Mapper
public interface ApplicationForWithdrawalChannelMapper extends BaseMapperX<ApplicationForWithdrawalChannelDO> {

    default PageResult<ApplicationForWithdrawalChannelDO> selectPage(AppApplicationForWithdrawalChannelPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ApplicationForWithdrawalChannelDO>()
                .eqIfPresent(ApplicationForWithdrawalChannelDO::getWithdrawalType, reqVO.getWithdrawalType())
                .likeIfPresent(ApplicationForWithdrawalChannelDO::getWithdrawalName, reqVO.getWithdrawalName())
                .eqIfPresent(ApplicationForWithdrawalChannelDO::getAmount, reqVO.getAmount())
                .eqIfPresent(ApplicationForWithdrawalChannelDO::getCount, reqVO.getCount())
                .eqIfPresent(ApplicationForWithdrawalChannelDO::getStatus, reqVO.getStatus())
                .eqIfPresent(ApplicationForWithdrawalChannelDO::getPtDailyWithdrawalId, reqVO.getPtDailyWithdrawalId())
                .betweenIfPresent(ApplicationForWithdrawalChannelDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ApplicationForWithdrawalChannelDO::getId));
    }

}