package cn.iocoder.yudao.module.wms.dal.mysql.industrycategory;

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

/**
 * 行业分类 Mapper
 *
 * @author 艾楷
 */
@Mapper
public interface IndustryCategoryMapper extends BaseMapperX<IndustryCategoryDO> {

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

}