mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
Merge pull request #13725 from dataease/pr@dev-v2@perf_auth_weight
perf: 社区版默认资源权重
This commit is contained in:
@@ -288,7 +288,7 @@ public class DatasetGroupManage {
|
||||
}
|
||||
|
||||
private DataSetNodeBO convert(DataSetNodePO po) {
|
||||
return new DataSetNodeBO(po.getId(), po.getName(), StringUtils.equals(po.getNodeType(), leafType), 7, po.getPid(), 0);
|
||||
return new DataSetNodeBO(po.getId(), po.getName(), StringUtils.equals(po.getNodeType(), leafType), 9, po.getPid(), 0);
|
||||
}
|
||||
|
||||
public void checkName(DatasetGroupInfoDTO dto) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class DataSourceManage {
|
||||
}
|
||||
Integer flag = dataSourceType.getFlag();
|
||||
int extraFlag = StringUtils.equalsIgnoreCase("error", po.getStatus()) ? Math.negateExact(flag) : flag;
|
||||
return new DatasourceNodeBO(po.getId(), po.getName(), !StringUtils.equals(po.getType(), "folder"), 7, po.getPid(), extraFlag, dataSourceType.name());
|
||||
return new DatasourceNodeBO(po.getId(), po.getName(), !StringUtils.equals(po.getType(), "folder"), 9, po.getPid(), extraFlag, dataSourceType.name());
|
||||
}
|
||||
|
||||
@XpackInteract(value = "datasourceResourceTree", replace = true, invalid = true)
|
||||
|
||||
@@ -155,7 +155,7 @@ public class CoreVisualizationManage {
|
||||
}
|
||||
|
||||
private VisualizationNodeBO convert(VisualizationNodePO po) {
|
||||
return new VisualizationNodeBO(po.getId(), po.getName(), StringUtils.equals(po.getNodeType(), "leaf"), 7, po.getPid(), po.getExtraFlag());
|
||||
return new VisualizationNodeBO(po.getId(), po.getName(), StringUtils.equals(po.getNodeType(), "leaf"), 9, po.getPid(), po.getExtraFlag());
|
||||
}
|
||||
|
||||
public CoreVisualizationManage proxy() {
|
||||
|
||||
@@ -59,7 +59,6 @@ import io.dataease.visualization.utils.VisualizationUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.checkerframework.checker.units.qual.C;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@@ -187,6 +186,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
result.setWatermarkInfo(watermarkInfo);
|
||||
}
|
||||
}
|
||||
result.setWeight(9);
|
||||
return result;
|
||||
} else {
|
||||
DEException.throwException("资源不存在或已经被删除...");
|
||||
@@ -529,10 +529,10 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
request.setQueryFrom("recent");
|
||||
IPage<VisualizationResourceVO> result = coreVisualizationManage.query(1, 20, request);
|
||||
List<VisualizationResourceVO> resourceVOS = result.getRecords();
|
||||
if(!CollectionUtils.isEmpty(resourceVOS)){
|
||||
resourceVOS.stream().forEach(item ->{
|
||||
item.setCreator(StringUtils.equals(item.getCreator(), "1")?item.getCreator():"管理员");
|
||||
item.setLastEditor(StringUtils.equals(item.getLastEditor(), "1")?item.getLastEditor():"管理员");
|
||||
if (!CollectionUtils.isEmpty(resourceVOS)) {
|
||||
resourceVOS.stream().forEach(item -> {
|
||||
item.setCreator(StringUtils.equals(item.getCreator(), "1") ? item.getCreator() : "管理员");
|
||||
item.setLastEditor(StringUtils.equals(item.getLastEditor(), "1") ? item.getLastEditor() : "管理员");
|
||||
});
|
||||
}
|
||||
return result.getRecords();
|
||||
|
||||
2
de-xpack
2
de-xpack
Submodule de-xpack updated: ef5980c7a7...eef0675804
Reference in New Issue
Block a user