forked from github/dataease
Merge pull request #11902 from dataease/pr@dev-v2@refactor_export-limit
refactor(图表、数据集): 增加数据集图表导出数据总量license校验
This commit is contained in:
commit
3553df0990
@ -16,7 +16,7 @@ import io.dataease.exportCenter.manage.ExportCenterManage;
|
||||
import io.dataease.extensions.datasource.dto.DatasetTableFieldDTO;
|
||||
import io.dataease.extensions.view.dto.ChartViewDTO;
|
||||
import io.dataease.extensions.view.dto.ChartViewFieldDTO;
|
||||
import io.dataease.license.config.LicSt;
|
||||
import io.dataease.license.manage.F2CLicLimitedManage;
|
||||
import io.dataease.result.ResultCode;
|
||||
import io.dataease.utils.JsonUtil;
|
||||
import io.dataease.utils.LogUtil;
|
||||
@ -60,11 +60,11 @@ public class ChartDataServer implements ChartDataApi {
|
||||
@Resource
|
||||
private DatasetFieldServer datasetFieldServer;
|
||||
|
||||
@Resource(name = "LimitConfig")
|
||||
private LicSt limitConfig;
|
||||
@Resource(name = "f2CLicLimitedManage")
|
||||
private F2CLicLimitedManage f2CLicLimitedManage;
|
||||
|
||||
private Integer getExportLimit() {
|
||||
return Math.toIntExact(Math.min(limitConfig.ALLATORIxDEMO(), limit));
|
||||
return Math.toIntExact(Math.min(f2CLicLimitedManage.checkDatasetLimit(), limit));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -12,7 +12,7 @@ import io.dataease.api.dataset.union.DatasetGroupInfoDTO;
|
||||
import io.dataease.api.dataset.union.UnionDTO;
|
||||
import io.dataease.extensions.datasource.api.PluginManageApi;
|
||||
import io.dataease.extensions.view.dto.DatasetRowPermissionsTreeObj;
|
||||
import io.dataease.license.config.LicSt;
|
||||
import io.dataease.license.manage.F2CLicLimitedManage;
|
||||
import io.dataease.model.ExportTaskDTO;
|
||||
import io.dataease.api.permissions.dataset.dto.DataSetRowPermissionsTreeDTO;
|
||||
import io.dataease.auth.bo.TokenUserBO;
|
||||
@ -117,8 +117,8 @@ public class ExportCenterManage {
|
||||
@Resource
|
||||
private DatasetDataManage datasetDataManage;
|
||||
|
||||
@Resource(name = "LimitConfig")
|
||||
private LicSt limitConfig;
|
||||
@Resource(name = "f2CLicLimitedManage")
|
||||
private F2CLicLimitedManage f2CLicLimitedManage;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
@ -153,7 +153,7 @@ public class ExportCenterManage {
|
||||
}
|
||||
|
||||
private Long getExportLimit() {
|
||||
return Math.min(limitConfig.ALLATORIxDEMO(),limit);
|
||||
return Math.min(f2CLicLimitedManage.checkDatasetLimit(),limit);
|
||||
}
|
||||
|
||||
public void download(String id, HttpServletResponse response) throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user