package com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database;

import java.util.*;

import com.cico.nest.lcdp.boot.core.qxsd.adapter.web.vo.tunnelHoleLine.TunnelHoleMarkerlinePageReqVO;
import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.TunnelHoleMarkerlineDO;
import com.cico.nest.lcdp.framework.common.pojo.PageResult;
import com.cico.nest.lcdp.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cico.nest.lcdp.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * 隧道上下行洞车道标志线 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface TunnelHoleMarkerlineMapper extends BaseMapperX<TunnelHoleMarkerlineDO> {

    default PageResult<TunnelHoleMarkerlineDO> selectPage(TunnelHoleMarkerlinePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<TunnelHoleMarkerlineDO>()
                .eqIfPresent(TunnelHoleMarkerlineDO::getTunnelId, reqVO.getTunnelId())
                .eqIfPresent(TunnelHoleMarkerlineDO::getHoleId, reqVO.getHoleId())
                .eqIfPresent(TunnelHoleMarkerlineDO::getType, reqVO.getType())
                .likeIfPresent(TunnelHoleMarkerlineDO::getName, reqVO.getName())
                .eqIfPresent(TunnelHoleMarkerlineDO::getMarkerlineType, reqVO.getMarkerlineType())
                .betweenIfPresent(TunnelHoleMarkerlineDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(TunnelHoleMarkerlineDO::getId));
    }

}
