From fd3c114f6dea28fe92b82bf35a6a33e3bb9a8485 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 14 一月 2025 10:02:05 +0800 Subject: [PATCH] 修改bug --- ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/GoodsClient.java | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/GoodsClient.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/GoodsClient.java index 9922827..41001e5 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/GoodsClient.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/GoodsClient.java @@ -6,6 +6,8 @@ import com.ruoyi.other.api.factory.GoodsClientFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; 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.RequestParam; import java.util.List; @@ -34,7 +36,31 @@ */ @PostMapping("/goods/getGoodsById") R<Goods> getGoodsById(@RequestParam("id") Integer id); + + @PostMapping("/goods/getGoodsByIds") R<List<Goods>> getGoodsById(@RequestParam("ids") String[] ids); + + /** + * 编辑商品信息 + * @param goods + * @return + */ + @PostMapping("/goods/editGoods") + R editGoodsList(@RequestBody List<Goods> goods); + + /** + * 商品销量增加 + */ + @PutMapping("/goods/editGoodsNum") + R<Void> editGoodsNum(@RequestParam("goodsId") Integer goodsId, @RequestParam("num") Integer num); + + + /** + * 获取所有商品 + * @return + */ + @PostMapping("/goods/getAllGoods") + R<List<Goods>> getAllGoods(); } -- Gitblit v1.7.1