修复部分提示

This commit is contained in:
Charles7c 2025-03-28 20:42:34 +08:00
parent 4e3845e2ce
commit 03d30271dd
3 changed files with 6 additions and 6 deletions

View File

@ -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));
}
}
}

View File

@ -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);

View File

@ -195,7 +195,7 @@ public class ZhutongSmsImpl extends AbstractSmsBlend<ZhutongConfig> {
signature = signature + "";
}
if (StrUtil.isBlank(templateId)) {
throw new SmsBlendException("助通短信模板短信模板id不能为空");
throw new SmsBlendException("助通短信模板短信模板id不能为空");
}
//地址