Pu Zhibing
2024-12-02 e68c33e84e7f85fe8504de9c105d8597b996a906
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
26
27
28
29
30
31
32
33
34
35
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.Shop;
import com.ruoyi.other.api.factory.ShopClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
 
/**
 * @author zhibing.pu
 * @Date 2024/11/29 10:28
 */
@FeignClient(contextId = "ShopClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = ShopClientFallbackFactory.class)
public interface ShopClient {
    
    
    /**
     * 根据id获取门店信息
     * @param id
     * @return
     */
    @PostMapping("/shop/getShopById")
    R<Shop> getShopById(@RequestParam("id") Integer id);
    
    
    /**
     * 根据店铺管理员电话获取门店数据
     * @param phone
     * @return
     */
    @PostMapping("/shop/getShopByPhone")
    R<Shop> getShopByPhone(@RequestParam("phone") String phone);
}