From 3c9e545c80af5515264f28dd60c46b1147281581 Mon Sep 17 00:00:00 2001
From: zepengdev <lzpsmith@outlook.com>
Date: Wed, 17 Sep 2025 20:17:33 +0800
Subject: [PATCH] docs(ProductInventoryService):给类中方法添加注释

---
 oying-system/src/main/java/com/oying/modules/pc/product/service/ProductInventoryService.java |   43 +++++++++++++++++++++++++++++++++++++++----
 1 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/oying-system/src/main/java/com/oying/modules/pc/product/service/ProductInventoryService.java b/oying-system/src/main/java/com/oying/modules/pc/product/service/ProductInventoryService.java
index c425722..a805c15 100644
--- a/oying-system/src/main/java/com/oying/modules/pc/product/service/ProductInventoryService.java
+++ b/oying-system/src/main/java/com/oying/modules/pc/product/service/ProductInventoryService.java
@@ -3,9 +3,44 @@
 import com.oying.modules.pc.product.domain.Product;
 
 public interface ProductInventoryService {
-    Product getProductById(Long id);
-    Product setStockQuantity(Long product, Integer quantity, Long version);
-    Product increaseStock(Long product, Integer amount);
-    Product decreaseStock(Long product, Integer amount);
+
+    /**
+     * 获取商品信息
+     * @param productId 商品ID
+     * @return Product
+     */
+    Product getProductById(Long productId);
+
+    /**
+     * 设置库存数量
+     * @param productId 商品ID
+     * @param quantity 库存数量
+     * @param version 版本号
+     * @return Product
+     */
+    Product setStockQuantity(Long productId, Integer quantity, Long version);
+
+    /**
+     * 增加库存
+     * @param productId 商品ID
+     * @param amount 库存数量
+     * @return Product
+     */
+    Product increaseStock(Long productId, Integer amount);
+
+    /**
+     * 减少库存
+     * @param productId 商品ID
+     * @param amount 库存数量
+     * @return Product
+     */
+    Product decreaseStock(Long productId, Integer amount);
+
+    /**
+     * 库存是否足够
+     * @param productId 商品ID
+     * @param requiredAmount 库存数量
+     * @return true Or false
+     */
     boolean isStockSufficient(Long productId, Integer requiredAmount);
 }

--
Gitblit v1.9.3