提交 de549dbc authored 作者: junjie's avatar junjie

feat(数据集):增加log

上级 2cd81110
...@@ -32,6 +32,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; ...@@ -32,6 +32,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import sun.rmi.runtime.Log;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.*; import java.io.*;
...@@ -226,7 +227,7 @@ public class DataSetTableService { ...@@ -226,7 +227,7 @@ public class DataSetTableService {
String table = dataTableInfoDTO.getTable(); String table = dataTableInfoDTO.getTable();
datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray) + " LIMIT " + (page - 1) * pageSize + "," + realSize); datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray) + " LIMIT " + (page - 1) * pageSize + "," + realSize);
LogUtil.info(datasourceRequest.getQuery());
try { try {
data.addAll(datasourceProvider.getData(datasourceRequest)); data.addAll(datasourceProvider.getData(datasourceRequest));
} catch (Exception e) { } catch (Exception e) {
...@@ -246,7 +247,7 @@ public class DataSetTableService { ...@@ -246,7 +247,7 @@ public class DataSetTableService {
String sql = dataTableInfoDTO.getSql(); String sql = dataTableInfoDTO.getSql();
datasourceRequest.setQuery(createQuerySQL(ds.getType(), " (" + sql + ") AS tmp ", fieldArray) + " LIMIT " + (page - 1) * pageSize + "," + realSize); datasourceRequest.setQuery(createQuerySQL(ds.getType(), " (" + sql + ") AS tmp ", fieldArray) + " LIMIT " + (page - 1) * pageSize + "," + realSize);
LogUtil.info(datasourceRequest.getQuery());
try { try {
data.addAll(datasourceProvider.getData(datasourceRequest)); data.addAll(datasourceProvider.getData(datasourceRequest));
} catch (Exception e) { } catch (Exception e) {
...@@ -265,7 +266,7 @@ public class DataSetTableService { ...@@ -265,7 +266,7 @@ public class DataSetTableService {
datasourceRequest.setDatasource(ds); datasourceRequest.setDatasource(ds);
String table = DorisTableUtils.dorisName(dataSetTableRequest.getId()); String table = DorisTableUtils.dorisName(dataSetTableRequest.getId());
datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray) + " LIMIT " + (page - 1) * pageSize + "," + realSize); datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray) + " LIMIT " + (page - 1) * pageSize + "," + realSize);
LogUtil.info(datasourceRequest.getQuery());
try { try {
data.addAll(jdbcProvider.getData(datasourceRequest)); data.addAll(jdbcProvider.getData(datasourceRequest));
} catch (Exception e) { } catch (Exception e) {
...@@ -285,7 +286,7 @@ public class DataSetTableService { ...@@ -285,7 +286,7 @@ public class DataSetTableService {
datasourceRequest.setDatasource(ds); datasourceRequest.setDatasource(ds);
String table = DorisTableUtils.dorisName(dataSetTableRequest.getId()); String table = DorisTableUtils.dorisName(dataSetTableRequest.getId());
datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray) + " LIMIT " + (page - 1) * pageSize + "," + realSize); datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray) + " LIMIT " + (page - 1) * pageSize + "," + realSize);
LogUtil.info(datasourceRequest.getQuery());
try { try {
data.addAll(jdbcProvider.getData(datasourceRequest)); data.addAll(jdbcProvider.getData(datasourceRequest));
} catch (Exception e) { } catch (Exception e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论