From c0603d030a6df7bdfd1067191624dd655fa08ca7 Mon Sep 17 00:00:00 2001 From: little-cat-sweet <2116400472@qq.com> Date: Tue, 17 Aug 2021 14:38:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=94=A8=E6=88=B7=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E4=B8=8D=E8=B6=B35=E5=85=83=E7=9F=AD=E4=BF=A1?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/xhpc/common/api/SmsService.java | 7 ++++--- .../com/xhpc/general/controller/XhpcSmsController.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/api/SmsService.java b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/api/SmsService.java index 5c773afd..3a335b40 100644 --- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/api/SmsService.java +++ b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/api/SmsService.java @@ -4,7 +4,8 @@ import com.xhpc.common.api.factory.SmsFallbackFactory; import com.xhpc.common.core.constant.ServiceNameConstants; import com.xhpc.common.core.domain.R; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; /** * program: ruoyi @@ -14,6 +15,6 @@ import org.springframework.web.bind.annotation.PostMapping; @FeignClient(contextId = "smsService",value = ServiceNameConstants.XHPC_GENERAL, fallbackFactory = SmsFallbackFactory.class) public interface SmsService { - @PostMapping("/sms/send") - R sendNotice(String phone, String content); + @GetMapping("/sms/send") + R sendNotice(@RequestParam(value = "phone") String phone , @RequestParam(value = "content") String content); } diff --git a/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcSmsController.java b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcSmsController.java index b4bae3be..14aff71d 100644 --- a/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcSmsController.java +++ b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcSmsController.java @@ -41,7 +41,7 @@ public class XhpcSmsController extends BaseController { } @GetMapping(value = "/send") - public void send(String phone , String content){ + public void send(@RequestParam(value = "phone") String phone ,@RequestParam(value = "content") String content){ xhpcSmsService.sendNotice(phone, content); }