提交 85012cb4 authored 作者: taojinlong's avatar taojinlong

fix: API 数据集同步错误

上级 b1100a01
......@@ -185,7 +185,7 @@ public class ApiProvider extends DatasourceProvider{
int i = 0;
while (it.hasNext()){
Map.Entry entry = (Map.Entry)it.next();
row[i] = Optional.ofNullable(entry.getValue()).orElse("").toString();
row[i] = Optional.ofNullable(entry.getValue()).orElse("").toString().replaceAll("\n", " ").replaceAll("\r", " ");
i++;
}
dataList.add(row);
......
......@@ -310,7 +310,7 @@ public class DatasourceService {
Iterator it = data.entrySet().iterator();
while (it.hasNext()){
Map.Entry entry = (Map.Entry)it.next();
jsonObject.put((String) entry.getKey(), entry.getValue());
jsonObject.put((String) entry.getKey(), Optional.ofNullable(entry.getValue()).orElse("").toString().replaceAll("\n", " ").replaceAll("\r", " "));
if(getFileds) {
DatasetTableField tableField = new DatasetTableField();
tableField.setOriginName((String) entry.getKey());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论