From 457f525fe9ab47d73e13115840693d0dd0bd3603 Mon Sep 17 00:00:00 2001 From: hiparker Date: Thu, 29 Apr 2021 22:06:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=8F=91=E9=80=81=E9=82=AE?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modulars/tools/email/web/EmailRestController.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/tools/email/web/EmailRestController.java b/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/tools/email/web/EmailRestController.java index 3be9da6..22804e8 100644 --- a/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/tools/email/web/EmailRestController.java +++ b/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/tools/email/web/EmailRestController.java @@ -9,6 +9,7 @@ import org.opsli.modulars.tools.email.service.IEmailService; import org.opsli.modulars.tools.email.wrapper.EmailModel; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; /** @@ -20,7 +21,7 @@ import org.springframework.web.bind.annotation.PostMapping; */ @Api(tags = "邮件类") @Slf4j -@ApiRestController("/email") +@ApiRestController("/tools/email") public class EmailRestController { @Autowired @@ -33,11 +34,11 @@ public class EmailRestController { */ @ApiOperation(value = "测试发送邮件", notes = "测试发送邮件") @PostMapping("/testSend") - public ResultVo testSend(EmailModel model) { + public ResultVo testSend(@RequestBody EmailModel model) { try { - String result = iEmailService + iEmailService .send(model.getTo(), model.getSubject(), model.getContent()); - return ResultVo.success(result); + return ResultVo.success("邮件发送成功"); }catch (Exception e){ return ResultVo.error("邮件发送失败 - " + e.getMessage()); }