zrj
2024-06-06 477c18f08b2918f24f56d4e082146cdd35b0264c
错误引入信息清除
17 files modified
6 files renamed
162 ■■■■ changed files
blade-auth/src/main/java/org/springblade/auth/config/BladeAuthorizationServerConfiguration.java 2 ●●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/auth/granter/BladeTokenGranter.java 1 ●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java 2 ●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/controller/RoleController.java 2 ●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/controller/TenantController.java 4 ●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/dto/DeptDTO.java patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/dto/MenuDTO.java patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/dto/ParamDTO.java patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/dto/PostDTO.java patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/dto/RoleDTO.java patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/dto/RoleMenuDTO.java patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/entity/AuthClient.java 5 ●●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/mapper/MenuMapper.java 1 ●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java 19 ●●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java 5 ●●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/service/impl/RegionServiceImpl.java 5 ●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/service/impl/TenantServiceImpl.java 32 ●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/user/cache/UserCache.java 18 ●●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/user/entity/User.java 5 ●●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java 7 ●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/wrapper/DeptWrapper.java 18 ●●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/wrapper/MenuWrapper.java 18 ●●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/system/wrapper/RegionWrapper.java 18 ●●●●● patch | view | raw | blame | history
blade-auth/src/main/java/org/springblade/auth/config/BladeAuthorizationServerConfiguration.java
@@ -20,10 +20,8 @@
import lombok.SneakyThrows;
import org.springblade.auth.constant.AuthConstant;
import org.springblade.auth.granter.BladeTokenGranter;
//import org.springblade.auth.service.BladeClientDetailsServiceImpl;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.social.props.SocialProperties;
import org.springblade.system.user.feign.IUserClient;
import org.springblade.system.user.service.IUserService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
blade-auth/src/main/java/org/springblade/auth/granter/BladeTokenGranter.java
@@ -18,7 +18,6 @@
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.social.props.SocialProperties;
import org.springblade.system.user.feign.IUserClient;
import org.springblade.system.user.service.IUserService;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java
@@ -27,7 +27,7 @@
import org.springblade.core.jwt.props.JwtProperties;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.tool.utils.*;
import org.springblade.system.cache.ParamCache;
import org.springblade.common.cache.ParamCache;
import org.springblade.system.entity.Tenant;
import org.springblade.system.service.IRoleService;
import org.springblade.system.service.ITenantService;
blade-auth/src/main/java/org/springblade/system/controller/RoleController.java
@@ -13,7 +13,7 @@
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.constant.RoleConstant;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.cache.SysCache;
import org.springblade.common.cache.SysCache;
import org.springblade.system.entity.Role;
import org.springblade.system.service.IRoleService;
import org.springblade.system.user.cache.UserCache;
blade-auth/src/main/java/org/springblade/system/controller/TenantController.java
@@ -48,8 +48,8 @@
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
import static org.springblade.core.tenant.constant.TenantBaseConstant.TENANT_DATASOURCE_CACHE;
import static org.springblade.core.tenant.constant.TenantBaseConstant.TENANT_DATASOURCE_EXIST_KEY;
import static org.springblade.system.cache.SysCache.TENANT_PACKAGE_ID;
import static org.springblade.system.cache.SysCache.TENANT_TENANT_ID;
import static org.springblade.common.cache.SysCache.TENANT_PACKAGE_ID;
import static org.springblade.common.cache.SysCache.TENANT_TENANT_ID;
/**
 * 控制器
blade-auth/src/main/java/org/springblade/system/dto/DeptDTO.java
blade-auth/src/main/java/org/springblade/system/dto/MenuDTO.java
blade-auth/src/main/java/org/springblade/system/dto/ParamDTO.java
blade-auth/src/main/java/org/springblade/system/dto/PostDTO.java
blade-auth/src/main/java/org/springblade/system/dto/RoleDTO.java
blade-auth/src/main/java/org/springblade/system/dto/RoleMenuDTO.java
blade-auth/src/main/java/org/springblade/system/entity/AuthClient.java
@@ -48,6 +48,11 @@
    @ApiModelProperty(value = "客户端密钥")
    private String clientSecret;
    /**
     * 客户端名称
     */
    @ApiModelProperty(value = "客户端名称")
    private String clientName;
    /**
     * 资源集合
     */
    @ApiModelProperty(value = "资源集合")
blade-auth/src/main/java/org/springblade/system/mapper/MenuMapper.java
@@ -21,7 +21,6 @@
import org.springblade.system.dto.MenuDTO;
import org.springblade.system.entity.Menu;
import org.springblade.system.vo.MenuVO;
import java.util.List;
import java.util.Map;
blade-auth/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java
@@ -1,31 +1,14 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringPool;
import org.springblade.system.cache.SysCache;
import org.springblade.common.cache.SysCache;
import org.springblade.system.entity.Dept;
import org.springblade.system.mapper.DeptMapper;
import org.springblade.system.service.IDeptService;
blade-auth/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java
@@ -29,8 +29,7 @@
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.SysCache;
import org.springblade.system.dto.MenuDTO;
import org.springblade.common.cache.SysCache;
import org.springblade.system.entity.*;
import org.springblade.system.mapper.MenuMapper;
import org.springblade.system.service.IMenuService;
@@ -41,7 +40,7 @@
import org.springblade.system.wrapper.MenuWrapper;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springblade.system.dto.MenuDTO;
import java.util.*;
import java.util.stream.Collectors;
blade-auth/src/main/java/org/springblade/system/service/impl/RegionServiceImpl.java
@@ -19,7 +19,6 @@
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringPool;
@@ -29,12 +28,10 @@
import org.springblade.system.service.IRegionService;
import org.springblade.system.vo.RegionVO;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static org.springblade.system.cache.RegionCache.*;
import static org.springblade.common.cache.RegionCache.*;
/**
blade-auth/src/main/java/org/springblade/system/service/impl/TenantServiceImpl.java
@@ -1,19 +1,3 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.system.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -21,23 +5,21 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.AllArgsConstructor;
import org.springblade.core.cache.utils.CacheUtil;
//import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tenant.TenantId;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.DesUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.ParamCache;
import org.springblade.common.cache.ParamCache;
import org.springblade.system.entity.*;
import org.springblade.system.mapper.TenantMapper;
import org.springblade.system.service.*;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.enums.UserEnum;
import org.springblade.system.user.feign.IUserClient;
import org.springblade.system.user.service.IUserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -66,7 +48,7 @@
    private final IPostService postService;
    private final IRoleMenuService roleMenuService;
    private final IDictBizService dictBizService;
    private final IUserClient userClient;
    private final IUserService userClient;
    @Override
    public IPage<Tenant> selectTenantPage(IPage<Tenant> page, Tenant tenant) {
@@ -151,8 +133,8 @@
            user.setUserType(UserEnum.WEB.getCategory());
            user.setIsDeleted(BladeConstant.DB_NOT_DELETED);
            boolean temp = super.saveOrUpdate(tenant);
            R<Boolean> result = userClient.saveUser(user);
            if (!result.isSuccess()) {
            boolean result = userClient.save(user);
            if (!result) {
//                throw new ServiceException(result.getMsg());
            }
            return temp;
@@ -172,8 +154,8 @@
//            throw new ServiceException("不可删除管理租户!");
        }
        boolean tenantTemp = this.deleteLogic(ids);
        R<Boolean> result = userClient.removeUser(StringUtil.join(tenantIds));
        if (!result.isSuccess()) {
        Boolean result = userClient.removeUser(StringUtil.join(tenantIds));
        if (!result) {
//            throw new ServiceException(result.getMsg());
        }
        return tenantTemp;
blade-auth/src/main/java/org/springblade/system/user/cache/UserCache.java
@@ -1,29 +1,11 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.system.user.cache;
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.core.tool.utils.StringPool;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.feign.IUserClient;
import org.springblade.system.user.service.IUserService;
import static org.springblade.core.cache.constant.CacheConstant.USER_CACHE;
blade-auth/src/main/java/org/springblade/system/user/entity/User.java
@@ -92,5 +92,10 @@
     */
    private String postId;
    /**
     * 客户端id
     */
    private String clientId;
}
blade-auth/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java
@@ -30,18 +30,15 @@
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tenant.BladeTenantProperties;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.*;
import org.springblade.system.cache.ParamCache;
import org.springblade.system.cache.SysCache;
import org.springblade.common.cache.ParamCache;
import org.springblade.common.cache.SysCache;
import org.springblade.system.entity.Tenant;
import org.springblade.system.enums.DictEnum;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.service.IRoleService;
import org.springblade.system.service.ITenantService;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.*;
import org.springblade.system.user.enums.UserEnum;
blade-auth/src/main/java/org/springblade/system/wrapper/DeptWrapper.java
@@ -1,19 +1,3 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.system.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
@@ -22,7 +6,7 @@
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.common.cache.DictCache;
import org.springblade.system.cache.SysCache;
import org.springblade.common.cache.SysCache;
import org.springblade.system.entity.Dept;
import org.springblade.system.enums.DictEnum;
import org.springblade.system.vo.DeptVO;
blade-auth/src/main/java/org/springblade/system/wrapper/MenuWrapper.java
@@ -1,19 +1,3 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.system.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
@@ -22,7 +6,7 @@
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.common.cache.DictCache;
import org.springblade.system.cache.SysCache;
import org.springblade.common.cache.SysCache;
import org.springblade.system.entity.Menu;
import org.springblade.system.enums.DictEnum;
import org.springblade.system.vo.MenuVO;
blade-auth/src/main/java/org/springblade/system/wrapper/RegionWrapper.java
@@ -1,25 +1,9 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.system.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.system.cache.RegionCache;
import org.springblade.common.cache.RegionCache;
import org.springblade.system.entity.Region;
import org.springblade.system.vo.RegionVO;