From be153de6203cf3c1f3b8bb3a38d8d23baea797fb Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期三, 15 七月 2026 13:59:17 +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