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/api/brand/MdmBrandApiImpl.java |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 55 insertions(+), 0 deletions(-)

diff --git a/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/brand/MdmBrandApiImpl.java b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/brand/MdmBrandApiImpl.java
new file mode 100644
index 0000000..70f54e1
--- /dev/null
+++ b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/brand/MdmBrandApiImpl.java
@@ -0,0 +1,55 @@
+package cn.iocoder.yudao.module.mdm.api.brand;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import cn.iocoder.yudao.module.mdm.api.brand.dto.MdmBrandRespDTO;
+import cn.iocoder.yudao.module.mdm.dal.dataobject.brand.MdmBrandDO;
+import cn.iocoder.yudao.module.mdm.service.brand.MdmBrandService;
+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(MdmBrandApi.PREFIX)
+@Validated
+public class MdmBrandApiImpl implements MdmBrandApi {
+
+    @Resource
+    private MdmBrandService brandService;
+
+    @Override
+    public CommonResult<MdmBrandRespDTO> getBrand(Long id) {
+        MdmBrandDO brand = brandService.getBrand(id);
+        return success(BeanUtils.toBean(brand, MdmBrandRespDTO.class));
+    }
+
+    @Override
+    public CommonResult<List<MdmBrandRespDTO>> getBrandList(Collection<Long> ids) {
+        List<MdmBrandDO> list = brandService.getBrandList(ids);
+        return success(BeanUtils.toBean(list, MdmBrandRespDTO.class));
+    }
+
+    @Override
+    public CommonResult<MdmBrandRespDTO> validateBrandExists(Long id) {
+        MdmBrandDO brand = brandService.validateBrandExists(id);
+        return success(BeanUtils.toBean(brand, MdmBrandRespDTO.class));
+    }
+
+    @Override
+    public CommonResult<MdmBrandRespDTO> getBrandByCode(String code) {
+        MdmBrandDO brand = brandService.getBrandByCode(code);
+        return success(BeanUtils.toBean(brand, MdmBrandRespDTO.class));
+    }
+
+}
\ No newline at end of file

--
Gitblit v1.9.3