Merge branch 'feature/REQ-3045' into dev

This commit is contained in:
yanglin 2024-10-12 14:36:48 +08:00
commit e8fce86564
5 changed files with 7 additions and 7 deletions

View File

@ -47,7 +47,7 @@ public class MessageTemplateButtonV3ServiceImpl implements MessageTemplateButton
item.setUrlConfig(null);
}
if (item.getUrlConfig() != null) {
item.getUrlConfig().trySetEmptyIfHasNoUrl();
item.getUrlConfig().setFieldNullIfUrlAbsent();
}
return buttonV3;
}).collect(Collectors.toList());

View File

@ -148,7 +148,7 @@ public class MessageTemplateGroupV3ServiceImpl implements MessageTemplateGroupV3
if (groupConfig != null
&& groupConfig.getDetail() != null
&& groupConfig.getDetail().getUrlConfig() != null) {
groupConfig.getDetail().getUrlConfig().trySetEmptyIfHasNoUrl();
groupConfig.getDetail().getUrlConfig().setFieldNullIfUrlAbsent();
}
return messageTemplateGroupV3;
}).collect(Collectors.toList());

View File

@ -349,7 +349,7 @@ public class MessageTemplateV3ServiceImpl implements MessageTemplateV3Service {
if (Objects.nonNull(param.getCardJump().getCardUrlConfig())) {
template.setCardUrlConfig(param.getCardJump().getCardUrlConfig());
if (template.getCardUrlConfig().getUrlConfig() != null) {
template.getCardUrlConfig().getUrlConfig().trySetEmptyIfHasNoUrl();
template.getCardUrlConfig().getUrlConfig().setFieldNullIfUrlAbsent();
}
}
}

View File

@ -25,7 +25,7 @@ public class MobileUrlConfig {
return ios != null && ios.hasUrl() || android != null && android.hasUrl();
}
public void trySetEmptyIfHasNoUrl() {
public void setFieldNullIfUrlAbsent() {
if (ios != null && !ios.hasUrl())
ios = null;
if (android != null && !android.hasUrl())

View File

@ -98,7 +98,7 @@ public class UrlConfig {
return appManager != null && appManager.hasUrl();
}
public void trySetEmptyIfHasNoUrl() {
public void setFieldNullIfUrlAbsent() {
if (pcOms != null && !pcOms.hasUrl())
pcOms = null;
if (pcCms != null && !pcCms.hasUrl())
@ -106,11 +106,11 @@ public class UrlConfig {
if (pcGaGeneral != null && !pcGaGeneral.hasUrl())
pcGaGeneral = null;
if (appWorker != null)
appWorker.trySetEmptyIfHasNoUrl();
appWorker.setFieldNullIfUrlAbsent();
if (appWorker != null && !appWorker.hasUrl())
appWorker = null;
if (appManager != null)
appManager.trySetEmptyIfHasNoUrl();
appManager.setFieldNullIfUrlAbsent();
if (appManager != null && !appManager.hasUrl())
appManager = null;
}