From 6b5f7c66fc40d7f6099d561e31a34fbd50dd20d3 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 01 七月 2026 15:54:57 +0800
Subject: [PATCH] 初始化项目

---
 yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/dal/mysql/category/MdmItemCategoryMapper.java |   63 +++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/dal/mysql/category/MdmItemCategoryMapper.java b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/dal/mysql/category/MdmItemCategoryMapper.java
new file mode 100644
index 0000000..0678ec4
--- /dev/null
+++ b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/dal/mysql/category/MdmItemCategoryMapper.java
@@ -0,0 +1,63 @@
+package cn.iocoder.yudao.module.mdm.dal.mysql.category;
+
+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.category.vo.MdmItemCategoryPageReqVO;
+import cn.iocoder.yudao.module.mdm.dal.dataobject.category.MdmItemCategoryDO;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * MDM 鐗╂枡鍒嗙被 Mapper
+ *
+ * @author 鑺嬮亾婧愮爜
+ */
+@Mapper
+public interface MdmItemCategoryMapper extends BaseMapperX<MdmItemCategoryDO> {
+
+    default PageResult<MdmItemCategoryDO> selectPage(MdmItemCategoryPageReqVO reqVO) {
+        return selectPage(reqVO, new LambdaQueryWrapperX<MdmItemCategoryDO>()
+                .likeIfPresent(MdmItemCategoryDO::getCode, reqVO.getCode())
+                .likeIfPresent(MdmItemCategoryDO::getName, reqVO.getName())
+                .eqIfPresent(MdmItemCategoryDO::getParentId, reqVO.getParentId())
+                .eqIfPresent(MdmItemCategoryDO::getItemType, reqVO.getItemType())
+                .eqIfPresent(MdmItemCategoryDO::getStatus, reqVO.getStatus())
+                .orderByAsc(MdmItemCategoryDO::getSort));
+    }
+
+    default List<MdmItemCategoryDO> selectList(MdmItemCategoryDO reqVO) {
+        return selectList(new LambdaQueryWrapperX<MdmItemCategoryDO>()
+                .likeIfPresent(MdmItemCategoryDO::getCode, reqVO.getCode())
+                .likeIfPresent(MdmItemCategoryDO::getName, reqVO.getName())
+                .eqIfPresent(MdmItemCategoryDO::getParentId, reqVO.getParentId())
+                .eqIfPresent(MdmItemCategoryDO::getItemType, reqVO.getItemType())
+                .eqIfPresent(MdmItemCategoryDO::getStatus, reqVO.getStatus())
+                .orderByAsc(MdmItemCategoryDO::getSort));
+    }
+
+    default MdmItemCategoryDO selectByCode(String code) {
+        return selectOne(MdmItemCategoryDO::getCode, code);
+    }
+
+    default MdmItemCategoryDO selectByParentIdAndName(Long parentId, String name) {
+        return selectOne(new LambdaQueryWrapperX<MdmItemCategoryDO>()
+                .eq(MdmItemCategoryDO::getParentId, parentId)
+                .eq(MdmItemCategoryDO::getName, name));
+    }
+
+    default List<MdmItemCategoryDO> selectListByParentId(Long parentId) {
+        return selectList(MdmItemCategoryDO::getParentId, parentId);
+    }
+
+    default Long selectCountByParentId(Long parentId) {
+        return selectCount(MdmItemCategoryDO::getParentId, parentId);
+    }
+
+    default List<MdmItemCategoryDO> selectListByIds(Collection<Long> ids) {
+        return selectList(MdmItemCategoryDO::getId, ids);
+    }
+
+}
\ No newline at end of file

--
Gitblit v1.9.3