From 01d6fa48a0de7a21988e89f71721b6b85e53b517 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期四, 06 三月 2025 16:33:53 +0800
Subject: [PATCH] 去掉资讯图片必填限制

---
 ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSkuController.java |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSkuController.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSkuController.java
index c987bd9..d8075b2 100644
--- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSkuController.java
+++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSkuController.java
@@ -5,6 +5,7 @@
 import com.ruoyi.common.security.annotation.InnerAuth;
 import com.ruoyi.goods.service.IGoodsSkuService;
 import com.ruoyi.system.api.domain.GoodsSku;
+import com.ruoyi.system.api.domain.Order;
 import com.ruoyi.system.api.domain.dto.GoodsStockUpdDTO;
 import java.util.Collection;
 import java.util.List;
@@ -80,15 +81,43 @@
         return R.ok();
     }
 
+    @InnerAuth
+    @PutMapping("/upd-stock1")
+    R<?> updGoodsStock1(@RequestBody GoodsStockUpdDTO goodsStockUpdDTOS) {
+        iGoodsSkuService.updGoodsStock1(goodsStockUpdDTOS);
+        return R.ok();
+    }
+    @InnerAuth
+    @PutMapping("/updGoods")
+    R<Boolean> updGoods(@RequestBody GoodsSku goodsSku){
+        GoodsSku goodsSkuOne=iGoodsSkuService.getById(goodsSku.getId());
+        Integer h=goodsSkuOne.getSoldQuantity()+goodsSku.getSoldQuantity();
+        goodsSkuOne.setSoldQuantity(h);
+        iGoodsSkuService.updateById(goodsSkuOne);
+        return R.ok();
+    }
+
     /**
      * 根据商品id集合查询商品
      *
      * @param goodsIdList 商品id集合
-     * @param source      请求来源
      * @return 商品集合
      */
+    @InnerAuth
     @PostMapping("/list")
     R<List<GoodsSku>> getGoodsListByIds(@RequestBody Collection<Long> goodsIdList) {
         return R.ok(iGoodsSkuService.listByIds(goodsIdList));
     }
+
+    /**
+     * 退款退货订单退库存
+     *
+     * @param order
+     */
+    @InnerAuth
+    @PostMapping("/returnStockByOrder")
+    R<?> returnStockByOrder(@RequestBody Order order) {
+        iGoodsSkuService.returnStockByOrder(order);
+        return R.ok();
+    }
 }

--
Gitblit v1.7.1