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); }