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/GoodsSeckillController.java |   34 +++++++++++++++++++++++++++++++---
 1 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSeckillController.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSeckillController.java
index ae5179f..25c49e8 100644
--- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSeckillController.java
+++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSeckillController.java
@@ -6,12 +6,20 @@
 import com.ruoyi.common.security.annotation.InnerAuth;
 import com.ruoyi.goods.service.IGoodsSeckillService;
 import com.ruoyi.system.api.domain.GoodsSeckill;
+import com.ruoyi.system.api.domain.GoodsSku;
 import com.ruoyi.system.api.domain.dto.GoodsStockUpdDTO;
+import java.util.List;
+import java.util.Set;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -42,6 +50,15 @@
     R<?> updGoodsSeckill(@RequestBody GoodsStockUpdDTO goodsStockUpdDTOS) {
         GoodsSeckill GoodsSeckillOne = goodsSeckillService.getById(goodsStockUpdDTOS.getGoodsSkuId());
         GoodsSeckillOne.setSeckillStock(goodsStockUpdDTOS.getAuctionStock());
+        goodsSeckillService.updateById(GoodsSeckillOne);
+        return R.ok();
+    }
+    @InnerAuth
+    @PutMapping("/updGoodsSeckill1")
+    R<Boolean> updGoodsSeckill1(@RequestBody GoodsSku goodsSku){
+        GoodsSeckill GoodsSeckillOne = goodsSeckillService.getById(goodsSku.getId());
+        Integer m= GoodsSeckillOne.getSoldQuantity()+goodsSku.getSoldQuantity();
+        GoodsSeckillOne.setSoldQuantity(m);
         goodsSeckillService.updateById(GoodsSeckillOne);
         return R.ok();
     }
@@ -81,4 +98,15 @@
         return R.ok();
     }
 
+    /**
+     * 根据秒杀id集合查询商品sku信息
+     *
+     * @param seckillIdSet
+     * @return
+     */
+    @InnerAuth
+    @PostMapping("/getGoodsSkuBySeckillIdSet")
+    R<List<GoodsSku>> getGoodsSkuBySeckillIdSet(@RequestBody Set<Long> seckillIdSet) {
+        return R.ok(goodsSeckillService.getGoodsSkuBySeckillIdSet(seckillIdSet));
+    }
 }

--
Gitblit v1.7.1