From 2ae643ab833e6cc6de04e5703eae65bd1bf466de Mon Sep 17 00:00:00 2001 From: matevip <7333791@qq.com> Date: Tue, 20 Oct 2020 06:19:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?uaa=E6=A8=A1=E5=9D=97=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3=E5=92=8C=E8=A7=A3=E5=86=B3=E5=BE=AA=E7=8E=AF?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MateAuthenticationSuccessHandler.java | 2 - .../vip/mate/uaa/config/SecurityConfig.java | 127 +++++----- .../mate/uaa/controller/AuthController.java | 3 +- .../uaa/sms/SmsCodeAuthenticationFilter.java | 90 +++---- .../sms/SmsCodeAuthenticationProvider.java | 43 ++-- .../SmsCodeAuthenticationSecurityConfig.java | 12 - .../uaa/sms/SmsCodeAuthenticationToken.java | 83 +++---- .../social/SocialAuthenticationFilter.java | 229 +++++++++--------- .../social/SocialAuthenticationProvider.java | 43 ++-- .../SocialAuthenticationSecurityConfig.java | 44 ++-- .../uaa/social/SocialAuthenticationToken.java | 92 +++---- .../MateWebRespExceptionTranslator.java | 86 +++---- 12 files changed, 435 insertions(+), 419 deletions(-) diff --git a/mate-core/mate-starter-security/src/main/java/vip/mate/core/security/handle/MateAuthenticationSuccessHandler.java b/mate-core/mate-starter-security/src/main/java/vip/mate/core/security/handle/MateAuthenticationSuccessHandler.java index 44e2e9a5..d47df30c 100644 --- a/mate-core/mate-starter-security/src/main/java/vip/mate/core/security/handle/MateAuthenticationSuccessHandler.java +++ b/mate-core/mate-starter-security/src/main/java/vip/mate/core/security/handle/MateAuthenticationSuccessHandler.java @@ -1,7 +1,6 @@ package vip.mate.core.security.handle; import com.fasterxml.jackson.databind.ObjectMapper; -import lombok.AllArgsConstructor; import lombok.NonNull; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -14,7 +13,6 @@ import org.springframework.security.oauth2.common.exceptions.UnapprovedClientAut import org.springframework.security.oauth2.provider.*; import org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices; import org.springframework.security.web.authentication.AuthenticationSuccessHandler; -import org.springframework.stereotype.Component; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/mate-uaa/src/main/java/vip/mate/uaa/config/SecurityConfig.java b/mate-uaa/src/main/java/vip/mate/uaa/config/SecurityConfig.java index 2d1e7544..19203e67 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/config/SecurityConfig.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/config/SecurityConfig.java @@ -37,6 +37,8 @@ import vip.mate.uaa.service.impl.UserDetailsServiceImpl; import vip.mate.uaa.sms.SmsCodeAuthenticationSecurityConfig; import vip.mate.uaa.social.SocialAuthenticationSecurityConfig; +import javax.annotation.Resource; + /** * 安全配置中心 * @@ -46,76 +48,77 @@ import vip.mate.uaa.social.SocialAuthenticationSecurityConfig; @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { - @Autowired - private IgnoreUrlPropsConfig ignoreUrlPropsConfig; + @Autowired + private IgnoreUrlPropsConfig ignoreUrlPropsConfig; - @Bean - public PasswordEncoder passwordEncoder() { - return PasswordEncoderFactories.createDelegatingPasswordEncoder(); - } + @Bean + public PasswordEncoder passwordEncoder() { + return PasswordEncoderFactories.createDelegatingPasswordEncoder(); + } - @Autowired - private SmsCodeAuthenticationSecurityConfig smsCodeAuthenticationSecurityConfig; + @Resource + private SmsCodeAuthenticationSecurityConfig smsCodeAuthenticationSecurityConfig; - @Autowired - private SocialAuthenticationSecurityConfig socialAuthenticationSecurityConfig; + @Resource + private SocialAuthenticationSecurityConfig socialAuthenticationSecurityConfig; - /** - * 必须要定义,否则不支持grant_type=password模式 - * @return - */ - @Bean - @Override - @SneakyThrows - public AuthenticationManager authenticationManagerBean() { - return super.authenticationManagerBean(); - } + /** + * 必须要定义,否则不支持grant_type=password模式 + * + * @return AuthenticationManager + */ + @Bean + @Override + @SneakyThrows + public AuthenticationManager authenticationManagerBean() { + return super.authenticationManagerBean(); + } - @Bean - public AuthenticationSuccessHandler mateAuthenticationSuccessHandler() { - return new MateAuthenticationSuccessHandler(); - } + @Bean + public AuthenticationSuccessHandler mateAuthenticationSuccessHandler() { + return new MateAuthenticationSuccessHandler(); + } - @Bean - public AuthenticationFailureHandler mateAuthenticationFailureHandler() { - return new MateAuthenticationFailureHandler(); - } + @Bean + public AuthenticationFailureHandler mateAuthenticationFailureHandler() { + return new MateAuthenticationFailureHandler(); + } - @Override - @Bean - public UserDetailsService userDetailsService() { - return new UserDetailsServiceImpl(); - } + @Override + @Bean + public UserDetailsService userDetailsService() { + return new UserDetailsServiceImpl(); + } - @Override - protected void configure(HttpSecurity http) throws Exception { - ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry config - = http.requestMatchers().anyRequest() - .and() - .apply(smsCodeAuthenticationSecurityConfig) - .and() - .apply(socialAuthenticationSecurityConfig) - .and() - .authorizeRequests(); - ignoreUrlPropsConfig.getUrls().forEach(e -> { - config.antMatchers(e).permitAll(); - }); - config - .antMatchers("/auth/**").permitAll() - .antMatchers("/oauth/**").permitAll() - .antMatchers("/actuator/**").permitAll() - .antMatchers("/v2/api-docs").permitAll() - .antMatchers("/v2/api-docs-ext").permitAll() - .anyRequest().authenticated() - .and() - .csrf().disable(); - } + @Override + protected void configure(HttpSecurity http) throws Exception { + ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry config + = http.requestMatchers().anyRequest() + .and() + .apply(smsCodeAuthenticationSecurityConfig) + .and() + .apply(socialAuthenticationSecurityConfig) + .and() + .authorizeRequests(); + ignoreUrlPropsConfig.getUrls().forEach(e -> { + config.antMatchers(e).permitAll(); + }); + config + .antMatchers("/auth/**").permitAll() + .antMatchers("/oauth/**").permitAll() + .antMatchers("/actuator/**").permitAll() + .antMatchers("/v2/api-docs").permitAll() + .antMatchers("/v2/api-docs-ext").permitAll() + .anyRequest().authenticated() + .and() + .csrf().disable(); + } - @Override - protected void configure(AuthenticationManagerBuilder auth) throws Exception { - auth. - userDetailsService(userDetailsService()) - .passwordEncoder(passwordEncoder()); - } + @Override + protected void configure(AuthenticationManagerBuilder auth) throws Exception { + auth. + userDetailsService(userDetailsService()) + .passwordEncoder(passwordEncoder()); + } } diff --git a/mate-uaa/src/main/java/vip/mate/uaa/controller/AuthController.java b/mate-uaa/src/main/java/vip/mate/uaa/controller/AuthController.java index 211f3076..ded7a8a4 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/controller/AuthController.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/controller/AuthController.java @@ -137,7 +137,7 @@ public class AuthController { * * @param oauthType 第三方登录类型 * @param response response - * @throws IOException + * @throws IOException IO异常 */ @Log(value = "第三方登录", exception = "第三方登录请求异常") @ApiOperation(value = "第三方登录", notes = "第三方登录") @@ -152,7 +152,6 @@ public class AuthController { * * @param oauthType 第三方登录类型 * @param callback 携带返回的信息 - * @return 登录成功后的信息 */ @Log(value = "第三方登录回调", exception = "第三方登录回调请求异常") @ApiOperation(value = "第三方登录回调", notes = "第三方登录回调") diff --git a/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationFilter.java b/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationFilter.java index 0a57f46e..fa5aa432 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationFilter.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationFilter.java @@ -12,62 +12,68 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Objects; +/** + * 短信验证码验证过滤器 + * + * @author pangu + */ public class SmsCodeAuthenticationFilter extends AbstractAuthenticationProcessingFilter { - /** - * 请求中的参数 - */ - private String mobileParameter = Oauth2Constant.DEFAULT_PARAMETER_NAME_MOBILE; + /** + * 请求中的参数 + */ + private String mobileParameter = Oauth2Constant.DEFAULT_PARAMETER_NAME_MOBILE; - private boolean postOnly = true; + private boolean postOnly = true; - public SmsCodeAuthenticationFilter() { - super(new AntPathRequestMatcher(Oauth2Constant.OAUTH_MOBILE, "POST")); - } + public SmsCodeAuthenticationFilter() { + super(new AntPathRequestMatcher(Oauth2Constant.OAUTH_MOBILE, "POST")); + } - public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { - if (postOnly && !request.getMethod().equals("POST")) { - throw new AuthenticationServiceException("Authentication method not supported: " + request.getMethod()); - } + @Override + public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { + if (postOnly && !request.getMethod().equals("POST")) { + throw new AuthenticationServiceException("Authentication method not supported: " + request.getMethod()); + } - // 获取请求中的参数值 - String mobile = obtainMobile(request); + // 获取请求中的参数值 + String mobile = obtainMobile(request); - if (Objects.isNull(mobile)) { - mobile = ""; - } + if (Objects.isNull(mobile)) { + mobile = ""; + } - mobile = mobile.trim(); + mobile = mobile.trim(); - SmsCodeAuthenticationToken authRequest = new SmsCodeAuthenticationToken(mobile); + SmsCodeAuthenticationToken authRequest = new SmsCodeAuthenticationToken(mobile); - // Allow subclasses to set the "details" property - setDetails(request, authRequest); + // Allow subclasses to set the "details" property + setDetails(request, authRequest); - return this.getAuthenticationManager().authenticate(authRequest); - } + return this.getAuthenticationManager().authenticate(authRequest); + } - /** - * 获取手机号 - */ - protected String obtainMobile(HttpServletRequest request) { - return request.getParameter(mobileParameter); - } + /** + * 获取手机号 + */ + protected String obtainMobile(HttpServletRequest request) { + return request.getParameter(mobileParameter); + } - protected void setDetails(HttpServletRequest request, SmsCodeAuthenticationToken authRequest) { - authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); - } + protected void setDetails(HttpServletRequest request, SmsCodeAuthenticationToken authRequest) { + authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); + } - public void setMobileParameter(String mobileParameter) { - Assert.hasText(mobileParameter, "Mobile parameter must not be empty or null"); - this.mobileParameter = mobileParameter; - } + public void setMobileParameter(String mobileParameter) { + Assert.hasText(mobileParameter, "Mobile parameter must not be empty or null"); + this.mobileParameter = mobileParameter; + } - public void setPostOnly(boolean postOnly) { - this.postOnly = postOnly; - } + public void setPostOnly(boolean postOnly) { + this.postOnly = postOnly; + } - public final String getMobileParameter() { - return mobileParameter; - } + public final String getMobileParameter() { + return mobileParameter; + } } diff --git a/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationProvider.java b/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationProvider.java index 55c131bf..b3610370 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationProvider.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationProvider.java @@ -11,34 +11,39 @@ import vip.mate.core.security.userdetails.MateUserDetailsService; import java.util.Objects; +/** + * 短信验证码验证提供者 + * + * @author pangu + */ @AllArgsConstructor public class SmsCodeAuthenticationProvider implements AuthenticationProvider { - private final MateUserDetailsService userDetailsService; + private final MateUserDetailsService userDetailsService; - @Override - public Authentication authenticate(Authentication authentication) throws AuthenticationException { - SmsCodeAuthenticationToken authenticationToken = (SmsCodeAuthenticationToken) authentication; + @Override + public Authentication authenticate(Authentication authentication) throws AuthenticationException { + SmsCodeAuthenticationToken authenticationToken = (SmsCodeAuthenticationToken) authentication; - /** - * 调用 {@link UserDetailsService} - */ - UserDetails user = userDetailsService.loadUserByMobile((String)authenticationToken.getPrincipal()); + /** + * 调用 {@link UserDetailsService} + */ + UserDetails user = userDetailsService.loadUserByMobile((String) authenticationToken.getPrincipal()); - if (Objects.isNull(user)) { - throw new InternalAuthenticationServiceException("手机号或验证码错误"); - } + if (Objects.isNull(user)) { + throw new InternalAuthenticationServiceException("手机号或验证码错误"); + } - SmsCodeAuthenticationToken authenticationResult = new SmsCodeAuthenticationToken(user, user.getAuthorities()); + SmsCodeAuthenticationToken authenticationResult = new SmsCodeAuthenticationToken(user, user.getAuthorities()); - authenticationResult.setDetails(authenticationToken.getDetails()); + authenticationResult.setDetails(authenticationToken.getDetails()); - return authenticationResult; + return authenticationResult; - } + } - @Override - public boolean supports(Class authentication) { - return SmsCodeAuthenticationToken.class.isAssignableFrom(authentication); - } + @Override + public boolean supports(Class authentication) { + return SmsCodeAuthenticationToken.class.isAssignableFrom(authentication); + } } diff --git a/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationSecurityConfig.java b/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationSecurityConfig.java index c7971574..833a7d91 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationSecurityConfig.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationSecurityConfig.java @@ -21,26 +21,14 @@ public class SmsCodeAuthenticationSecurityConfig extends SecurityConfigurerAdapter { @Autowired - @SuppressWarnings("all") private MateUserDetailsService userDetailsService; - @Autowired - @SuppressWarnings("all") - public AuthenticationSuccessHandler mateAuthenticationSuccessHandler; - - @Autowired - @SuppressWarnings("all") - public AuthenticationFailureHandler mateAuthenticationFailureHandler; - @Override public void configure(HttpSecurity http) { // 过滤器 SmsCodeAuthenticationFilter smsCodeAuthenticationFilter = new SmsCodeAuthenticationFilter(); smsCodeAuthenticationFilter.setAuthenticationManager(http.getSharedObject(AuthenticationManager.class)); - smsCodeAuthenticationFilter.setAuthenticationSuccessHandler(mateAuthenticationSuccessHandler); - smsCodeAuthenticationFilter.setAuthenticationFailureHandler(mateAuthenticationFailureHandler); - // 获取验证码提供者 SmsCodeAuthenticationProvider smsCodeAuthenticationProvider = new SmsCodeAuthenticationProvider(userDetailsService); diff --git a/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationToken.java b/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationToken.java index 9f88d997..201f8558 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationToken.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/sms/SmsCodeAuthenticationToken.java @@ -8,50 +8,51 @@ import java.util.Collection; /** * 手机号+验证码登录令牌获取 + * * @author pangu * @since 2020-7-21 */ public class SmsCodeAuthenticationToken extends AbstractAuthenticationToken { - private static final long serialVersionUID = -3629824093049247125L; - - private final Object principal; - - public SmsCodeAuthenticationToken(String mobile) { - super(null); - this.principal = mobile; - setAuthenticated(false); - } - - public SmsCodeAuthenticationToken(Object principal, Collection authorities) { - super(authorities); - this.principal = principal; - super.setAuthenticated(true); - } - - @Override - public Object getCredentials() { - return this.principal; - } - - @Override - public Object getPrincipal() { - return this.principal; - } - - @Override - @SneakyThrows - public void setAuthenticated(boolean isAuthenticated) { - if (isAuthenticated) { - throw new IllegalArgumentException( - "Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead"); - } - - super.setAuthenticated(false); - } - - @Override - public void eraseCredentials() { - super.eraseCredentials(); - } + private static final long serialVersionUID = -3629824093049247125L; + + private final Object principal; + + public SmsCodeAuthenticationToken(String mobile) { + super(null); + this.principal = mobile; + setAuthenticated(false); + } + + public SmsCodeAuthenticationToken(Object principal, Collection authorities) { + super(authorities); + this.principal = principal; + super.setAuthenticated(true); + } + + @Override + public Object getCredentials() { + return this.principal; + } + + @Override + public Object getPrincipal() { + return this.principal; + } + + @Override + @SneakyThrows + public void setAuthenticated(boolean isAuthenticated) { + if (isAuthenticated) { + throw new IllegalArgumentException( + "Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead"); + } + + super.setAuthenticated(false); + } + + @Override + public void eraseCredentials() { + super.eraseCredentials(); + } } diff --git a/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationFilter.java b/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationFilter.java index 7f63fc19..b5e1de44 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationFilter.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationFilter.java @@ -19,120 +19,125 @@ import vip.mate.core.common.constant.Oauth2Constant; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +/** + * 社交登录验证过滤器 + * + * @author pangu + */ @Slf4j public class SocialAuthenticationFilter extends AbstractAuthenticationProcessingFilter { - public static String SOCIAL_LOGIN_URL = "/auth1/callback/**"; - - /** - * 请求中的参数 - */ - private String socialParameter = Oauth2Constant.DEFAULT_PARAMETER_NAME_SOCIAL; - - private AuthRequestFactory authRequestFactory; - - private boolean postOnly = false; - - /** - * 通过构造函数指定该 Filter 要拦截的 url 和 httpMethod - */ - protected SocialAuthenticationFilter() { - super(new AntPathRequestMatcher(SOCIAL_LOGIN_URL, null)); - } - - @Override - public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { - if (postOnly && !request.getMethod().equals("POST")) { - throw new AuthenticationServiceException("Authentication method not supported: " + request.getMethod()); - } - SocialAuthenticationToken token; - - token = new SocialAuthenticationToken(obtainAuthUser(request)); - this.setDetails(request, token); - - // 3. 返回 authenticated 方法的返回值 - return this.getAuthenticationManager().authenticate(token); - } - - /** - * 获取手机号 - */ - protected String obtainSocial(HttpServletRequest request) { - return request.getParameter(socialParameter); - } - - protected void setDetails(HttpServletRequest request, SocialAuthenticationToken authRequest) { - authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); - } - - public void setSocialParameter(String socialParameter) { - Assert.hasText(socialParameter, "Social parameter must not be empty or null"); - this.socialParameter = socialParameter; - } - - public void setPostOnly(boolean postOnly) { - this.postOnly = postOnly; - } - - public final String getSocialParameter() { - return socialParameter; - } - - /** - * 获取 justauth 登录后的用户信息 - */ - protected AuthUser obtainAuthUser(HttpServletRequest request) { - String type = getCallbackType(request); - AuthRequest authRequest = authRequestFactory.get(type); - - // 登录后,从第三方拿到用户信息 - AuthResponse response = authRequest.login(getCallback(request)); - log.info("【justauth 第三方登录 response】= {}", JSON.toJSON(response)); - // 第三方登录成功 - if (response.getCode() == AuthResponseStatus.SUCCESS.getCode()) { - AuthUser authUser = (AuthUser) response.getData(); - return authUser; - } - return null; - } - - /** - * 从请求中构建 AuthCallback - */ - private AuthCallback getCallback(HttpServletRequest request) { - - AuthCallback authCallback = AuthCallback.builder() - .code(request.getParameter("code")) - .auth_code(request.getParameter("auth_code")) - .authorization_code(request.getParameter("authorization_code")) - .oauth_token(request.getParameter("oauth_token")) - .state(request.getParameter("state")) - .oauth_verifier(request.getParameter("oauth_verifier")) - .build(); - - return authCallback; - } - - - /** - * 获取路径参数:回调类型 - */ - private String getCallbackType(HttpServletRequest request) { - // /context/open/oauth/callback/gitee - String uri = request.getRequestURI(); - // "/open/oauth/callback/".length() - int common = SOCIAL_LOGIN_URL.length() - 2; - int start = uri.indexOf(SOCIAL_LOGIN_URL.substring(0, common)); - if (start == -1) { - log.warn("【justauth 第三方登录 response】回调类型为空,uri={}", uri); - return null; - } - // gitee - return uri.substring(start + common); - } - - public void setAuthRequestFactory(AuthRequestFactory authRequestFactory) { - this.authRequestFactory = authRequestFactory; - } + public static String SOCIAL_LOGIN_URL = "/auth1/callback/**"; + + /** + * 请求中的参数 + */ + private String socialParameter = Oauth2Constant.DEFAULT_PARAMETER_NAME_SOCIAL; + + private AuthRequestFactory authRequestFactory; + + private boolean postOnly = false; + + /** + * 通过构造函数指定该 Filter 要拦截的 url 和 httpMethod + */ + protected SocialAuthenticationFilter() { + super(new AntPathRequestMatcher(SOCIAL_LOGIN_URL, null)); + } + + @Override + public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { + if (postOnly && !request.getMethod().equals("POST")) { + throw new AuthenticationServiceException("Authentication method not supported: " + request.getMethod()); + } + SocialAuthenticationToken token; + + token = new SocialAuthenticationToken(obtainAuthUser(request)); + this.setDetails(request, token); + + // 3. 返回 authenticated 方法的返回值 + return this.getAuthenticationManager().authenticate(token); + } + + /** + * 获取手机号 + */ + protected String obtainSocial(HttpServletRequest request) { + return request.getParameter(socialParameter); + } + + protected void setDetails(HttpServletRequest request, SocialAuthenticationToken authRequest) { + authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); + } + + public void setSocialParameter(String socialParameter) { + Assert.hasText(socialParameter, "Social parameter must not be empty or null"); + this.socialParameter = socialParameter; + } + + public void setPostOnly(boolean postOnly) { + this.postOnly = postOnly; + } + + public final String getSocialParameter() { + return socialParameter; + } + + /** + * 获取 justauth 登录后的用户信息 + */ + protected AuthUser obtainAuthUser(HttpServletRequest request) { + String type = getCallbackType(request); + AuthRequest authRequest = authRequestFactory.get(type); + + // 登录后,从第三方拿到用户信息 + AuthResponse response = authRequest.login(getCallback(request)); + log.info("【justauth 第三方登录 response】= {}", JSON.toJSON(response)); + // 第三方登录成功 + if (response.getCode() == AuthResponseStatus.SUCCESS.getCode()) { + AuthUser authUser = (AuthUser) response.getData(); + return authUser; + } + return null; + } + + /** + * 从请求中构建 AuthCallback + */ + private AuthCallback getCallback(HttpServletRequest request) { + + AuthCallback authCallback = AuthCallback.builder() + .code(request.getParameter("code")) + .auth_code(request.getParameter("auth_code")) + .authorization_code(request.getParameter("authorization_code")) + .oauth_token(request.getParameter("oauth_token")) + .state(request.getParameter("state")) + .oauth_verifier(request.getParameter("oauth_verifier")) + .build(); + + return authCallback; + } + + + /** + * 获取路径参数:回调类型 + */ + private String getCallbackType(HttpServletRequest request) { + // /context/open/oauth/callback/gitee + String uri = request.getRequestURI(); + // "/open/oauth/callback/".length() + int common = SOCIAL_LOGIN_URL.length() - 2; + int start = uri.indexOf(SOCIAL_LOGIN_URL.substring(0, common)); + if (start == -1) { + log.warn("【justauth 第三方登录 response】回调类型为空,uri={}", uri); + return null; + } + // gitee + return uri.substring(start + common); + } + + public void setAuthRequestFactory(AuthRequestFactory authRequestFactory) { + this.authRequestFactory = authRequestFactory; + } } diff --git a/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationProvider.java b/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationProvider.java index 6ed0203d..8810a927 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationProvider.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationProvider.java @@ -12,35 +12,40 @@ import vip.mate.core.security.userdetails.MateUserDetailsService; import java.util.Objects; +/** + * 社交登录验证提供者 + * + * @author pangu + */ @AllArgsConstructor public class SocialAuthenticationProvider implements AuthenticationProvider { - private final MateUserDetailsService userDetailsService; + private final MateUserDetailsService userDetailsService; - @Override - public Authentication authenticate(Authentication authentication) throws AuthenticationException { - SocialAuthenticationToken authenticationToken = (SocialAuthenticationToken) authentication; + @Override + public Authentication authenticate(Authentication authentication) throws AuthenticationException { + SocialAuthenticationToken authenticationToken = (SocialAuthenticationToken) authentication; - /** - * 调用 {@link UserDetailsService} - */ - UserDetails user = userDetailsService.loadUserBySocial(((AuthUser)authenticationToken.getPrincipal()).getUsername()); + /** + * 调用 {@link UserDetailsService} + */ + UserDetails user = userDetailsService.loadUserBySocial(((AuthUser) authenticationToken.getPrincipal()).getUsername()); - if (Objects.isNull(user)) { - throw new InternalAuthenticationServiceException("社交登录错误"); - } + if (Objects.isNull(user)) { + throw new InternalAuthenticationServiceException("社交登录错误"); + } - SocialAuthenticationToken authenticationResult = new SocialAuthenticationToken(user, user.getAuthorities()); + SocialAuthenticationToken authenticationResult = new SocialAuthenticationToken(user, user.getAuthorities()); - authenticationResult.setDetails(authenticationToken.getDetails()); + authenticationResult.setDetails(authenticationToken.getDetails()); - return authenticationResult; + return authenticationResult; - } + } - @Override - public boolean supports(Class authentication) { - return SocialAuthenticationToken.class.isAssignableFrom(authentication); - } + @Override + public boolean supports(Class authentication) { + return SocialAuthenticationToken.class.isAssignableFrom(authentication); + } } diff --git a/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationSecurityConfig.java b/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationSecurityConfig.java index 014047b0..b0d53465 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationSecurityConfig.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationSecurityConfig.java @@ -12,37 +12,35 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic import org.springframework.stereotype.Component; import vip.mate.core.security.userdetails.MateUserDetailsService; +/** + * 社交登录配置 + * + * @author pangu + */ @Slf4j @Component public class SocialAuthenticationSecurityConfig extends SecurityConfigurerAdapter { - @Autowired - @SuppressWarnings("all") - private MateUserDetailsService userDetailsService; + @Autowired + private MateUserDetailsService userDetailsService; - @Autowired - @SuppressWarnings("all") - public AuthenticationSuccessHandler smsCodeSuccessHandler; + @Autowired + private AuthRequestFactory authRequestFactory; - @Autowired - @SuppressWarnings("all") - private AuthRequestFactory authRequestFactory; + @Override + public void configure(HttpSecurity http) { - @Override - public void configure(HttpSecurity http) { + // 过滤器 + SocialAuthenticationFilter socialAuthenticationFilter = new SocialAuthenticationFilter(); + socialAuthenticationFilter.setAuthenticationManager(http.getSharedObject(AuthenticationManager.class)); + socialAuthenticationFilter.setAuthRequestFactory(authRequestFactory); - // 过滤器 - SocialAuthenticationFilter socialAuthenticationFilter = new SocialAuthenticationFilter(); - socialAuthenticationFilter.setAuthenticationManager(http.getSharedObject(AuthenticationManager.class)); - socialAuthenticationFilter.setAuthenticationSuccessHandler(smsCodeSuccessHandler); - socialAuthenticationFilter.setAuthRequestFactory(authRequestFactory); + // 获取社交登录提供者 + SocialAuthenticationProvider socialAuthenticationProvider = new SocialAuthenticationProvider(userDetailsService); - // 获取社交登录提供者 - SocialAuthenticationProvider socialAuthenticationProvider = new SocialAuthenticationProvider(userDetailsService); - - // 将社交登录校验器注册到 HttpSecurity, 并将社交登录过滤器添加在 UsernamePasswordAuthenticationFilter 之前 - http.authenticationProvider(socialAuthenticationProvider) - .addFilterBefore(socialAuthenticationFilter, UsernamePasswordAuthenticationFilter.class); - } + // 将社交登录校验器注册到 HttpSecurity, 并将社交登录过滤器添加在 UsernamePasswordAuthenticationFilter 之前 + http.authenticationProvider(socialAuthenticationProvider) + .addFilterBefore(socialAuthenticationFilter, UsernamePasswordAuthenticationFilter.class); + } } diff --git a/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationToken.java b/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationToken.java index df170156..968dab4c 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationToken.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/social/SocialAuthenticationToken.java @@ -6,59 +6,65 @@ import org.springframework.security.core.GrantedAuthority; import java.util.Collection; +/** + * 社交验证token生成 + * + * @author pangu + */ public class SocialAuthenticationToken extends AbstractAuthenticationToken { - private static final long serialVersionUID = -3629824093049247125L; + private static final long serialVersionUID = -3629824093049247125L; - // ~ Instance fields - // ================================================================================================ + // ~ Instance fields + // ================================================================================================ - private final Object principal; - private Object credentials; + private final Object principal; + private Object credentials; - // ~ Constructors - // =================================================================================================== - /** - * justauth 使用 - */ - public SocialAuthenticationToken(Object authUser) { - super(null); - this.principal = authUser; - setAuthenticated(false); - } + // ~ Constructors + // =================================================================================================== - public SocialAuthenticationToken(Object principal, Collection authorities) { - super(authorities); - this.principal = principal; - super.setAuthenticated(true); - } + /** + * justauth 使用 + */ + public SocialAuthenticationToken(Object authUser) { + super(null); + this.principal = authUser; + setAuthenticated(false); + } - // ~ Methods - // ======================================================================================================== + public SocialAuthenticationToken(Object principal, Collection authorities) { + super(authorities); + this.principal = principal; + super.setAuthenticated(true); + } + // ~ Methods + // ======================================================================================================== - @Override - public Object getCredentials() { - return this.principal; - } - @Override - public Object getPrincipal() { - return this.principal; - } + @Override + public Object getCredentials() { + return this.principal; + } - @Override - @SneakyThrows - public void setAuthenticated(boolean isAuthenticated) { - if (isAuthenticated) { - throw new IllegalArgumentException( - "Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead"); - } + @Override + public Object getPrincipal() { + return this.principal; + } - super.setAuthenticated(false); - } + @Override + @SneakyThrows + public void setAuthenticated(boolean isAuthenticated) { + if (isAuthenticated) { + throw new IllegalArgumentException( + "Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead"); + } - @Override - public void eraseCredentials() { - super.eraseCredentials(); - } + super.setAuthenticated(false); + } + + @Override + public void eraseCredentials() { + super.eraseCredentials(); + } } diff --git a/mate-uaa/src/main/java/vip/mate/uaa/translator/MateWebRespExceptionTranslator.java b/mate-uaa/src/main/java/vip/mate/uaa/translator/MateWebRespExceptionTranslator.java index 7e729430..8f7cd4f9 100644 --- a/mate-uaa/src/main/java/vip/mate/uaa/translator/MateWebRespExceptionTranslator.java +++ b/mate-uaa/src/main/java/vip/mate/uaa/translator/MateWebRespExceptionTranslator.java @@ -10,53 +10,55 @@ import vip.mate.core.common.api.Result; import vip.mate.core.common.api.ResultCode; /** + * WEB响应异常处理类 + * * @author pangu */ @Slf4j public class MateWebRespExceptionTranslator implements WebResponseExceptionTranslator { - @Override - public ResponseEntity> translate(Exception e) throws Exception { - ResponseEntity.BodyBuilder status = ResponseEntity.status(HttpStatus.UNAUTHORIZED); - String message = "认证失败"; - - log.error(message, e); - if (e instanceof UnsupportedGrantTypeException) { - message = "不支持该认证类型"; - return status.body(apiResult(message)); - } - if (e instanceof InvalidTokenException - && StringUtils.containsIgnoreCase(e.getMessage(), "Invalid refresh token (expired)")) { - message = "刷新令牌已过期,请重新登录"; - return status.body(apiResult(message)); - } - if (e instanceof InvalidScopeException) { - message = "不是有效的scope值"; - return status.body(apiResult(message)); - } - if (e instanceof InvalidGrantException) { - if (StringUtils.containsIgnoreCase(e.getMessage(), "Invalid refresh token")) { - message = "refresh token无效"; - return status.body(apiResult(message)); - } - if (StringUtils.containsIgnoreCase(e.getMessage(), "Invalid authorization code")) { - message = "authorization code无效"; - return status.body(apiResult(message)); - } - if (StringUtils.containsIgnoreCase(e.getMessage(), "locked")) { - message = "用户已被锁定,请联系管理员"; - return status.body(apiResult(message)); - } - message = "用户名或密码错误"; - return status.body(apiResult(message)); - } - - return status.body(apiResult(message)); - } - - private Result apiResult (String message){ - return Result.data(ResultCode.ERROR, message); - } + @Override + public ResponseEntity> translate(Exception e) throws Exception { + ResponseEntity.BodyBuilder status = ResponseEntity.status(HttpStatus.UNAUTHORIZED); + String message = "认证失败"; + + log.error(message, e); + if (e instanceof UnsupportedGrantTypeException) { + message = "不支持该认证类型"; + return status.body(apiResult(message)); + } + if (e instanceof InvalidTokenException + && StringUtils.containsIgnoreCase(e.getMessage(), "Invalid refresh token (expired)")) { + message = "刷新令牌已过期,请重新登录"; + return status.body(apiResult(message)); + } + if (e instanceof InvalidScopeException) { + message = "不是有效的scope值"; + return status.body(apiResult(message)); + } + if (e instanceof InvalidGrantException) { + if (StringUtils.containsIgnoreCase(e.getMessage(), "Invalid refresh token")) { + message = "refresh token无效"; + return status.body(apiResult(message)); + } + if (StringUtils.containsIgnoreCase(e.getMessage(), "Invalid authorization code")) { + message = "authorization code无效"; + return status.body(apiResult(message)); + } + if (StringUtils.containsIgnoreCase(e.getMessage(), "locked")) { + message = "用户已被锁定,请联系管理员"; + return status.body(apiResult(message)); + } + message = "用户名或密码错误"; + return status.body(apiResult(message)); + } + + return status.body(apiResult(message)); + } + + private Result apiResult(String message) { + return Result.data(ResultCode.ERROR, message); + } } -- Gitee From 9e1923b5ad7e15738a674d3eed0b4aa242f0ef39 Mon Sep 17 00:00:00 2001 From: matevip <7333791@qq.com> Date: Tue, 20 Oct 2020 06:42:32 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BC=94=E7=A4=BA?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E8=AE=B0=E5=BD=95=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=9A=84=E5=BC=82=E5=B8=B8save->set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/vip/mate/system/aspect/PreviewAspect.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mate-platform/mate-system/src/main/java/vip/mate/system/aspect/PreviewAspect.java b/mate-platform/mate-system/src/main/java/vip/mate/system/aspect/PreviewAspect.java index e32a5632..41aa34d1 100644 --- a/mate-platform/mate-system/src/main/java/vip/mate/system/aspect/PreviewAspect.java +++ b/mate-platform/mate-system/src/main/java/vip/mate/system/aspect/PreviewAspect.java @@ -8,6 +8,7 @@ import org.aspectj.lang.annotation.Aspect; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpMethod; import org.springframework.stereotype.Component; +import org.springframework.util.AntPathMatcher; import vip.mate.core.common.exception.PreviewException; import vip.mate.core.common.util.RequestHolder; import vip.mate.core.common.util.TraceUtil; @@ -24,7 +25,9 @@ import javax.servlet.http.HttpServletRequest; public class PreviewAspect { @Value("${mate.preview.enable}") - private boolean isPreview = false; + private final boolean isPreview = false; + + private final AntPathMatcher antPathMatcher = new AntPathMatcher(); @Around( "execution(static vip.mate.core.common.api.Result *(..)) || " + @@ -35,7 +38,7 @@ public class PreviewAspect { // 获取request HttpServletRequest request = RequestHolder.getHttpServletRequest(); if (StringUtils.equalsIgnoreCase(request.getMethod(), HttpMethod.POST.name()) && isPreview - && !(StringUtils.equalsIgnoreCase(request.getRequestURI(), "/provider/log/save"))) { + && !(antPathMatcher.match(request.getRequestURI(), "/provider/log/set"))) { log.error("演示环境不能操作!"); throw new PreviewException("演示环境不能操作!"); } -- Gitee From af2ae825684bc851b50381f67e70f81e1b0f450e Mon Sep 17 00:00:00 2001 From: matevip <7333791@qq.com> Date: Tue, 20 Oct 2020 06:52:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0sql=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=BE=AE=E6=9C=8D=E5=8A=A1=E5=92=8Capi=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/sql/matex_schema.sql | 273 +++++++++++++++++++++------------------ 1 file changed, 147 insertions(+), 126 deletions(-) diff --git a/doc/sql/matex_schema.sql b/doc/sql/matex_schema.sql index 779dcb03..57eca76c 100644 --- a/doc/sql/matex_schema.sql +++ b/doc/sql/matex_schema.sql @@ -324,72 +324,84 @@ CREATE TABLE `mate_sys_role_permission` ( -- Records of mate_sys_role_permission -- ---------------------------- BEGIN; -INSERT INTO `mate_sys_role_permission` VALUES (977, 1000, 2); -INSERT INTO `mate_sys_role_permission` VALUES (978, 1300, 2); -INSERT INTO `mate_sys_role_permission` VALUES (979, 1301, 2); -INSERT INTO `mate_sys_role_permission` VALUES (980, 1302, 2); -INSERT INTO `mate_sys_role_permission` VALUES (981, 1303, 2); -INSERT INTO `mate_sys_role_permission` VALUES (982, 2009, 2); -INSERT INTO `mate_sys_role_permission` VALUES (2163, 1000, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2164, 2035, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2165, 2036, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2166, 2037, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2167, 2038, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2168, 2026, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2169, 2027, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2170, 2028, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2171, 2029, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2172, 2030, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2173, 2031, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2174, 2039, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2175, 2042, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2176, 1300, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2177, 1301, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2178, 1302, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2179, 1303, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2180, 1304, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2181, 1305, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2182, 1306, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2183, 1100, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2184, 1101, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2185, 1102, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2186, 1103, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2187, 1104, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2188, 1105, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2189, 1106, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2190, 1200, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2191, 1201, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2192, 1202, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2193, 1203, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2194, 1204, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2195, 1205, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2196, 1400, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2197, 1401, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2198, 1402, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2199, 1403, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2200, 1404, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2201, 2032, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2202, 2033, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2203, 2034, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2204, 2015, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2205, 2021, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2206, 2022, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2207, 2023, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2208, 2016, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2209, 2018, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2210, 2020, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2211, 2019, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2212, 2017, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2213, 2045, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2214, 2047, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2215, 2048, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2216, 2049, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2217, 2050, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2218, 2051, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2219, 2040, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2220, 2041, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2221, 2043, 1); -INSERT INTO `mate_sys_role_permission` VALUES (2222, 2044, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (2292, 1000, 2); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (2293, 2035, 2); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (2294, 2036, 2); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (2295, 2037, 2); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (2296, 2038, 2); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (2297, 1300, 2); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (2298, 1301, 2); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (2299, 1303, 2); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (2300, 1302, 2); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3078, 1000, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3079, 2026, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3080, 2027, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3081, 2028, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3082, 2029, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3083, 2030, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3084, 2031, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3085, 2035, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3086, 2036, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3087, 2037, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3088, 2038, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3089, 2039, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3090, 2042, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3091, 1200, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3092, 1205, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3093, 1204, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3094, 1203, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3095, 1202, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3096, 1201, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3097, 1300, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3098, 1301, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3099, 1302, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3100, 1303, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3101, 1306, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3102, 1305, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3103, 1304, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3104, 1100, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3105, 1106, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3106, 1105, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3107, 1104, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3108, 1103, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3109, 1102, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3110, 1101, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3111, 1400, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3112, 1404, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3113, 1403, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3114, 1402, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3115, 1401, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3116, 2032, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3117, 2033, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3118, 2034, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3119, 2015, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3120, 2023, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3121, 2021, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3122, 2022, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3123, 2016, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3124, 2020, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3125, 2019, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3126, 2018, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3127, 2017, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3128, 2045, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3129, 2056, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3130, 2060, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3131, 2061, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3132, 2062, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3133, 2055, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3134, 2057, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3135, 2058, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3136, 2059, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3137, 2047, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3138, 2048, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3139, 2049, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3140, 2050, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3141, 2051, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3142, 2040, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3143, 2041, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3144, 2043, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3145, 2044, 1); +INSERT INTO `mate_sys_role_permission`(`id`, `menu_id`, `role_id`) VALUES (3146, 2053, 1); COMMIT; -- ---------------------------- @@ -488,66 +500,75 @@ CREATE TABLE `mate_sys_menu` ( -- Records of mate_sys_menu -- ---------------------------- BEGIN; -INSERT INTO `mate_sys_menu` VALUES (1000, '系统管理', NULL, '/system', -1, 'imac', 1, '0', '0', NULL, NULL, '2020-06-17 14:21:45', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1100, '用户管理', NULL, '/system/user', 1000, 'user', 1, '0', '1', NULL, NULL, '2020-06-18 14:28:36', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1101, '用户新增', 'sys:user:add', '', 1100, NULL, 1, '0', '2', NULL, NULL, '2020-06-17 14:32:51', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1102, '用户修改', 'sys:user:edit', NULL, 1100, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:27:40', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1103, '用户删除', 'sys:user:delete', NULL, 1100, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:27:56', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1104, '用户启用', 'sys:user:enable', NULL, 1100, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 08:49:47', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1105, '用户禁用', 'sys:user:disable', NULL, 1100, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 08:50:16', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1106, '用户导出', 'sys:user:export', NULL, 1100, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 08:50:58', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1200, '角色管理', NULL, '/system/role', 1000, 'repair', 1, '0', '1', NULL, NULL, '2020-06-19 16:36:01', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1201, '角色新增', 'sys:role:add', NULL, 1200, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:37:12', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1202, '角色修改', 'sys:role:edit', NULL, 1200, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:38:23', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1203, '角色删除', 'sys:role:delete', NULL, 1200, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:38:53', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1204, '角色导出', 'sys:role:export', NULL, 1200, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:02:37', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1205, '角色权限', 'sys:role:perm', NULL, 1200, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:03:32', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1300, '菜单管理', NULL, '/system/menu', 1000, 'tree', 1, '0', '1', NULL, NULL, '2020-06-19 16:39:07', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1301, '菜单新增', 'sys:menu:add', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:39:48', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1302, '菜单修改', 'sys:menu:edit', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:40:21', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1303, '菜单删除', 'sys:menu:delete', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:40:42', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1304, '菜单启用', 'sys:menu:enable', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:12:59', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1305, '菜单禁用', 'sys:menu:disable', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:13:34', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1306, '菜单导出', 'sys:menu:export', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:14:32', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1400, '部门管理', NULL, '/system/depart', 1000, 'table2', 1, '0', '1', NULL, NULL, '2020-06-26 22:52:41', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1401, '部门新增', 'sys:depart:add', NULL, 1400, NULL, 1, '0', '2', NULL, NULL, '2020-06-27 14:53:37', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1402, '部门修改', 'sys:depart:edit', NULL, 1400, NULL, 1, '0', '2', NULL, NULL, '2020-06-27 14:54:47', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1403, '部门删除', 'sys:depart:delete', NULL, 1400, NULL, 1, '0', '2', NULL, NULL, '2020-06-27 14:55:15', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (1404, '部门导出', 'sys:depart:export', NULL, 1400, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:27:26', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2015, '开发运维', NULL, '/devops', -1, 'settings', 2, '0', '0', NULL, NULL, '2020-07-05 03:20:31', '2020-09-08 04:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2016, '数据源管理', '', '/devops/datasource', 2015, 'table', 1, '0', '1', NULL, NULL, '2020-07-06 19:21:58', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2017, '数据源新增', 'sys:datasource:add', NULL, 2016, NULL, 1, '0', '2', NULL, NULL, '2020-07-07 04:08:11', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2018, '数据源修改', 'sys:datasource:edit', NULL, 2016, NULL, 1, '0', '2', NULL, NULL, '2020-07-07 04:08:40', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2019, '数据源删除', 'sys:datasource:delete', NULL, 2016, NULL, 1, '0', '2', NULL, NULL, '2020-07-07 04:09:05', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2020, '数据源导出', 'sys:datasource:export', NULL, 2016, NULL, 1, '0', '2', NULL, NULL, '2020-07-07 04:09:25', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2021, '代码生成', NULL, '/devops/generator', 2015, 'download', 1, '0', '1', NULL, NULL, '2020-07-09 07:08:50', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2022, '代码生成', 'devops:gen', NULL, 2021, NULL, 1, '0', '2', NULL, NULL, '2020-07-08 23:09:45', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2023, '监控配置中心', NULL, '/devops/monitor', 2015, 'validCode', 1, '0', '1', NULL, NULL, '2020-07-10 04:23:07', '2020-09-07 20:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2026, '客户端管理', NULL, '/system/client', 1000, 'iPhone', 1, '0', '1', NULL, NULL, '2020-07-13 22:47:20', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2027, '新增客户端', 'sys:client:add', NULL, 2026, NULL, 1, '0', '2', NULL, NULL, '2020-07-13 22:47:44', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2028, '修改客户端', 'sys:client:edit', NULL, 2026, NULL, 1, '0', '2', NULL, NULL, '2020-07-13 23:47:37', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2029, '删除客户端', 'sys:client:delete', NULL, 2026, NULL, 1, '0', '2', NULL, NULL, '2020-07-13 23:48:11', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2030, '导出客户端', 'sys:client:export', NULL, 2026, NULL, 1, '0', '2', NULL, NULL, '2020-07-13 23:48:28', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2031, '启禁客户端', 'sys:client:status', NULL, 2026, NULL, 1, '0', '2', NULL, NULL, '2020-07-13 23:49:22', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2032, '操作日志', NULL, '/system/log', 1000, 'comment', 2, '0', '1', NULL, NULL, '2020-07-15 05:11:09', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2033, '详细日志', 'sys:log:detail', NULL, 2032, NULL, 1, '0', '2', NULL, NULL, '2020-07-16 04:05:48', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2034, '日志删除', 'sys:log:delete', NULL, 2032, NULL, 1, '0', '2', NULL, NULL, '2020-07-16 04:06:16', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2035, '字典管理', NULL, '/system/dict', 1000, 'add', 1, '0', '1', NULL, NULL, '2020-07-17 09:29:31', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2036, '新增字典', 'sys:dict:add', NULL, 2035, NULL, 1, '0', '2', NULL, NULL, '2020-07-20 02:48:01', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2037, '修改字典', 'sys:dict:edit', NULL, 2035, NULL, 1, '0', '2', NULL, NULL, '2020-07-20 02:48:20', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2038, '删除字典', 'sys:dict:delete', NULL, 2035, NULL, 1, '0', '2', NULL, NULL, '2020-07-20 02:48:39', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2039, '组件管理', NULL, '/system/component', 1000, 'nested', 1, '0', '1', NULL, NULL, '2020-08-08 05:35:05', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2040, '内容管理', NULL, '/content', -1, 'content', 4, '0', '0', NULL, NULL, '2020-08-09 00:21:42', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2041, '文件管理', NULL, '/content/attachment', 2040, 'folder', 1, '0', '1', NULL, NULL, '2020-08-08 16:27:06', '2020-09-08 04:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2042, '修改组件', 'sys:comp:edit', NULL, 2039, NULL, 1, '0', '2', NULL, NULL, '2020-08-10 00:42:28', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2043, '上传文件', 'sys:attach:add', NULL, 2041, NULL, 1, '0', '2', NULL, NULL, '2020-08-09 16:43:52', '2020-09-07 20:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2044, '删除文件', 'sys:attach:delete', NULL, 2041, NULL, 1, '0', '2', NULL, NULL, '2020-08-09 16:44:29', '2020-09-07 20:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2045, '网关中心', NULL, '/gateway', -1, 'gateway', 3, '0', '0', NULL, NULL, '2020-08-28 19:12:00', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2047, '黑名单管理', NULL, '/gateway/blacklist', 2045, 'blacklist', 1, '0', '1', NULL, NULL, '2020-08-29 03:15:34', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2048, '新增黑名单', 'gw:bl:add', NULL, 2047, NULL, 1, '0', '2', NULL, NULL, '2020-08-29 09:38:52', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2049, '修改黑名单', 'gw:bl:edit', NULL, 2047, NULL, 1, '0', '2', NULL, NULL, '2020-08-29 09:39:27', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2050, '删除黑名单', 'gw:bl:del', NULL, 2047, NULL, 1, '0', '2', NULL, NULL, '2020-08-29 09:39:51', '2020-09-08 12:07:28', '0', '0', 1); -INSERT INTO `mate_sys_menu` VALUES (2051, '黑名单状态', 'gw:bl:status', NULL, 2047, NULL, 1, '0', '2', NULL, NULL, '2020-08-29 09:44:20', '2020-09-08 12:07:28', '0', '0', 1); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1000, '系统管理', NULL, '/system', -1, 'imac', 1, '0', '0', NULL, NULL, '2020-06-17 14:21:45', '2020-08-11 03:41:11', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1100, '用户管理', NULL, '/system/user', 1000, 'user', 1, '0', '1', NULL, NULL, '2020-06-18 14:28:36', '2020-06-25 11:19:20', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1101, '用户新增', 'sys:user:add', '', 1100, NULL, 1, '0', '2', NULL, NULL, '2020-06-17 14:32:51', '2020-07-03 08:51:48', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1102, '用户修改', 'sys:user:edit', NULL, 1100, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:27:40', '2020-07-03 08:51:50', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1103, '用户删除', 'sys:user:delete', NULL, 1100, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:27:56', '2020-07-03 08:51:52', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1104, '用户启用', 'sys:user:enable', NULL, 1100, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 08:49:47', '2020-07-03 08:55:39', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1105, '用户禁用', 'sys:user:disable', NULL, 1100, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 08:50:16', '2020-07-03 08:55:40', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1106, '用户导出', 'sys:user:export', NULL, 1100, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 08:50:58', '2020-07-03 08:55:42', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1200, '角色管理', NULL, '/system/role', 1000, 'repair', 1, '0', '1', NULL, NULL, '2020-06-19 16:36:01', '2020-06-25 03:19:23', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1201, '角色新增', 'sys:role:add', NULL, 1200, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:37:12', '2020-07-03 14:00:56', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1202, '角色修改', 'sys:role:edit', NULL, 1200, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:38:23', '2020-07-03 14:01:06', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1203, '角色删除', 'sys:role:delete', NULL, 1200, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:38:53', '2020-07-03 14:01:14', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1204, '角色导出', 'sys:role:export', NULL, 1200, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:02:37', '2020-07-03 14:02:50', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1205, '角色权限', 'sys:role:perm', NULL, 1200, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:03:32', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1300, '菜单管理', NULL, '/system/menu', 1000, 'tree', 1, '0', '1', NULL, NULL, '2020-06-19 16:39:07', '2020-06-25 03:19:45', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1301, '菜单新增', 'sys:menu:add', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:39:48', '2020-07-03 14:11:59', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1302, '菜单修改', 'sys:menu:edit', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:40:21', '2020-07-03 14:12:15', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1303, '菜单删除', 'sys:menu:delete', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-06-20 00:40:42', '2020-07-03 14:12:23', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1304, '菜单启用', 'sys:menu:enable', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:12:59', '2020-07-03 14:13:14', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1305, '菜单禁用', 'sys:menu:disable', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:13:34', '2020-07-03 14:13:57', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1306, '菜单导出', 'sys:menu:export', NULL, 1300, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:14:32', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1400, '部门管理', NULL, '/system/depart', 1000, 'table2', 1, '0', '1', NULL, NULL, '2020-06-26 22:52:41', '2020-07-03 14:25:56', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1401, '部门新增', 'sys:depart:add', NULL, 1400, NULL, 1, '0', '2', NULL, NULL, '2020-06-27 14:53:37', '2020-07-03 14:26:12', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1402, '部门修改', 'sys:depart:edit', NULL, 1400, NULL, 1, '0', '2', NULL, NULL, '2020-06-27 14:54:47', '2020-07-03 14:26:14', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1403, '部门删除', 'sys:depart:delete', NULL, 1400, NULL, 1, '0', '2', NULL, NULL, '2020-06-27 14:55:15', '2020-07-03 14:26:17', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1404, '部门导出', 'sys:depart:export', NULL, 1400, NULL, 1, '0', '2', NULL, NULL, '2020-07-03 14:27:26', '2020-07-03 14:27:45', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2015, '开发运维', NULL, '/devops', -1, 'settings', 3, '0', '0', NULL, NULL, '2020-07-05 03:20:31', '2020-10-19 05:24:24', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2016, '数据源管理', '', '/devops/datasource', 2015, 'table', 1, '0', '1', NULL, NULL, '2020-07-06 19:21:58', '2020-07-09 06:50:01', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2017, '数据源新增', 'sys:datasource:add', NULL, 2016, NULL, 1, '0', '2', NULL, NULL, '2020-07-07 04:08:11', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2018, '数据源修改', 'sys:datasource:edit', NULL, 2016, NULL, 1, '0', '2', NULL, NULL, '2020-07-07 04:08:40', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2019, '数据源删除', 'sys:datasource:delete', NULL, 2016, NULL, 1, '0', '2', NULL, NULL, '2020-07-07 04:09:05', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2020, '数据源导出', 'sys:datasource:export', NULL, 2016, NULL, 1, '0', '2', NULL, NULL, '2020-07-07 04:09:25', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2021, '代码生成', NULL, '/devops/generator', 2015, 'download', 1, '0', '1', NULL, NULL, '2020-07-09 07:08:50', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2022, '代码生成', 'devops:gen', NULL, 2021, NULL, 1, '0', '2', NULL, NULL, '2020-07-08 23:09:45', '2020-07-13 14:35:14', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2023, '监控配置中心', NULL, '/devops/monitor', 2015, 'validCode', 1, '0', '1', NULL, NULL, '2020-07-10 20:23:07', '2020-07-11 04:39:40', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2026, '客户端管理', NULL, '/system/client', 1000, 'iPhone', 1, '0', '1', NULL, NULL, '2020-07-13 22:47:20', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2027, '新增客户端', 'sys:client:add', NULL, 2026, NULL, 1, '0', '2', NULL, NULL, '2020-07-13 22:47:44', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2028, '修改客户端', 'sys:client:edit', NULL, 2026, NULL, 1, '0', '2', NULL, NULL, '2020-07-13 23:47:37', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2029, '删除客户端', 'sys:client:delete', NULL, 2026, NULL, 1, '0', '2', NULL, NULL, '2020-07-13 23:48:11', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2030, '导出客户端', 'sys:client:export', NULL, 2026, NULL, 1, '0', '2', NULL, NULL, '2020-07-13 23:48:28', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2031, '启禁客户端', 'sys:client:status', NULL, 2026, NULL, 1, '0', '2', NULL, NULL, '2020-07-13 23:49:22', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2032, '操作日志', NULL, '/system/log', 1000, 'comment', 2, '0', '1', NULL, NULL, '2020-07-15 05:11:09', '2020-08-11 03:41:43', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2033, '详细日志', 'sys:log:detail', NULL, 2032, NULL, 1, '0', '2', NULL, NULL, '2020-07-16 04:05:48', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2034, '日志删除', 'sys:log:delete', NULL, 2032, NULL, 1, '0', '2', NULL, NULL, '2020-07-16 04:06:16', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2035, '字典管理', NULL, '/system/dict', 1000, 'add', 1, '0', '1', NULL, NULL, '2020-07-17 09:29:31', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2036, '新增字典', 'sys:dict:add', NULL, 2035, NULL, 1, '0', '2', NULL, NULL, '2020-07-20 02:48:01', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2037, '修改字典', 'sys:dict:edit', NULL, 2035, NULL, 1, '0', '2', NULL, NULL, '2020-07-20 02:48:20', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2038, '删除字典', 'sys:dict:delete', NULL, 2035, NULL, 1, '0', '2', NULL, NULL, '2020-07-20 02:48:39', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2039, '组件管理', NULL, '/system/component', 1000, 'nested', 1, '0', '1', NULL, NULL, '2020-08-08 05:35:05', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2040, '内容管理', NULL, '/content', -1, 'content', 4, '0', '0', NULL, NULL, '2020-08-09 00:21:42', '2020-08-29 03:12:22', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2041, '文件管理', NULL, '/content/attachment', 2040, 'folder', 1, '0', '1', NULL, NULL, '2020-08-09 00:27:06', '2020-08-10 03:31:49', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2042, '修改组件', 'sys:comp:edit', NULL, 2039, NULL, 1, '0', '2', NULL, NULL, '2020-08-10 00:42:28', '2020-08-10 08:42:57', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2043, '上传文件', 'sys:attach:add', NULL, 2041, NULL, 1, '0', '2', NULL, NULL, '2020-08-10 08:43:52', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2044, '删除文件', 'sys:attach:delete', NULL, 2041, NULL, 1, '0', '2', NULL, NULL, '2020-08-10 08:44:29', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2045, '网关中心', NULL, '/gateway', -1, 'gateway', 2, '0', '0', NULL, NULL, '2020-08-28 11:12:00', '2020-10-19 05:24:19', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2047, '黑名单管理', NULL, '/gateway/blacklist', 2045, 'blacklist', 3, '0', '1', NULL, NULL, '2020-08-29 03:15:34', '2020-10-17 12:53:43', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2048, '新增黑名单', 'gw:bl:add', NULL, 2047, NULL, 1, '0', '2', NULL, NULL, '2020-08-29 09:38:52', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2049, '修改黑名单', 'gw:bl:edit', NULL, 2047, NULL, 1, '0', '2', NULL, NULL, '2020-08-29 09:39:27', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2050, '删除黑名单', 'gw:bl:del', NULL, 2047, NULL, 1, '0', '2', NULL, NULL, '2020-08-29 09:39:51', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2051, '黑名单状态', 'gw:bl:status', NULL, 2047, NULL, 1, '0', '2', NULL, NULL, '2020-08-29 09:44:20', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2053, '文档管理', NULL, '/content/doc', 2040, 'comment', 1, '0', '1', NULL, NULL, '2020-09-07 12:16:38', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2055, 'API管理', NULL, '/gateway/api', 2045, 'discovery', 2, '0', '1', NULL, NULL, '2020-10-14 14:00:06', '2020-10-17 12:53:38', '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2056, '微服务管理', NULL, '/gateway/route', 2045, 'share3', 1, '0', '1', NULL, NULL, '2020-10-17 12:53:27', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2057, '同步API', 'gw:api:sync', NULL, 2055, NULL, 1, '0', '2', NULL, NULL, '2020-10-17 14:16:06', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2058, '删除API', 'gw:api:del', NULL, 2055, NULL, 1, '0', '2', NULL, NULL, '2020-10-17 14:17:25', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2059, '修改API', 'gw:api:edit', NULL, 2055, NULL, 1, '0', '2', NULL, NULL, '2020-10-17 14:17:58', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2060, '新增微服务', 'gw:route:add', NULL, 2056, NULL, 1, '0', '2', NULL, NULL, '2020-10-19 05:19:45', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2061, '修改微服务', 'gw:route:edit', NULL, 2056, NULL, 1, '0', '2', NULL, NULL, '2020-10-19 05:20:49', NULL, '0', '0', 0); +INSERT INTO `mate_sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_by`, `update_by`, `create_time`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (2062, '删除微服务', 'gw:route:del', NULL, 2056, NULL, 1, '0', '2', NULL, NULL, '2020-10-19 05:21:03', NULL, '0', '0', 0); COMMIT; -- ---------------------------- -- Gitee