mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix(数据源): 不同组织数据源根目录下无法创建同名资源
This commit is contained in:
committed by
xuwei-fit2cloud
parent
6752ac99da
commit
3f39e5c6bc
@@ -16,6 +16,7 @@ import io.dataease.exception.DEException;
|
||||
import io.dataease.extensions.datasource.dto.DatasourceDTO;
|
||||
import io.dataease.i18n.Translator;
|
||||
import io.dataease.license.config.XpackInteract;
|
||||
import io.dataease.license.utils.LicenseUtil;
|
||||
import io.dataease.model.BusiNodeRequest;
|
||||
import io.dataease.model.BusiNodeVO;
|
||||
import io.dataease.operation.manage.CoreOptRecentManage;
|
||||
@@ -95,7 +96,11 @@ public class DataSourceManage {
|
||||
public void checkName(DatasourceDTO dto) {
|
||||
QueryWrapper<CoreDatasource> wrapper = new QueryWrapper<>();
|
||||
if (ObjectUtils.isNotEmpty(dto.getPid())) {
|
||||
wrapper.eq("pid", dto.getPid());
|
||||
if (LicenseUtil.licenseValid() && dto.getPid().equals(0L)) {
|
||||
wrapper.eq("pid", -100L);
|
||||
} else {
|
||||
wrapper.eq("pid", dto.getPid());
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(dto.getName())) {
|
||||
wrapper.eq("name", dto.getName());
|
||||
|
||||
Reference in New Issue
Block a user