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

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

/**
 * 国资改革最佳实践主题分类 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface StateOwnedReformBestPracticeCategoryMapper extends BaseMapperX<StateOwnedReformBestPracticeCategoryDO> {

    default PageResult<StateOwnedReformBestPracticeCategoryDO> selectPage(StateOwnedReformBestPracticeCategoryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<StateOwnedReformBestPracticeCategoryDO>()
                .eqIfPresent(StateOwnedReformBestPracticeCategoryDO::getOid, reqVO.getOid())
                .likeIfPresent(StateOwnedReformBestPracticeCategoryDO::getCategoryName, reqVO.getCategoryName())
                .eqIfPresent(StateOwnedReformBestPracticeCategoryDO::getOrderNum, reqVO.getOrderNum())
                .eqIfPresent(StateOwnedReformBestPracticeCategoryDO::getParentId, reqVO.getParentId())
                .eqIfPresent(StateOwnedReformBestPracticeCategoryDO::getStatus, reqVO.getStatus())
                .likeIfPresent(StateOwnedReformBestPracticeCategoryDO::getCreatorName, reqVO.getCreatorName())
                .betweenIfPresent(StateOwnedReformBestPracticeCategoryDO::getCreateTime, reqVO.getCreateTime())
                .likeIfPresent(StateOwnedReformBestPracticeCategoryDO::getUpdaterName, reqVO.getUpdaterName())
                .orderByDesc(StateOwnedReformBestPracticeCategoryDO::getId));
    }

}