fix: 修复分享给我的仪表板导出数据进入数据导出中心没有看到导出的记录

This commit is contained in:
taojinlong 2024-04-29 15:38:46 +08:00
parent 8a9bcd7919
commit f6f103c489
2 changed files with 6 additions and 3 deletions

View File

@ -1136,10 +1136,10 @@ public class ChartDataBuild {
} else {
switch (columnPermissionItem.getDesensitizationRule().getCustomBuiltInRule()) {
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"));
} 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;
case RetainMToN:

View File

@ -1,6 +1,7 @@
package io.dataease.service.exportCenter;
import com.google.gson.Gson;
import io.dataease.auth.api.dto.CurrentUserDto;
import io.dataease.commons.constants.ParamConstants;
import io.dataease.commons.constants.SysLogConstants;
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.util.CellRangeAddress;
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.Value;
import org.springframework.scheduling.annotation.Scheduled;
@ -362,7 +364,8 @@ public class ExportCenterService {
public void addTask(String exportFrom, String exportFromType, PanelViewDetailsRequest request) {
ExportTask exportTask = new ExportTask();
exportTask.setId(UUID.randomUUID().toString());
exportTask.setUserId(AuthUtils.getUser().getUserId());
CurrentUserDto u = (CurrentUserDto) SecurityUtils.getSubject().getPrincipal();
exportTask.setUserId(u.getUserId());
exportTask.setExportFrom(exportFrom);
exportTask.setExportFromType(exportFromType);
exportTask.setExportStatus("PENDING");