From 8236caa8042288fcb9b584c21d6157f713183626 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 13 二月 2025 16:36:01 +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/OperatorClient.java | 63 +++++++++++++++++++++++++++++++ 1 files changed, 63 insertions(+), 0 deletions(-) diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OperatorClient.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OperatorClient.java new file mode 100644 index 0000000..3578a2f --- /dev/null +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OperatorClient.java @@ -0,0 +1,63 @@ +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.Operator; +import com.ruoyi.other.api.factory.OperatorFallbackFactory; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +/** + * @author zhibing.pu + * @Date 2025/1/22 15:15 + */ +@FeignClient(contextId = "OperatorClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = OperatorFallbackFactory.class) +public interface OperatorClient { + + + /** + * 获取运营商数据 + * @param id + * @return + */ + @PostMapping("/operator/getOperatorById") + R<Operator> getOperatorById(@RequestParam("id") Integer id); + + + /** + * 获取运营商数据 + * @param name + * @return + */ + @PostMapping("/operator/getOperatorByName") + R<Operator> getOperatorByName(@RequestParam("name") String name); + + + + /** + * 获取运营商数据 + * @param operatorId + * @return + */ + @PostMapping("/operator/getOperator") + R<Operator> getOperator(@RequestParam("operatorId") String operatorId); + + + /** + * 获取所有运营商 + * @return + */ + @PostMapping("/operator/getAllOperator") + R<List<Operator>> getAllOperator(); + + /** + * 更新运营商数据 + * @return + */ + @PostMapping("/operator/editOperator") + R editOperator(@RequestBody Operator operator); +} -- Gitblit v1.7.1