Merge pull request #5936 from ZhaoQian1222/pr@dev@fix_view_null_pointer_exception

fix:1.10.0版本升级至1.18.9,数据迁移后部分仪表板视图报空指针异常 #5935
This commit is contained in:
王嘉豪 2023-08-23 14:10:58 +08:00 committed by GitHub
commit dc49e5f370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2000,9 +2000,12 @@ public class ChartViewService {
private List<ChartSeniorAssistDTO> getDynamicAssistFields(ChartViewDTO view) { private List<ChartSeniorAssistDTO> getDynamicAssistFields(ChartViewDTO view) {
String senior = view.getSenior(); String senior = view.getSenior();
List<ChartSeniorAssistDTO> list = new ArrayList<>();
if (StringUtils.isEmpty(senior)) {
return list;
}
JSONObject jsonObject = JSONObject.parseObject(senior); JSONObject jsonObject = JSONObject.parseObject(senior);
JSONArray assistLine = jsonObject.getJSONArray("assistLine"); JSONArray assistLine = jsonObject.getJSONArray("assistLine");
List<ChartSeniorAssistDTO> list = new ArrayList<>();
if (ObjectUtils.isEmpty(assistLine) || StringUtils.isBlank(assistLine.toJSONString())) { if (ObjectUtils.isEmpty(assistLine) || StringUtils.isBlank(assistLine.toJSONString())) {
return list; return list;
} }