luodangjia
2025-01-17 b0cc9bd3619e69fa4c8bbdedebb56435cfd74a8f
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;
@@ -26,4 +28,39 @@
   @PostMapping("/goods/getGoodsByType")
   R<List<Goods>> getGoodsByType(@RequestParam("type") Integer type);
   
   /**
    * 根据id获取商品详情
    * @param id
    * @return
    */
   @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();
}