Browse Source

🎉 优化sms缓存刷新机制

test
smallchill 5 years ago
parent
commit
28f067818a
  1. 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/SmsBuilder.java

2
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/SmsBuilder.java

@ -83,7 +83,7 @@ public class SmsBuilder {
if (Func.hasEmpty(template, smsCached) || !sms.getTemplateId().equals(smsCached.getTemplateId()) || !sms.getAccessKey().equals(smsCached.getAccessKey())) {
synchronized (SmsBuilder.class) {
template = templatePool.get(tenantId);
if (Func.hasEmpty(template, smsCached) || !sms.getAccessKey().equals(smsCached.getAccessKey())) {
if (Func.hasEmpty(template, smsCached) || !sms.getTemplateId().equals(smsCached.getTemplateId()) || !sms.getAccessKey().equals(smsCached.getAccessKey())) {
if (sms.getCategory() == SmsEnum.YUNPIAN.getCategory()) {
template = YunpianSmsBuilder.template(sms, redisCache);
} else if (sms.getCategory() == SmsEnum.QINIU.getCategory()) {

Loading…
Cancel
Save