From 3a90ebab2d8e8473e2595b9bbb0b5db55e7be6ba Mon Sep 17 00:00:00 2001 From: qianming Date: Fri, 7 Jul 2023 09:50:14 +0800 Subject: [PATCH] fix--JSON null --- .../modules/dataset/service/impl/DataSetServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataset/service/impl/DataSetServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataset/service/impl/DataSetServiceImpl.java index d9c30c7a..d669254b 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataset/service/impl/DataSetServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataset/service/impl/DataSetServiceImpl.java @@ -198,7 +198,7 @@ public class DataSetServiceImpl implements DataSetService { Object o = objects.get(0); objects = new JSONArray(); objects.add(o); - dataSet.setCaseResult(objects.toJSONString()); + dataSet.setCaseResult(JSON.toJSONString(objects, SerializerFeature.WriteMapNullValue)); } } catch (Exception e) { log.info("结果集只保留一行数据失败...{}", e.getMessage());