From a85cb705274d8fbd9f5fba86ff1c39c13ac66de0 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期一, 16 十月 2023 17:46:02 +0800
Subject: [PATCH] 1.用户加控制启用,停用状态 2.根据流水依赖获取最大流水值
---
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 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 dc6025a..d90ff86 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 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;
@@ -76,6 +78,13 @@
excludeRole = RoleConstant.ADMINISTRATOR;
}
return ForestNodeMerger.merge(baseMapper.tree(tenantId, excludeRole));
+ }
+
+ @Override
+ public List<RoleVO> roleList(String tenantId) {
+ // 杩欓噷鍒ゆ柇鎴戜滑鑷繁閰嶇疆鐨勭鐞嗙粍绉熸埛锛屽彲浠ユ煡璇㈡墍鏈�
+ List<RoleVO> tree = baseMapper.roleList(tenantId.equals(tenantId) ? "":tenantId);
+ return tree;
}
@Override
@@ -187,8 +196,11 @@
}
}
if (Func.isEmpty(role.getParentId())) {
- role.setTenantId(AuthUtil.getTenantId());
role.setParentId(BladeConstant.TOP_PARENT_ID);
+ // 鍓嶇浼犱簡鏄睘浜庨偅涓鎴穒d涓嬬殑瑙掕壊
+ if(Func.isEmpty(role.getTenantId())){
+ role.setTenantId(AuthUtil.getTenantId());
+ }
}
if (role.getParentId() > 0) {
Role parent = getById(role.getParentId());
--
Gitblit v1.9.3