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

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.stateownedreformlawcategory.StateOwnedReformLawCategoryDO;
import org.apache.ibatis.annotations.Mapper;
import com.cy.guoyan.admin.module.guoyan.controller.admin.stateownedreformlawcategory.vo.*;

/**
 * 国企改革法规主题分类 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface StateOwnedReformLawCategoryMapper extends BaseMapperX<StateOwnedReformLawCategoryDO> {

    default PageResult<StateOwnedReformLawCategoryDO> selectPage(StateOwnedReformLawCategoryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<StateOwnedReformLawCategoryDO>()
                .eqIfPresent(StateOwnedReformLawCategoryDO::getOid, reqVO.getOid())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getCategoryCode, reqVO.getCategoryCode())
                .likeIfPresent(StateOwnedReformLawCategoryDO::getCategoryName, reqVO.getCategoryName())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getLevel, reqVO.getLevel())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getParentCode, reqVO.getParentCode())
                .likeIfPresent(StateOwnedReformLawCategoryDO::getParentName, reqVO.getParentName())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getLevel1Code, reqVO.getLevel1Code())
                .likeIfPresent(StateOwnedReformLawCategoryDO::getLevel1Name, reqVO.getLevel1Name())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getLevel2Code, reqVO.getLevel2Code())
                .likeIfPresent(StateOwnedReformLawCategoryDO::getLevel2Name, reqVO.getLevel2Name())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getLevel3Code, reqVO.getLevel3Code())
                .likeIfPresent(StateOwnedReformLawCategoryDO::getLevel3Name, reqVO.getLevel3Name())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getLevel4Code, reqVO.getLevel4Code())
                .likeIfPresent(StateOwnedReformLawCategoryDO::getLevel4Name, reqVO.getLevel4Name())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getLevel5Code, reqVO.getLevel5Code())
                .likeIfPresent(StateOwnedReformLawCategoryDO::getLevel5Name, reqVO.getLevel5Name())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getOrder1, reqVO.getOrder1())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getOrder2, reqVO.getOrder2())
                .betweenIfPresent(StateOwnedReformLawCategoryDO::getCreateTime, reqVO.getCreateTime())
                .likeIfPresent(StateOwnedReformLawCategoryDO::getCreatorName, reqVO.getCreatorName())
                .likeIfPresent(StateOwnedReformLawCategoryDO::getUpdaterName, reqVO.getUpdaterName())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getStatus, reqVO.getStatus())
                .eqIfPresent(StateOwnedReformLawCategoryDO::getInfoCount, reqVO.getInfoCount())
                .orderByDesc(StateOwnedReformLawCategoryDO::getId));
    }

}