forked from github/dataease
refactor: remove log
This commit is contained in:
parent
bd8b544b77
commit
a308e2fb9a
@ -29,8 +29,6 @@ import io.dataease.service.dataset.DataSetTableService;
|
||||
import io.dataease.service.dataset.DataSetTableUnionService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
@ -58,35 +56,26 @@ public class ViewPluginBaseServiceImpl implements ViewPluginBaseService {
|
||||
@Resource
|
||||
private ChartViewService chartViewService;
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ViewPluginBaseServiceImpl.class);
|
||||
|
||||
|
||||
@Override
|
||||
public PluginSingleField buildField(String dsType, PluginViewField pluginViewField, PluginViewSQL tableObj, int index) {
|
||||
PluginSingleField result = new PluginSingleField();
|
||||
String FIELD_ALIAS_PREFIX = StringUtils.equals(pluginViewField.getTypeField(), "xAxis") ? SQLConstants.FIELD_ALIAS_X_PREFIX : SQLConstants.FIELD_ALIAS_Y_PREFIX;
|
||||
|
||||
String originField = getOriginName(dsType, pluginViewField, tableObj);
|
||||
logger.info("originField:" + gson.toJson(originField));
|
||||
|
||||
PluginViewSQL field;
|
||||
String where;
|
||||
String alias_fix = ConstantsUtil.constantsValue(dsType, "ALIAS_FIX");
|
||||
logger.info("alias_fix:" + alias_fix);
|
||||
String fieldAlias = String.format(alias_fix, String.format(FIELD_ALIAS_PREFIX, index));
|
||||
|
||||
field = getField(dsType, pluginViewField, originField, fieldAlias);
|
||||
where = getWhere(dsType, pluginViewField, originField, fieldAlias);
|
||||
PluginViewSQL sort = addSort(pluginViewField.getSort(), originField, fieldAlias);
|
||||
|
||||
logger.info("field:" + gson.toJson(field));
|
||||
logger.info("where:" + where);
|
||||
logger.info("sort:" + gson.toJson(sort));
|
||||
|
||||
Optional.ofNullable(field).ifPresent(f -> result.setField(f));
|
||||
Optional.ofNullable(sort).ifPresent(s -> result.setSort(s));
|
||||
Optional.ofNullable(where).ifPresent(w -> result.setWhere(w));
|
||||
logger.info("result:" + gson.toJson(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package io.dataease.service.chart.util;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import io.dataease.controller.request.chart.ChartDrillRequest;
|
||||
import io.dataease.dto.chart.*;
|
||||
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
||||
@ -1177,9 +1176,6 @@ public class ChartDataBuild {
|
||||
}
|
||||
|
||||
private static Map<String, Object> transTableNormal(List<ChartViewFieldDTO> fields, ChartViewWithBLOBs view, List<String[]> data, Map<String, ColumnPermissionItem> desensitizationList) {
|
||||
Gson gson = new Gson();
|
||||
logger.info("field:" + gson.toJson(fields));
|
||||
logger.info("data:" + gson.toJson(data));
|
||||
Map<String, Object> map = new TreeMap<>();
|
||||
List<Map<String, Object>> tableRow = new ArrayList<>();
|
||||
data.forEach(ele -> {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package io.dataease.plugins.view.official.handler;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import io.dataease.plugins.common.constants.datasource.SQLConstants;
|
||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||
import io.dataease.plugins.common.util.ConstantsUtil;
|
||||
@ -10,8 +9,6 @@ import io.dataease.plugins.view.service.ViewPluginBaseService;
|
||||
import io.dataease.plugins.view.service.ViewPluginService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.stringtemplate.v4.ST;
|
||||
import org.stringtemplate.v4.STGroup;
|
||||
import org.stringtemplate.v4.STGroupFile;
|
||||
@ -24,12 +21,8 @@ import java.util.stream.Collectors;
|
||||
|
||||
public class ChartMixViewStatHandler implements PluginViewStatHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ChartMixViewStatHandler.class);
|
||||
private static final Gson gson = new Gson();
|
||||
|
||||
@Override
|
||||
public String build(PluginViewParam pluginViewParam, ViewPluginService viewPluginService) {
|
||||
logger.info("param:" + gson.toJson(pluginViewParam));
|
||||
ViewPluginBaseService baseService = viewPluginService.getBaseService();
|
||||
PluginViewSet pluginViewSet = pluginViewParam.getPluginViewSet();
|
||||
List<DataSetRowPermissionsTreeDTO> rowPermissionsTree = pluginViewParam.getRowPermissionsTree();
|
||||
@ -43,7 +36,6 @@ public class ChartMixViewStatHandler implements PluginViewStatHandler {
|
||||
PluginViewField pluginViewField = pluginViewParam.getPluginViewFields().get(i);
|
||||
String typeKey = pluginViewField.getTypeField();
|
||||
PluginSingleField pluginSingleField = baseService.buildField(dsType, pluginViewField, tableObj, i);
|
||||
logger.info("pluginSingleField:" + gson.toJson(pluginSingleField));
|
||||
List<PluginSingleField> lists = fieldSQLMap.getOrDefault(typeKey, new ArrayList<>());
|
||||
lists.add(pluginSingleField);
|
||||
fieldSQLMap.put(typeKey, lists);
|
||||
@ -58,8 +50,6 @@ public class ChartMixViewStatHandler implements PluginViewStatHandler {
|
||||
List<PluginViewSQL> yOrders = fieldSQLMap.getOrDefault("yAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getSort())).map(PluginSingleField::getSort).collect(Collectors.toList());
|
||||
List<String> yWheres = fieldSQLMap.getOrDefault("yAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getWhere())).map(PluginSingleField::getWhere).collect(Collectors.toList());
|
||||
|
||||
logger.info("xAxis:" + gson.toJson(xFields));
|
||||
logger.info("yAxis:" + gson.toJson(yFields));
|
||||
/*List<PluginViewSQL> yExtFields = fieldSQLMap.getOrDefault("yAxisExt", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getField())).map(PluginSingleField::getField).collect(Collectors.toList());
|
||||
List<PluginViewSQL> yExtOrders = fieldSQLMap.getOrDefault("yAxisExt", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getSort())).map(PluginSingleField::getSort).collect(Collectors.toList());
|
||||
List<String> yExtWheres = fieldSQLMap.getOrDefault("yAxisExt", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getWhere())).map(PluginSingleField::getWhere).collect(Collectors.toList());
|
||||
|
Loading…
Reference in New Issue
Block a user