增加多租户功能(应用隔离)

This commit is contained in:
zlt
2019-08-09 00:46:18 +08:00
parent d7e914c6ce
commit d0d7deaf7a
44 changed files with 546 additions and 330 deletions
@@ -1,6 +1,5 @@
package com.central;
import com.central.common.annotation.EnableLoginArgResolver;
import com.central.common.ribbon.annotation.EnableFeignInterceptor;
import com.central.search.annotation.EnableSearchClient;
import org.springframework.boot.SpringApplication;
@@ -11,7 +10,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* @author 作者 owen E-mail: 624191343@qq.com
*/
@EnableLoginArgResolver
@EnableDiscoveryClient
@EnableSearchClient
@EnableTransactionManagement
@@ -0,0 +1,12 @@
package com.central.user.config;
import com.central.common.config.DefaultWebMvcConfig;
import org.springframework.context.annotation.Configuration;
/**
* @author zlt
* @date 2019/8/5
*/
@Configuration
public class WebMvcConfig extends DefaultWebMvcConfig {
}
@@ -28,8 +28,7 @@ public interface SysUserRoleMapper extends SuperMapper<SysRoleUser> {
* @param userId
* @return
*/
@Select("select r.* from sys_role_user ru inner join sys_role r on r.id = ru.role_id where ru.user_id = #{userId}")
List<SysRole> findRolesByUserId(Long userId);
List<SysRole> findRolesByUserId(@Param("userId") Long userId);
/**
* 根据用户ids 获取