package com.cy.guoyan.admin.module.guoyan.dal.mysql.stateownedreformlawinfo;

import java.util.*;

import com.cy.guoyan.admin.framework.common.pojo.PageResult;
import com.cy.guoyan.admin.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cy.guoyan.admin.framework.mybatis.core.mapper.BaseMapperX;
import com.cy.guoyan.admin.module.guoyan.dal.dataobject.stateownedreformlawinfo.StateOwnedReformLawInfoDO;
import org.apache.ibatis.annotations.Mapper;
import com.cy.guoyan.admin.module.guoyan.controller.admin.stateownedreformlawinfo.vo.*;

/**
 * 国企改革法规信息 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface StateOwnedReformLawInfoMapper extends BaseMapperX<StateOwnedReformLawInfoDO> {

    default PageResult<StateOwnedReformLawInfoDO> selectPage(StateOwnedReformLawInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<StateOwnedReformLawInfoDO>()
                .eqIfPresent(StateOwnedReformLawInfoDO::getOid, reqVO.getOid())
                .eqIfPresent(StateOwnedReformLawInfoDO::getOidbf, reqVO.getOidbf())
                .eqIfPresent(StateOwnedReformLawInfoDO::getInfoNumber, reqVO.getInfoNumber())
                .likeIfPresent(StateOwnedReformLawInfoDO::getLawName, reqVO.getLawName())
                .eqIfPresent(StateOwnedReformLawInfoDO::getDocumentNumber, reqVO.getDocumentNumber())
                .eqIfPresent(StateOwnedReformLawInfoDO::getLevel, reqVO.getLevel())
                .eqIfPresent(StateOwnedReformLawInfoDO::getLevelCode, reqVO.getLevelCode())
                .eqIfPresent(StateOwnedReformLawInfoDO::getPublishDate, reqVO.getPublishDate())
                .eqIfPresent(StateOwnedReformLawInfoDO::getPublishYear, reqVO.getPublishYear())
                .eqIfPresent(StateOwnedReformLawInfoDO::getPublisher, reqVO.getPublisher())
                .eqIfPresent(StateOwnedReformLawInfoDO::getSummary, reqVO.getSummary())
                .eqIfPresent(StateOwnedReformLawInfoDO::getImage, reqVO.getImage())
                .betweenIfPresent(StateOwnedReformLawInfoDO::getImageDate, reqVO.getImageDate())
                .eqIfPresent(StateOwnedReformLawInfoDO::getTopicCategory, reqVO.getTopicCategory())
                .eqIfPresent(StateOwnedReformLawInfoDO::getTopicCategoryCode, reqVO.getTopicCategoryCode())
                .betweenIfPresent(StateOwnedReformLawInfoDO::getCreateTime, reqVO.getCreateTime())
                .likeIfPresent(StateOwnedReformLawInfoDO::getCreatorName, reqVO.getCreatorName())
                .likeIfPresent(StateOwnedReformLawInfoDO::getUpdaterName, reqVO.getUpdaterName())
                .eqIfPresent(StateOwnedReformLawInfoDO::getAuditStatus, reqVO.getAuditStatus())
                .eqIfPresent(StateOwnedReformLawInfoDO::getStatus, reqVO.getStatus())
                .eqIfPresent(StateOwnedReformLawInfoDO::getKeywords, reqVO.getKeywords())
                .eqIfPresent(StateOwnedReformLawInfoDO::getRegion, reqVO.getRegion())
                .eqIfPresent(StateOwnedReformLawInfoDO::getRegionCode, reqVO.getRegionCode())
                .betweenIfPresent(StateOwnedReformLawInfoDO::getAuditTime, reqVO.getAuditTime())
                .eqIfPresent(StateOwnedReformLawInfoDO::getAuditor, reqVO.getAuditor())
                .orderByDesc(StateOwnedReformLawInfoDO::getId));
    }

}