package cn.iocoder.yudao.module.system.dal.mysql.packagingtoolstable;

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.system.dal.dataobject.packagingtoolstable.PackagingToolsTableDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.packagingtoolstable.vo.*;

/**
 * 木托绑带资产 （excel 临时表） Mapper
 *
 * @author 艾楷
 */
@Mapper
public interface PackagingToolsTableMapper extends BaseMapperX<PackagingToolsTableDO> {

    default PageResult<PackagingToolsTableDO> selectPage(PackagingToolsTablePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PackagingToolsTableDO>()
                .likeIfPresent(PackagingToolsTableDO::getName, reqVO.getName())
                .eqIfPresent(PackagingToolsTableDO::getSku, reqVO.getSku())
                .eqIfPresent(PackagingToolsTableDO::getUnit, reqVO.getUnit())
                .eqIfPresent(PackagingToolsTableDO::getTotalNum, reqVO.getTotalNum())
                .likeIfPresent(PackagingToolsTableDO::getFactoryName, reqVO.getFactoryName())
                .eqIfPresent(PackagingToolsTableDO::getRemake, reqVO.getRemake())
                .betweenIfPresent(PackagingToolsTableDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(PackagingToolsTableDO::getId));
    }

}