REQ-3045: 不要在链接中保留过多无用的字段
This commit is contained in:
parent
c8b2fe64e5
commit
88b91be570
@ -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());
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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())
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user