New file |
| | |
| | | package com.hz.sms.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 发送结果实体 |
| | | */ |
| | | @Data |
| | | public class SendResultDto { |
| | | /** 消息标识 */ |
| | | private String id; |
| | | /** 发送结果 0否1是 */ |
| | | private Integer sendStatus; |
| | | /** 错误信息*/ |
| | | private String errMsg; |
| | | |
| | | /**发送返回发送状态-成功失败状态*/ |
| | | public static final int STATUS_FAIL = 0; |
| | | /**发送返回发送状态-成功发送状态*/ |
| | | public static final int STATUS_REQUES_SUCCESS = 1; |
| | | |
| | | /** |
| | | *发送状态校验 |
| | | * @return |
| | | */ |
| | | public boolean checkStatus(){ |
| | | if (sendStatus != null && sendStatus == STATUS_REQUES_SUCCESS){ |
| | | return true; |
| | | }else{ |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * 发送企业微信应用消息 |
| | | * @param templateMessageDto |
| | | * @return |
| | | * @return SendResultDto转化接收 |
| | | */ |
| | | @PostMapping(value = "/corp-wx-send/application/message") |
| | | Result sendNoticeSms(@RequestBody TemplateMessageDto templateMessageDto); |
| | |
| | | /** |
| | | * 发送短信验证码 |
| | | * @param smsGeneralSendDto |
| | | * @return |
| | | * @return SendResultDto转化接收 |
| | | */ |
| | | @PostMapping(value = "/send-general/item/send/verification/code") |
| | | Result sendVerificationCode(@RequestBody SmsGeneralSendDto smsGeneralSendDto); |
| | |
| | | /** |
| | | * 微信公众号下发统一消息 |
| | | * @param weCatMessageDto |
| | | * @return |
| | | * @return SendResultDto转化接收 |
| | | */ |
| | | @PostMapping(value = "/wx/send/wechat/message") |
| | | Result sendWeChatMessage(@RequestBody WeCatMessageDto weCatMessageDto); |