Commit a9b0b700 by yangll

添加返回注解

1 parent ffb49ad5
......@@ -11,10 +11,7 @@ import cn.com.glsx.notify.modules.service.SmsService;
import com.glsx.plat.core.web.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
......@@ -41,6 +38,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
@Override
@PostMapping(value = "/sendSms")
@ResponseBody
public R sendSms(@RequestBody SmsTemplateMessageDTO messageDTO) {
smsService.sendSms(messageDTO.getPhone(), messageDTO.getTemplate(), messageDTO.getArgs().values());
return R.ok();
......@@ -48,6 +46,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
@Override
@PostMapping(value = "/sendMail")
@ResponseBody
public R sendMail(@RequestBody MailTemplateMessageDTO messageDTO) {
Map<String, Object> args = new HashMap<>();
args.put("arg1", "刘宇峰");
......@@ -59,6 +58,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
@Override
@PostMapping(value = "/sendPC")
@ResponseBody
public R sendPC(@RequestBody PCTemplateMessageDTO messageDTO) {
// TODO: 2020/9/21 名称约束
......@@ -69,6 +69,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
@Override
@PostMapping(value = "/sendWechat")
@ResponseBody
public R sendWechat(@RequestBody WechatTemplateMessageDTO messageDTO) {
//weixinService.push(messageDTO.getAppid(), messageDTO);
return R.ok();
......@@ -82,6 +83,7 @@ public class NotifyApiController implements NotifyCenterFeignClient {
*/
@Override
@PostMapping(value = "/sendMailOnlyContent")
@ResponseBody
public R sendMailOnlyContent(@RequestBody MailTemplateMessageDTO messageDTO) {
mailService.sendSimpleMailOnlyContent(messageDTO.getTo(), messageDTO.getTitle(), messageDTO.getContent());
return R.ok();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!