mirror of
https://gitee.com/dromara/sms4j.git
synced 2025-12-06 08:58:38 +08:00
修复部分提示
This commit is contained in:
parent
4e3845e2ce
commit
03d30271dd
@ -55,7 +55,7 @@ public class BlackListProcessor implements CoreMethodProcessor, SmsDaoAware {
|
|||||||
}
|
}
|
||||||
for (String phone : phones) {
|
for (String phone : phones) {
|
||||||
if (blackList.stream().anyMatch(black -> black.replace("-","").equals(phone))) {
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,8 +96,8 @@ public class RestrictedProcessor implements CoreMethodProcessor, SmsDaoAware {
|
|||||||
if (SmsUtils.isEmpty(dailyCount)) {
|
if (SmsUtils.isEmpty(dailyCount)) {
|
||||||
smsDao.set(accountMaxKey, 1, calculateExpiryTime());
|
smsDao.set(accountMaxKey, 1, calculateExpiryTime());
|
||||||
} else if (dailyCount >= accountMax) {
|
} else if (dailyCount >= accountMax) {
|
||||||
log.info("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("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 {
|
} else {
|
||||||
smsDao.set(accountMaxKey, dailyCount + 1, calculateExpiryTime());
|
smsDao.set(accountMaxKey, dailyCount + 1, calculateExpiryTime());
|
||||||
}
|
}
|
||||||
@ -118,8 +118,8 @@ public class RestrictedProcessor implements CoreMethodProcessor, SmsDaoAware {
|
|||||||
smsDao.remove(accountMaxKey);
|
smsDao.remove(accountMaxKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.info("The phone: {} Text messages are sent too often!", phone);
|
log.info("The phone: {} text messages are sent too often!", phone);
|
||||||
throw new SmsBlendException("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 {
|
} else {
|
||||||
smsDao.set(minuteMaxKey, 1, minTimer / 1000);
|
smsDao.set(minuteMaxKey, 1, minTimer / 1000);
|
||||||
|
|||||||
@ -195,7 +195,7 @@ public class ZhutongSmsImpl extends AbstractSmsBlend<ZhutongConfig> {
|
|||||||
signature = signature + "】";
|
signature = signature + "】";
|
||||||
}
|
}
|
||||||
if (StrUtil.isBlank(templateId)) {
|
if (StrUtil.isBlank(templateId)) {
|
||||||
throw new SmsBlendException("助通短信:模板短信模板id不能为空!!");
|
throw new SmsBlendException("助通短信:模板短信模板id不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
//地址
|
//地址
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user