From 03d30271dd73cc926b1c6fd7e79e52c34adbb7f1 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Fri, 28 Mar 2025 20:42:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sms4j/core/proxy/processor/BlackListProcessor.java | 2 +- .../sms4j/core/proxy/processor/RestrictedProcessor.java | 8 ++++---- .../org/dromara/sms4j/zhutong/service/ZhutongSmsImpl.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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不能为空!"); } //地址