@ -136,7 +136,7 @@ public class OssBuilder {
Oss oss = CacheUtil.get(RESOURCE_CACHE, OSS_CODE, key, () -> {
Oss o = ossService.getOne(lqw);
// 若为空则调用默认配置
if ((Func.isEmpty(o))) {
if (o == null || o.getId() == null) {
Oss defaultOss = new Oss();
defaultOss.setId(0L);
defaultOss.setCategory(OssEnum.of(ossProperties.getName()).getCategory());
@ -133,7 +133,7 @@ public class SmsBuilder {
Sms sms = CacheUtil.get(RESOURCE_CACHE, SMS_CODE, key, () -> {
Sms s = smsService.getOne(lqw);
if ((Func.isEmpty(s))) {
if (s == null || s.getId() == null) {
Sms defaultSms = new Sms();
defaultSms.setId(0L);
defaultSms.setTemplateId(smsProperties.getTemplateId());