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.SafetyTrainingPageReqVO; import cn.iocoder.yudao.module.mes.dal.dataobject.safety.SafetyTrainingDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** * 安全生产 - 培训记录 Mapper * * @author 超级管理员 */ @Mapper public interface SafetyTrainingMapper extends BaseMapperX { default PageResult selectPage(SafetyTrainingPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(SafetyTrainingDO::getTitle, reqVO.getTitle()) .eqIfPresent(SafetyTrainingDO::getTrainingType, reqVO.getTrainingType()) .likeIfPresent(SafetyTrainingDO::getTrainer, reqVO.getTrainer()) .betweenIfPresent(SafetyTrainingDO::getTrainDate, reqVO.getTrainDate()) .orderByDesc(SafetyTrainingDO::getTrainDate) .orderByDesc(SafetyTrainingDO::getId)); } default List selectListBetween(java.time.LocalDate begin, java.time.LocalDate end) { return selectList(new LambdaQueryWrapperX() .geIfPresent(SafetyTrainingDO::getTrainDate, begin) .leIfPresent(SafetyTrainingDO::getTrainDate, end) .orderByAsc(SafetyTrainingDO::getTrainDate)); } }