forked from github/dataease
fix: 修复分享给我的仪表板导出数据进入数据导出中心没有看到导出的记录
This commit is contained in:
parent
8a9bcd7919
commit
f6f103c489
@ -1136,10 +1136,10 @@ public class ChartDataBuild {
|
|||||||
} else {
|
} else {
|
||||||
switch (columnPermissionItem.getDesensitizationRule().getCustomBuiltInRule()) {
|
switch (columnPermissionItem.getDesensitizationRule().getCustomBuiltInRule()) {
|
||||||
case RetainBeforeMAndAfterN:
|
case RetainBeforeMAndAfterN:
|
||||||
if (StringUtils.isEmpty(originStr) || originStr.length() <= columnPermissionItem.getDesensitizationRule().getM() + columnPermissionItem.getDesensitizationRule().getN() + 1) {
|
if (StringUtils.isEmpty(originStr) || originStr.length() < columnPermissionItem.getDesensitizationRule().getM() + columnPermissionItem.getDesensitizationRule().getN()) {
|
||||||
desensitizationStr = String.join("", Collections.nCopies(columnPermissionItem.getDesensitizationRule().getM(), "X")) + "***" + String.join("", Collections.nCopies(columnPermissionItem.getDesensitizationRule().getN(), "X"));
|
desensitizationStr = String.join("", Collections.nCopies(columnPermissionItem.getDesensitizationRule().getM(), "X")) + "***" + String.join("", Collections.nCopies(columnPermissionItem.getDesensitizationRule().getN(), "X"));
|
||||||
} else {
|
} else {
|
||||||
desensitizationStr = StringUtils.substring(originStr, 0, columnPermissionItem.getDesensitizationRule().getM()) + "***" + StringUtils.substring(originStr, originStr.length() - columnPermissionItem.getDesensitizationRule().getN() - 1, originStr.length());
|
desensitizationStr = StringUtils.substring(originStr, 0, columnPermissionItem.getDesensitizationRule().getM()) + "***" + StringUtils.substring(originStr, originStr.length() - columnPermissionItem.getDesensitizationRule().getN(), originStr.length());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RetainMToN:
|
case RetainMToN:
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package io.dataease.service.exportCenter;
|
package io.dataease.service.exportCenter;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
import io.dataease.auth.api.dto.CurrentUserDto;
|
||||||
import io.dataease.commons.constants.ParamConstants;
|
import io.dataease.commons.constants.ParamConstants;
|
||||||
import io.dataease.commons.constants.SysLogConstants;
|
import io.dataease.commons.constants.SysLogConstants;
|
||||||
import io.dataease.commons.utils.*;
|
import io.dataease.commons.utils.*;
|
||||||
@ -50,6 +51,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
@ -362,7 +364,8 @@ public class ExportCenterService {
|
|||||||
public void addTask(String exportFrom, String exportFromType, PanelViewDetailsRequest request) {
|
public void addTask(String exportFrom, String exportFromType, PanelViewDetailsRequest request) {
|
||||||
ExportTask exportTask = new ExportTask();
|
ExportTask exportTask = new ExportTask();
|
||||||
exportTask.setId(UUID.randomUUID().toString());
|
exportTask.setId(UUID.randomUUID().toString());
|
||||||
exportTask.setUserId(AuthUtils.getUser().getUserId());
|
CurrentUserDto u = (CurrentUserDto) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
exportTask.setUserId(u.getUserId());
|
||||||
exportTask.setExportFrom(exportFrom);
|
exportTask.setExportFrom(exportFrom);
|
||||||
exportTask.setExportFromType(exportFromType);
|
exportTask.setExportFromType(exportFromType);
|
||||||
exportTask.setExportStatus("PENDING");
|
exportTask.setExportStatus("PENDING");
|
||||||
|
Loading…
Reference in New Issue
Block a user