REQ-3045: fix npe
This commit is contained in:
parent
fedb4dd34b
commit
6072e594a6
@ -47,7 +47,7 @@ public class MessageTemplateButtonV3ServiceImpl implements MessageTemplateButton
|
|||||||
item.setUrlConfig(null);
|
item.setUrlConfig(null);
|
||||||
}
|
}
|
||||||
if (item.getUrlConfig() != null) {
|
if (item.getUrlConfig() != null) {
|
||||||
item.getUrlConfig().setFieldNullIfUrlAbsent();
|
item.getUrlConfig().setFieldsNullIfUrlAbsent();
|
||||||
}
|
}
|
||||||
return buttonV3;
|
return buttonV3;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|||||||
@ -148,7 +148,7 @@ public class MessageTemplateGroupV3ServiceImpl implements MessageTemplateGroupV3
|
|||||||
if (groupConfig != null
|
if (groupConfig != null
|
||||||
&& groupConfig.getDetail() != null
|
&& groupConfig.getDetail() != null
|
||||||
&& groupConfig.getDetail().getUrlConfig() != null) {
|
&& groupConfig.getDetail().getUrlConfig() != null) {
|
||||||
groupConfig.getDetail().getUrlConfig().setFieldNullIfUrlAbsent();
|
groupConfig.getDetail().getUrlConfig().setFieldsNullIfUrlAbsent();
|
||||||
}
|
}
|
||||||
return messageTemplateGroupV3;
|
return messageTemplateGroupV3;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|||||||
@ -349,7 +349,7 @@ public class MessageTemplateV3ServiceImpl implements MessageTemplateV3Service {
|
|||||||
if (Objects.nonNull(param.getCardJump().getCardUrlConfig())) {
|
if (Objects.nonNull(param.getCardJump().getCardUrlConfig())) {
|
||||||
template.setCardUrlConfig(param.getCardJump().getCardUrlConfig());
|
template.setCardUrlConfig(param.getCardJump().getCardUrlConfig());
|
||||||
if (template.getCardUrlConfig().getUrlConfig() != null) {
|
if (template.getCardUrlConfig().getUrlConfig() != null) {
|
||||||
template.getCardUrlConfig().getUrlConfig().setFieldNullIfUrlAbsent();
|
template.getCardUrlConfig().getUrlConfig().setFieldsNullIfUrlAbsent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,7 +68,9 @@ public class TerminalUrlParser {
|
|||||||
if (mobileUrl == null)
|
if (mobileUrl == null)
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
ArrayList<TerminalUrl> urls = new ArrayList<>();
|
ArrayList<TerminalUrl> urls = new ArrayList<>();
|
||||||
|
if (mobileUrl.getIos() != null)
|
||||||
urls.add(new TerminalUrl(TerminalTypeEnum.IOS, mobileUrl.getIos().getUrl()));
|
urls.add(new TerminalUrl(TerminalTypeEnum.IOS, mobileUrl.getIos().getUrl()));
|
||||||
|
if (mobileUrl.getAndroid() != null)
|
||||||
urls.add(new TerminalUrl(TerminalTypeEnum.ANDROID, mobileUrl.getAndroid().getUrl()));
|
urls.add(new TerminalUrl(TerminalTypeEnum.ANDROID, mobileUrl.getAndroid().getUrl()));
|
||||||
return urls;
|
return urls;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user