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.material.SafetyMaterialStockPageReqVO; import cn.iocoder.yudao.module.mes.dal.dataobject.safety.SafetyMaterialStockDO; import org.apache.ibatis.annotations.Mapper; /** * 安全生产 - 物资出入库流水 Mapper * * @author 超级管理员 */ @Mapper public interface SafetyMaterialStockMapper extends BaseMapperX { default PageResult selectPage(SafetyMaterialStockPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .eqIfPresent(SafetyMaterialStockDO::getMaterialId, reqVO.getMaterialId()) .likeIfPresent(SafetyMaterialStockDO::getMaterialName, reqVO.getMaterialName()) .eqIfPresent(SafetyMaterialStockDO::getCategory, reqVO.getCategory()) .eqIfPresent(SafetyMaterialStockDO::getBizType, reqVO.getBizType()) .betweenIfPresent(SafetyMaterialStockDO::getBizDate, reqVO.getBizDate()) .orderByDesc(SafetyMaterialStockDO::getBizDate) .orderByDesc(SafetyMaterialStockDO::getId)); } }