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

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

/**
 * 国资改革最佳实践数据信息 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface StateOwnedReformBestPracticeInfoMapper extends BaseMapperX<StateOwnedReformBestPracticeInfoDO> {

    default PageResult<StateOwnedReformBestPracticeInfoDO> selectPage(StateOwnedReformBestPracticeInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<StateOwnedReformBestPracticeInfoDO>()
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getOid, reqVO.getOid())
                .likeIfPresent(StateOwnedReformBestPracticeInfoDO::getTitle, reqVO.getTitle())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getMeasure, reqVO.getMeasure())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getLevel1Element, reqVO.getLevel1Element())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getLevel1ElementId, reqVO.getLevel1ElementId())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getLevel2Element, reqVO.getLevel2Element())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getLevel2ElementId, reqVO.getLevel2ElementId())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getUnit, reqVO.getUnit())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getRegion, reqVO.getRegion())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getFile, reqVO.getFile())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getDocumentNumber, reqVO.getDocumentNumber())
                .betweenIfPresent(StateOwnedReformBestPracticeInfoDO::getPublishTime, reqVO.getPublishTime())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getCreatorId, reqVO.getCreatorId())
                .likeIfPresent(StateOwnedReformBestPracticeInfoDO::getCreatorName, reqVO.getCreatorName())
                .betweenIfPresent(StateOwnedReformBestPracticeInfoDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getUpdaterId, reqVO.getUpdaterId())
                .likeIfPresent(StateOwnedReformBestPracticeInfoDO::getUpdaterName, reqVO.getUpdaterName())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getStatus, reqVO.getStatus())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getAuditStatus, reqVO.getAuditStatus())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getAuditStatusId, reqVO.getAuditStatusId())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getAuditor, reqVO.getAuditor())
                .betweenIfPresent(StateOwnedReformBestPracticeInfoDO::getAuditTime, reqVO.getAuditTime())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getInputer, reqVO.getInputer())
                .eqIfPresent(StateOwnedReformBestPracticeInfoDO::getAttachmentId, reqVO.getAttachmentId())
                .likeIfPresent(StateOwnedReformBestPracticeInfoDO::getAttachmentName, reqVO.getAttachmentName())
                .orderByDesc(StateOwnedReformBestPracticeInfoDO::getId));
    }

}