From a981c07d34edd0975b9d556d97c1f851ce79974c Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期三, 04 十二月 2024 13:40:00 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/ShopClient.java | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/ShopClient.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/ShopClient.java new file mode 100644 index 0000000..a49ac62 --- /dev/null +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/ShopClient.java @@ -0,0 +1,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); +} -- Gitblit v1.7.1