package cn.iocoder.yudao.module.member.dal.mysql.admincard;

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.member.dal.dataobject.admincard.AdminCardDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.member.controller.admin.admincard.vo.*;

/**
 * 管理员卡 Mapper
 *
 * @author 开发账号
 */
@Mapper
public interface AdminCardMapper extends BaseMapperX<AdminCardDO> {

    default PageResult<AdminCardDO> selectPage(AdminCardPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AdminCardDO>()
                .eqIfPresent(AdminCardDO::getCardNo, reqVO.getCardNo())
                .betweenIfPresent(AdminCardDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AdminCardDO::getId));
    }

}