forked from github/dataease
fix(数据源): 在不同组织根目录创建资源不允许重名
This commit is contained in:
parent
fb22c65907
commit
44dca6689e
@ -87,7 +87,7 @@ public class DataSourceManage {
|
||||
public void checkName(DatasourceDTO dto) {
|
||||
QueryWrapper<CoreDatasource> wrapper = new QueryWrapper<>();
|
||||
if (ObjectUtils.isNotEmpty(dto.getPid())) {
|
||||
wrapper.eq("pid", dto.getPid());
|
||||
wrapper.eq("pid", dto.getPid().equals(0L) ? AuthUtils.getUser().getDefaultOid() : dto.getPid());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(dto.getName())) {
|
||||
wrapper.eq("name", dto.getName());
|
||||
|
Loading…
Reference in New Issue
Block a user