xiaoyi
20 小时以前 4bec63c802692a402039f0d99eae068d26d63c55
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 @@
        }
    }
}
}