package cn.iocoder.yudao.module.mes.dal.mysql.moldrecorditem;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.mes.dal.dataobject.moldrecorditem.MoldRecordItemDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.mes.controller.admin.moldrecorditem.vo.*;

/**
 * 维保方案 Mapper
 *
 * @author 内蒙必硕
 */
@Mapper
public interface MoldRecordItemMapper extends BaseMapperX<MoldRecordItemDO> {

    default PageResult<MoldRecordItemDO> selectPage(MoldRecordItemPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MoldRecordItemDO>()
                .likeIfPresent(MoldRecordItemDO::getName, reqVO.getName())
                .eqIfPresent(MoldRecordItemDO::getType, reqVO.getType())
                .eqIfPresent(MoldRecordItemDO::getSubjectId, reqVO.getSubjectId())
                .eqIfPresent(MoldRecordItemDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(MoldRecordItemDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(MoldRecordItemDO::getId));
    }

}