package cn.iocoder.yudao.module.mdm.dal.mysql.brand; 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.mdm.controller.admin.brand.vo.MdmBrandPageReqVO; import cn.iocoder.yudao.module.mdm.dal.dataobject.brand.MdmBrandDO; import org.apache.ibatis.annotations.Mapper; import java.util.Collection; import java.util.List; /** * MDM 品牌 Mapper * * @author 芋道源码 */ @Mapper public interface MdmBrandMapper extends BaseMapperX { default PageResult selectPage(MdmBrandPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(MdmBrandDO::getCode, reqVO.getCode()) .likeIfPresent(MdmBrandDO::getName, reqVO.getName()) .eqIfPresent(MdmBrandDO::getStatus, reqVO.getStatus()) .betweenIfPresent(MdmBrandDO::getCreateTime, reqVO.getCreateTime()) .orderByDesc(MdmBrandDO::getId)); } default List selectList(MdmBrandDO reqVO) { return selectList(new LambdaQueryWrapperX() .likeIfPresent(MdmBrandDO::getCode, reqVO.getCode()) .likeIfPresent(MdmBrandDO::getName, reqVO.getName()) .eqIfPresent(MdmBrandDO::getStatus, reqVO.getStatus()) .orderByDesc(MdmBrandDO::getId)); } default MdmBrandDO selectByCode(String code) { return selectOne(MdmBrandDO::getCode, code); } default MdmBrandDO selectByName(String name) { return selectOne(MdmBrandDO::getName, name); } default List selectListByIds(Collection ids) { return selectList(MdmBrandDO::getId, ids); } }