Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-notifycenter
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a9b0b700
authored
Feb 22, 2022
by
yangll
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加返回注解
1 parent
ffb49ad5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
src/main/java/cn/com/glsx/notify/modules/api/NotifyApiController.java
src/main/java/cn/com/glsx/notify/modules/api/NotifyApiController.java
View file @
a9b0b70
...
@@ -11,10 +11,7 @@ import cn.com.glsx.notify.modules.service.SmsService;
...
@@ -11,10 +11,7 @@ import cn.com.glsx.notify.modules.service.SmsService;
import
com.glsx.plat.core.web.R
;
import
com.glsx.plat.core.web.R
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -41,6 +38,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
...
@@ -41,6 +38,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
@Override
@Override
@PostMapping
(
value
=
"/sendSms"
)
@PostMapping
(
value
=
"/sendSms"
)
@ResponseBody
public
R
sendSms
(
@RequestBody
SmsTemplateMessageDTO
messageDTO
)
{
public
R
sendSms
(
@RequestBody
SmsTemplateMessageDTO
messageDTO
)
{
smsService
.
sendSms
(
messageDTO
.
getPhone
(),
messageDTO
.
getTemplate
(),
messageDTO
.
getArgs
().
values
());
smsService
.
sendSms
(
messageDTO
.
getPhone
(),
messageDTO
.
getTemplate
(),
messageDTO
.
getArgs
().
values
());
return
R
.
ok
();
return
R
.
ok
();
...
@@ -48,6 +46,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
...
@@ -48,6 +46,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
@Override
@Override
@PostMapping
(
value
=
"/sendMail"
)
@PostMapping
(
value
=
"/sendMail"
)
@ResponseBody
public
R
sendMail
(
@RequestBody
MailTemplateMessageDTO
messageDTO
)
{
public
R
sendMail
(
@RequestBody
MailTemplateMessageDTO
messageDTO
)
{
Map
<
String
,
Object
>
args
=
new
HashMap
<>();
Map
<
String
,
Object
>
args
=
new
HashMap
<>();
args
.
put
(
"arg1"
,
"刘宇峰"
);
args
.
put
(
"arg1"
,
"刘宇峰"
);
...
@@ -59,6 +58,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
...
@@ -59,6 +58,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
@Override
@Override
@PostMapping
(
value
=
"/sendPC"
)
@PostMapping
(
value
=
"/sendPC"
)
@ResponseBody
public
R
sendPC
(
@RequestBody
PCTemplateMessageDTO
messageDTO
)
{
public
R
sendPC
(
@RequestBody
PCTemplateMessageDTO
messageDTO
)
{
// TODO: 2020/9/21 名称约束
// TODO: 2020/9/21 名称约束
...
@@ -69,6 +69,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
...
@@ -69,6 +69,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
@Override
@Override
@PostMapping
(
value
=
"/sendWechat"
)
@PostMapping
(
value
=
"/sendWechat"
)
@ResponseBody
public
R
sendWechat
(
@RequestBody
WechatTemplateMessageDTO
messageDTO
)
{
public
R
sendWechat
(
@RequestBody
WechatTemplateMessageDTO
messageDTO
)
{
//weixinService.push(messageDTO.getAppid(), messageDTO);
//weixinService.push(messageDTO.getAppid(), messageDTO);
return
R
.
ok
();
return
R
.
ok
();
...
@@ -82,6 +83,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
...
@@ -82,6 +83,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
*/
*/
@Override
@Override
@PostMapping
(
value
=
"/sendMailOnlyContent"
)
@PostMapping
(
value
=
"/sendMailOnlyContent"
)
@ResponseBody
public
R
sendMailOnlyContent
(
@RequestBody
MailTemplateMessageDTO
messageDTO
)
{
public
R
sendMailOnlyContent
(
@RequestBody
MailTemplateMessageDTO
messageDTO
)
{
mailService
.
sendSimpleMailOnlyContent
(
messageDTO
.
getTo
(),
messageDTO
.
getTitle
(),
messageDTO
.
getContent
());
mailService
.
sendSimpleMailOnlyContent
(
messageDTO
.
getTo
(),
messageDTO
.
getTitle
(),
messageDTO
.
getContent
());
return
R
.
ok
();
return
R
.
ok
();
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment