无关风月
2024-08-16 85a21fdb54fa06f2fa6e25e763ec5337e85295e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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.PostMapping;
 
/**
 * @author zhibing.pu
 * @Date 2024/8/16 13:47
 */
@FeignClient(contextId = "GoodsClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = GoodsFallbackFactory.class)
public interface GoodsClient {
    
    /**
     * 根据id获取商品信息
     * @param id
     * @return
     */
    @PostMapping("/t-goods/getGoodsById")
    R<TGoods> getGoodsById(Integer id);
}