Commit be56c834086d5c66932f1b4f38c4dbff8536b29a
1 parent
88f32231
feat:【system】阿里云短信客户端的 GetSmsTemplate 接口升级适配
Showing
1 changed file
with
2 additions
and
4 deletions
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/framework/sms/core/client/impl/AliyunSmsClient.java
| @@ -22,8 +22,6 @@ import com.google.common.annotations.VisibleForTesting; | @@ -22,8 +22,6 @@ import com.google.common.annotations.VisibleForTesting; | ||
| 22 | import lombok.SneakyThrows; | 22 | import lombok.SneakyThrows; |
| 23 | import lombok.extern.slf4j.Slf4j; | 23 | import lombok.extern.slf4j.Slf4j; |
| 24 | 24 | ||
| 25 | -import java.net.URLEncoder; | ||
| 26 | -import java.nio.charset.StandardCharsets; | ||
| 27 | import java.util.*; | 25 | import java.util.*; |
| 28 | import java.util.stream.Collectors; | 26 | import java.util.stream.Collectors; |
| 29 | 27 | ||
| @@ -93,10 +91,10 @@ public class AliyunSmsClient extends AbstractSmsClient { | @@ -93,10 +91,10 @@ public class AliyunSmsClient extends AbstractSmsClient { | ||
| 93 | @Override | 91 | @Override |
| 94 | public SmsTemplateRespDTO getSmsTemplate(String apiTemplateId) throws Throwable { | 92 | public SmsTemplateRespDTO getSmsTemplate(String apiTemplateId) throws Throwable { |
| 95 | // 1. 执行请求 | 93 | // 1. 执行请求 |
| 96 | - // 参考链接 https://api.aliyun.com/document/Dysmsapi/2017-05-25/QuerySmsTemplate | 94 | + // 参考链接 https://api.aliyun.com/document/Dysmsapi/2017-05-25/GetSmsTemplate |
| 97 | TreeMap<String, Object> queryParam = new TreeMap<>(); | 95 | TreeMap<String, Object> queryParam = new TreeMap<>(); |
| 98 | queryParam.put("TemplateCode", apiTemplateId); | 96 | queryParam.put("TemplateCode", apiTemplateId); |
| 99 | - JSONObject response = request("QuerySmsTemplate", queryParam); | 97 | + JSONObject response = request("GetSmsTemplate", queryParam); |
| 100 | 98 | ||
| 101 | // 2.1 请求失败 | 99 | // 2.1 请求失败 |
| 102 | String code = response.getStr("Code"); | 100 | String code = response.getStr("Code"); |