package cn.iocoder.yudao.module.bpm.dal.mysql.meeting.room;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.bpm.controller.admin.meeting.room.vo.OaMeetingRoomPageReqVO;
import cn.iocoder.yudao.module.bpm.dal.dataobject.meeting.room.OaMeetingRoomDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 会议室信息管理 Mapper
 *
 * @author dp
 */
@Mapper
public interface OaMeetingRoomMapper extends BaseMapperX<OaMeetingRoomDO> {

    default PageResult<OaMeetingRoomDO> selectPage(OaMeetingRoomPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OaMeetingRoomDO>()
                .likeIfPresent(OaMeetingRoomDO::getName, reqVO.getName())
                .orderByDesc(OaMeetingRoomDO::getId));
    }

}