From e903b9669c92a6cda1a2114a3320c2646fc5d1f4 Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期四, 03 八月 2023 09:56:51 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java
index a7ef5c4..8ec1b9b 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java
@@ -24,10 +24,12 @@
 import com.vci.ubcs.system.service.IRoleMenuService;
 import com.vci.ubcs.system.service.IRoleScopeService;
 import com.vci.ubcs.system.service.IRoleService;
+import com.vci.ubcs.system.vo.DeptVO;
 import com.vci.ubcs.system.wrapper.RoleWrapper;
 import lombok.AllArgsConstructor;
-import com.vci.ubcs.core.log.exception.ServiceException;
+import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.constant.BladeConstant;
 import org.springblade.core.tool.constant.RoleConstant;
 import org.springblade.core.tool.node.ForestNodeMerger;
@@ -79,6 +81,13 @@
 	}
 
 	@Override
+	public List<RoleVO> roleList(String tenantId) {
+		// 杩欓噷鍒ゆ柇鎴戜滑鑷繁閰嶇疆鐨勭鐞嗙粍绉熸埛锛屽彲浠ユ煡璇㈡墍鏈�
+		List<RoleVO> tree = baseMapper.roleList(tenantId.equals(tenantId) ? "":tenantId);
+		return tree;
+	}
+
+	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public boolean grant(@NotEmpty List<Long> roleIds, List<Long> menuIds, List<Long> dataScopeIds, List<Long> apiScopeIds) {
 		return grantRoleMenu(roleIds, menuIds) && grantDataScope(roleIds, dataScopeIds) && grantApiScope(roleIds, apiScopeIds);
@@ -166,7 +175,7 @@
 		if (roleList != null && roleList.size() > 0) {
 			return roleList.stream().map(role -> Func.toStr(role.getId())).distinct().collect(Collectors.joining(","));
 		}
-		return null;
+		return "";
 	}
 
 	@Override

--
Gitblit v1.10.0