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 5e35c877..d9c30c7a 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 @@ -131,7 +131,7 @@ public class DataSetServiceImpl implements DataSetService { if (StringUtils.isNotBlank(dto.getCaseResult())) { try { - JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(dto.getCaseResult(), SerializerFeature.WriteMapNullValue)); + JSONArray jsonArray = JSONArray.parseArray(dto.getCaseResult()); JSONObject jsonObject = jsonArray.getJSONObject(0); dto.setSetParamList(jsonObject.keySet()); } catch (Exception e) { @@ -163,7 +163,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()); @@ -184,7 +184,7 @@ public class DataSetServiceImpl implements DataSetService { * @param dto */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public void updateSet(DataSetDto dto) { List dataSetParamDtoList = dto.getDataSetParamDtoList(); List dataSetTransformDtoList = dto.getDataSetTransformDtoList();