From f47d695f19bca1e58ddedcc10f8d3dff7d7f8f1d Mon Sep 17 00:00:00 2001 From: zhibing.pu <393733352@qq.com> Date: 星期三, 21 八月 2024 11:39:43 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile --- 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