Merge pull request #9972 from dataease/pr@dev-v2@fix_ds

fix(数据集): 修复数据集预览报错的问题
This commit is contained in:
Junjun 2024-05-30 14:46:33 +08:00 committed by GitHub
commit 30b4ce4ea9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -207,7 +207,7 @@ public class DatasetDataManage {
Order2SQLObj.getOrders(sqlMeta, fields, datasetGroupInfoDTO.getSortFields(), crossDs, dsMap);
String querySQL;
if (start == null || count == null) {
querySQL = SQLProvider.createQuerySQL(sqlMeta, false, false, needOrder);
querySQL = SQLProvider.createQuerySQL(sqlMeta, false, needOrder, false);
} else {
querySQL = SQLProvider.createQuerySQLWithLimit(sqlMeta, false, needOrder, false, start, count);
}
@ -231,7 +231,7 @@ public class DatasetDataManage {
map.put("allFields", fieldList);
}
map.put("sql", Base64.getEncoder().encodeToString(querySQL.getBytes()));
String replaceSql = SqlUtils.rebuildSQL(SQLProvider.createQuerySQL(sqlMeta, false, false, needOrder), sqlMeta, crossDs, dsMap);
String replaceSql = SqlUtils.rebuildSQL(SQLProvider.createQuerySQL(sqlMeta, false, needOrder, false), sqlMeta, crossDs, dsMap);
map.put("total", getDatasetTotal(datasetGroupInfoDTO, replaceSql, null));
return map;
}