mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix: 对接 SQLBot 获取数据源失败
This commit is contained in:
committed by
fit2cloud-chenyw
parent
085f765efa
commit
79c97c04b4
@@ -169,7 +169,8 @@ public class DatasetSQLBotManage {
|
||||
if (!isAdmin) {
|
||||
List<Map<String, Object>> roleMapList = dataSetAssistantMapper.roleInfoByUid(uid, oid);
|
||||
if (CollectionUtils.isNotEmpty(roleMapList)) {
|
||||
isRootRole = roleMapList.stream().anyMatch(item -> ObjectUtils.isNotEmpty(item.get("pid")) && (Integer.parseInt(item.get("pid").toString())) == 0);
|
||||
Long rootPid = 0L;
|
||||
isRootRole = roleMapList.stream().anyMatch(item -> ObjectUtils.isNotEmpty(item.get("pid")) && rootPid.equals(Long.parseLong(item.get("pid").toString())));
|
||||
roleIds = roleMapList.stream().map(item -> Long.parseLong(item.get("id").toString())).distinct().collect(Collectors.toList());
|
||||
} else {
|
||||
roleIds = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user