田源
2023-10-12 3d462841427d2f1f94358b46870ddabde4945ca6
Merge remote-tracking branch 'origin/master'
已修改3个文件
10 ■■■■ 文件已修改
Source/UBCS-WEB/src/views/system/menu.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-auth/src/main/java/com/vci/ubcs/auth/utils/TokenUtil.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/MenuServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/system/menu.vue
@@ -587,7 +587,7 @@
        update(row).then(() => {
          this.$message({
            type: "success",
            message: "操作成功1!"
            message: "操作成功!"
          });
          // 数据回调进行刷新
          this.onLoad()
Source/UBCS/ubcs-auth/src/main/java/com/vci/ubcs/auth/utils/TokenUtil.java
@@ -16,6 +16,7 @@
 */
package com.vci.ubcs.auth.utils;
import com.vci.ubcs.system.cache.NacosConfigCache;
import lombok.SneakyThrows;
import com.vci.ubcs.common.constant.TenantConstant;
import org.springblade.core.launch.constant.TokenConstant;
@@ -23,6 +24,7 @@
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.*;
import com.vci.ubcs.system.entity.Tenant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.oauth2.common.exceptions.UnapprovedClientAuthenticationException;
import org.springframework.security.oauth2.common.exceptions.UserDeniedAuthorizationException;
@@ -85,6 +87,8 @@
    public final static String REFRESH_TOKEN_KEY = "refresh_token";
    private static BladeTenantProperties tenantProperties;
    @Autowired
    private static NacosConfigCache nacosConfigCache;
    /**
     * 获取租户配置
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/MenuServiceImpl.java
@@ -150,7 +150,9 @@
    @Override
    public List<TreeNode> grantTree(BladeUser user) {
        List<TreeNode> menuTree = user.getTenantId().equals(nacosConfigCache.getAdminUserInfo().getTenantId()) ? baseMapper.grantTree() : baseMapper.grantTreeByRole(Func.toLongList(user.getRoleId()));
        List<TreeNode> menuTree = user.getTenantId().equals(nacosConfigCache.getAdminUserInfo().getTenantId())
            && user.getUserId().equals(nacosConfigCache.getAdminUserInfo().getUserId())
            ? baseMapper.grantTree() : baseMapper.grantTreeByRole(Func.toLongList(user.getRoleId()));
        return ForestNodeMerger.merge(tenantPackageTree(menuTree, user.getTenantId()));
    }