mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 05:50:45 +08:00
fix: API 数据集同步错误
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user