From 6a48d04a36bc459ed761d787ee3d537652185d36 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 27 十月 2026 15:06:50 +0800
Subject: [PATCH] refactor(permission): 清理新高电力查询菜单及权限注解

---
 yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/category/MdmItemCategoryApiImpl.java |   88 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 88 insertions(+), 0 deletions(-)

diff --git a/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/category/MdmItemCategoryApiImpl.java b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/category/MdmItemCategoryApiImpl.java
new file mode 100644
index 0000000..44022cc
--- /dev/null
+++ b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/category/MdmItemCategoryApiImpl.java
@@ -0,0 +1,88 @@
+package cn.iocoder.yudao.module.mdm.api.category;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import cn.iocoder.yudao.module.mdm.api.category.dto.MdmItemCategoryRespDTO;
+import cn.iocoder.yudao.module.mdm.api.category.dto.MdmItemCategorySaveReqDTO;
+import cn.iocoder.yudao.module.mdm.controller.admin.category.vo.MdmItemCategorySaveReqVO;
+import cn.iocoder.yudao.module.mdm.dal.dataobject.category.MdmItemCategoryDO;
+import cn.iocoder.yudao.module.mdm.service.category.MdmItemCategoryService;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Collection;
+import java.util.List;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * MDM 鐗╂枡鍒嗙被 API 瀹炵幇绫�
+ *
+ * @author 瓒呯骇绠$悊鍛�
+ */
+@RestController
+@RequestMapping(MdmItemCategoryApi.PREFIX)
+@Validated
+public class MdmItemCategoryApiImpl implements MdmItemCategoryApi {
+
+    @Resource
+    private MdmItemCategoryService itemCategoryService;
+
+    @Override
+    public CommonResult<MdmItemCategoryRespDTO> getItemCategory(Long id) {
+        MdmItemCategoryDO itemCategory = itemCategoryService.getItemCategory(id);
+        return success(BeanUtils.toBean(itemCategory, MdmItemCategoryRespDTO.class));
+    }
+
+    @Override
+    public CommonResult<MdmItemCategoryRespDTO> getItemCategoryByCode(String code) {
+        MdmItemCategoryDO itemCategory = itemCategoryService.getItemCategoryByCode(code);
+        return success(BeanUtils.toBean(itemCategory, MdmItemCategoryRespDTO.class));
+    }
+
+    @Override
+    public CommonResult<List<MdmItemCategoryRespDTO>> getItemCategoryList(Collection<Long> ids) {
+        List<MdmItemCategoryDO> list = itemCategoryService.getItemCategoryList(ids);
+        return success(BeanUtils.toBean(list, MdmItemCategoryRespDTO.class));
+    }
+
+    @Override
+    public CommonResult<MdmItemCategoryRespDTO> validateItemCategoryExists(Long id) {
+        MdmItemCategoryDO itemCategory = itemCategoryService.validateItemCategoryExists(id);
+        return success(BeanUtils.toBean(itemCategory, MdmItemCategoryRespDTO.class));
+    }
+
+    @Override
+    public CommonResult<MdmItemCategoryRespDTO> getItemCategoryByItemOrProduct(String itemOrProduct) {
+        MdmItemCategoryDO itemCategory = itemCategoryService.getItemCategoryByItemOrProduct(itemOrProduct);
+        return success(BeanUtils.toBean(itemCategory, MdmItemCategoryRespDTO.class));
+    }
+
+    @Override
+    public CommonResult<List<MdmItemCategoryRespDTO>> getItemCategoryAllList() {
+        List<MdmItemCategoryDO> list = itemCategoryService.getItemCategoryAllList();
+        return success(BeanUtils.toBean(list, MdmItemCategoryRespDTO.class));
+    }
+
+    @Override
+    public CommonResult<Long> createItemCategory(MdmItemCategorySaveReqDTO createReqDTO) {
+        MdmItemCategorySaveReqVO reqVO = BeanUtils.toBean(createReqDTO, MdmItemCategorySaveReqVO.class);
+        return success(itemCategoryService.createItemCategory(reqVO));
+    }
+
+    @Override
+    public CommonResult<Boolean> updateItemCategory(MdmItemCategorySaveReqDTO updateReqDTO) {
+        MdmItemCategorySaveReqVO reqVO = BeanUtils.toBean(updateReqDTO, MdmItemCategorySaveReqVO.class);
+        itemCategoryService.updateItemCategory(reqVO);
+        return success(true);
+    }
+
+    @Override
+    public CommonResult<Boolean> deleteItemCategory(Long id) {
+        itemCategoryService.deleteItemCategory(id);
+        return success(true);
+    }
+
+}

--
Gitblit v1.9.3