diff --git a/sms4j-core/src/main/java/org/dromara/sms4j/core/proxy/processor/BlackListProcessor.java b/sms4j-core/src/main/java/org/dromara/sms4j/core/proxy/processor/BlackListProcessor.java index 82a692d3..16b66e75 100644 --- a/sms4j-core/src/main/java/org/dromara/sms4j/core/proxy/processor/BlackListProcessor.java +++ b/sms4j-core/src/main/java/org/dromara/sms4j/core/proxy/processor/BlackListProcessor.java @@ -55,7 +55,7 @@ public class BlackListProcessor implements CoreMethodProcessor, SmsDaoAware { } for (String phone : phones) { if (blackList.stream().anyMatch(black -> black.replace("-","").equals(phone))) { - throw new SmsBlendException("The phone:", phone + " hit global blacklist!"); + throw new SmsBlendException(String.format("The phone: %s hit global blacklist!", phone)); } } } diff --git a/sms4j-core/src/main/java/org/dromara/sms4j/core/proxy/processor/RestrictedProcessor.java b/sms4j-core/src/main/java/org/dromara/sms4j/core/proxy/processor/RestrictedProcessor.java index e92a071d..9dcb4700 100644 --- a/sms4j-core/src/main/java/org/dromara/sms4j/core/proxy/processor/RestrictedProcessor.java +++ b/sms4j-core/src/main/java/org/dromara/sms4j/core/proxy/processor/RestrictedProcessor.java @@ -96,8 +96,8 @@ public class RestrictedProcessor implements CoreMethodProcessor, SmsDaoAware { if (SmsUtils.isEmpty(dailyCount)) { smsDao.set(accountMaxKey, 1, calculateExpiryTime()); } else if (dailyCount >= accountMax) { - log.info("The phone: {},number of short messages reached the maximum today", phone); - throw new SmsBlendException("The phone: {},number of short messages reached the maximum today", phone); + log.info("The phone: {} number of short messages reached the maximum today", phone); + throw new SmsBlendException(String.format("The phone: %s number of short messages reached the maximum today", phone)); } else { smsDao.set(accountMaxKey, dailyCount + 1, calculateExpiryTime()); } @@ -118,8 +118,8 @@ public class RestrictedProcessor implements CoreMethodProcessor, SmsDaoAware { smsDao.remove(accountMaxKey); } } - log.info("The phone: {} Text messages are sent too often!", phone); - throw new SmsBlendException("The phone: {} Text messages are sent too often!", phone); + log.info("The phone: {} text messages are sent too often!", phone); + throw new SmsBlendException(String.format("The phone: %s text messages are sent too often!", phone)); } } else { smsDao.set(minuteMaxKey, 1, minTimer / 1000); diff --git a/sms4j-provider/src/main/java/org/dromara/sms4j/zhutong/service/ZhutongSmsImpl.java b/sms4j-provider/src/main/java/org/dromara/sms4j/zhutong/service/ZhutongSmsImpl.java index 311936c9..9c5db51b 100644 --- a/sms4j-provider/src/main/java/org/dromara/sms4j/zhutong/service/ZhutongSmsImpl.java +++ b/sms4j-provider/src/main/java/org/dromara/sms4j/zhutong/service/ZhutongSmsImpl.java @@ -195,7 +195,7 @@ public class ZhutongSmsImpl extends AbstractSmsBlend { signature = signature + "】"; } if (StrUtil.isBlank(templateId)) { - throw new SmsBlendException("助通短信:模板短信模板id不能为空!!"); + throw new SmsBlendException("助通短信:模板短信模板id不能为空!"); } //地址