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/item/MdmItemSkuApi.java | 88 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 88 insertions(+), 0 deletions(-)
diff --git a/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/item/MdmItemSkuApi.java b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/item/MdmItemSkuApi.java
new file mode 100644
index 0000000..d6f633e
--- /dev/null
+++ b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/api/item/MdmItemSkuApi.java
@@ -0,0 +1,88 @@
+package cn.iocoder.yudao.module.mdm.api.item;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.module.mdm.api.item.dto.MdmItemSkuRespDTO;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
+
+/**
+ * MDM 鐗╂枡 SKU API 鎺ュ彛
+ *
+ * @author 鑺嬮亾婧愮爜
+ */
+public interface MdmItemSkuApi {
+
+ String PREFIX = "/rpc-api/mdm/item-sku";
+
+ /**
+ * 鑾峰彇 SKU
+ *
+ * @param id SKU 缂栧彿
+ * @return SKU
+ */
+ CommonResult<MdmItemSkuRespDTO> getItemSku(Long id);
+
+ /**
+ * 鑾峰彇 SKU 鍒楄〃
+ *
+ * @param ids SKU 缂栧彿鍒楄〃
+ * @return SKU 鍒楄〃
+ */
+ CommonResult<List<MdmItemSkuRespDTO>> getItemSkuList(Collection<Long> ids);
+
+ /**
+ * 鑾峰彇 SKU Map
+ *
+ * @param ids SKU 缂栧彿鍒楄〃
+ * @return SKU Map
+ */
+ default Map<Long, MdmItemSkuRespDTO> getItemSkuMap(Collection<Long> ids) {
+ List<MdmItemSkuRespDTO> list = getItemSkuList(ids).getCheckedData();
+ return convertMap(list, MdmItemSkuRespDTO::getId);
+ }
+
+ /**
+ * 鑾峰彇鐗╂枡鐨� SKU 鍒楄〃
+ *
+ * @param itemId 鐗╂枡缂栧彿
+ * @return SKU 鍒楄〃
+ */
+ CommonResult<List<MdmItemSkuRespDTO>> getItemSkuListByItemId(Long itemId);
+
+ /**
+ * 鏍¢獙 SKU 瀛樺湪
+ *
+ * @param id SKU 缂栧彿
+ * @return SKU
+ */
+ CommonResult<MdmItemSkuRespDTO> validateItemSkuExists(Long id);
+
+ /**
+ * 鏍¢獙 SKU 瀛樺湪涓斿惎鐢�
+ *
+ * @param id SKU 缂栧彿
+ * @return SKU
+ */
+ CommonResult<MdmItemSkuRespDTO> validateItemSkuExistsAndEnable(Long id);
+
+ /**
+ * 鏍规嵁缂栫爜鑾峰彇 SKU
+ *
+ * @param code SKU 缂栫爜
+ * @return SKU
+ */
+ CommonResult<MdmItemSkuRespDTO> getItemSkuByCode(String code);
+
+ /**
+ * 鏍规嵁鏉$爜鑾峰彇 SKU
+ *
+ * @param barCode SKU 鏉$爜
+ * @return SKU
+ */
+ CommonResult<MdmItemSkuRespDTO> getItemSkuByBarCode(String barCode);
+
+}
\ No newline at end of file
--
Gitblit v1.9.3