package cn.iocoder.yudao.module.mes.dal.mysql.safety; 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.mes.controller.admin.safety.vo.train.SafetyDrillPageReqVO; import cn.iocoder.yudao.module.mes.dal.dataobject.safety.SafetyDrillDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** * 安全生产 - 演练记录 Mapper * * @author 超级管理员 */ @Mapper public interface SafetyDrillMapper extends BaseMapperX { default PageResult selectPage(SafetyDrillPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(SafetyDrillDO::getTitle, reqVO.getTitle()) .eqIfPresent(SafetyDrillDO::getDrillType, reqVO.getDrillType()) .likeIfPresent(SafetyDrillDO::getOrganizer, reqVO.getOrganizer()) .betweenIfPresent(SafetyDrillDO::getDrillDate, reqVO.getDrillDate()) .orderByDesc(SafetyDrillDO::getDrillDate) .orderByDesc(SafetyDrillDO::getId)); } default List selectListBetween(java.time.LocalDate begin, java.time.LocalDate end) { return selectList(new LambdaQueryWrapperX() .geIfPresent(SafetyDrillDO::getDrillDate, begin) .leIfPresent(SafetyDrillDO::getDrillDate, end) .orderByAsc(SafetyDrillDO::getDrillDate)); } }