From 5e1cf8e0e94b42a94c3a3d3ccda5147fe6ce94f0 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期四, 22 八月 2024 09:42:56 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/GoodsClient.java | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 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 d8d8ac1..1f338d3 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 @@ -1,15 +1,26 @@ package com.ruoyi.other.api.feignClient; import com.ruoyi.common.core.constant.ServiceNameConstants; +import com.ruoyi.common.core.domain.R; +import com.ruoyi.other.api.domain.TGoods; import com.ruoyi.other.api.factory.GoodsFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; /** - * 商品服务 - * @author ruoyi + * @author zhibing.pu + * @Date 2024/8/16 13:47 */ -@FeignClient(contextId = "GoodsClient", value = ServiceNameConstants.CONTRACT_SERVICE, fallbackFactory = GoodsFallbackFactory.class) +@FeignClient(contextId = "GoodsClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = GoodsFallbackFactory.class) public interface GoodsClient { - - + + /** + * 根据id获取商品信息 + * @param id + * @return + */ + @PostMapping("/t-goods/getGoodsById/{id}") + R<TGoods> getGoodsById(@PathVariable("id") Integer id); } -- Gitblit v1.7.1