From 4bec63c802692a402039f0d99eae068d26d63c55 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期六, 07 十一月 2026 16:11:44 +0800
Subject: [PATCH] 完善物料颜色同步并保护数据
---
yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/item/MdmItemSyncApiImpl.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/item/MdmItemSyncApiImpl.java b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/item/MdmItemSyncApiImpl.java
index eadd522..77629a7 100644
--- a/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/item/MdmItemSyncApiImpl.java
+++ b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/item/MdmItemSyncApiImpl.java
@@ -30,6 +30,16 @@
private MdmItemBatchConfigMapper itemBatchConfigMapper;
@Override
+ public CommonResult<Boolean> syncExistingItemColor(String code, String color) {
+ MdmItemDO existingItem = itemMapper.selectByCode(code);
+ if (existingItem == null || color == null) {
+ return success(false);
+ }
+ itemMapper.updateById(new MdmItemDO().setId(existingItem.getId()).setColor(color));
+ return success(true);
+ }
+
+ @Override
@Transactional(rollbackFor = Exception.class)
public CommonResult<Long> syncItemToMdm(MdmItemSyncReqDTO syncReqDTO) {
// 1. 鎸� code 鏌ヨ鏄惁宸插瓨鍦�
@@ -99,4 +109,4 @@
}
}
-}
\ No newline at end of file
+}
--
Gitblit v1.9.3