!108 云片NPE异常和逻辑判断处理

Merge pull request !108 from 呆呆/dev-3.0.x
This commit is contained in:
风如歌 2023-10-19 12:39:42 +00:00 committed by Gitee
commit 484f85f9d8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -138,8 +138,10 @@ public class YunPianSmsImpl extends AbstractSmsBlend<YunpianConfig> {
body.put("apikey", getConfig().getAccessKeyId());
body.put("mobile", phone);
body.put("tpl_id", tplId);
if (!message.isEmpty()){
if (message!=null && !message.isEmpty()){
body.put("tpl_value", formattingMap(message));
}else {
body.put("tpl_value", "");
}
if (getConfig().getCallbackUrl() != null && !getConfig().getCallbackUrl().isEmpty()) {
body.put("callback_url", getConfig().getCallbackUrl());