拆分核心模块
This commit is contained in:
@@ -1,745 +0,0 @@
|
|||||||
#
|
|
||||||
# A fatal error has been detected by the Java Runtime Environment:
|
|
||||||
#
|
|
||||||
# Internal Error (signature.cpp:120), pid=31091, tid=0x0000000000007303
|
|
||||||
# Error: ShouldNotReachHere()
|
|
||||||
#
|
|
||||||
# JRE version: OpenJDK Runtime Environment (8.0_322-b06) (build 1.8.0_322-b06)
|
|
||||||
# Java VM: OpenJDK 64-Bit Server VM (25.322-b06 mixed mode bsd-aarch64 compressed oops)
|
|
||||||
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
|
|
||||||
#
|
|
||||||
# If you would like to submit a bug report, please visit:
|
|
||||||
# https://bell-sw.com/support
|
|
||||||
#
|
|
||||||
|
|
||||||
--------------- T H R E A D ---------------
|
|
||||||
|
|
||||||
Current thread (0x000000012d2c4000): JavaThread "http-nio-9090-exec-4" daemon [_thread_in_vm, id=29443, stack(0x0000000175758000,0x000000017595b000)]
|
|
||||||
|
|
||||||
Stack: [0x0000000175758000,0x000000017595b000], sp=0x00000001759578a0, free space=2046k
|
|
||||||
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
|
|
||||||
V [libjvm.dylib+0x54f438]
|
|
||||||
V [libjvm.dylib+0x18856c]
|
|
||||||
V [libjvm.dylib+0x4bf228]
|
|
||||||
V [libjvm.dylib+0x4bf4f0]
|
|
||||||
V [libjvm.dylib+0x1db018]
|
|
||||||
V [libjvm.dylib+0x27acec]
|
|
||||||
j org.springframework.web.method.annotation.ModelFactory.updateModel(Lorg/springframework/web/context/request/NativeWebRequest;Lorg/springframework/web/method/support/ModelAndViewContainer;)V+34
|
|
||||||
j org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.getModelAndView(Lorg/springframework/web/method/support/ModelAndViewContainer;Lorg/springframework/web/method/annotation/ModelFactory;Lorg/springframework/web/context/request/NativeWebRequest;)Lorg/springframework/web/servlet/ModelAndView;+3
|
|
||||||
j org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/springframework/web/method/HandlerMethod;)Lorg/springframework/web/servlet/ModelAndView;+273
|
|
||||||
j org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/springframework/web/method/HandlerMethod;)Lorg/springframework/web/servlet/ModelAndView;+81
|
|
||||||
j org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/Object;)Lorg/springframework/web/servlet/ModelAndView;+7
|
|
||||||
j org.springframework.web.servlet.DispatcherServlet.doDispatch(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+259
|
|
||||||
j org.springframework.web.servlet.DispatcherServlet.doService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+241
|
|
||||||
j org.springframework.web.servlet.FrameworkServlet.processRequest(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+71
|
|
||||||
j org.springframework.web.servlet.FrameworkServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3
|
|
||||||
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+35
|
|
||||||
j org.springframework.web.servlet.FrameworkServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+33
|
|
||||||
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+36
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+304
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.apache.tomcat.websocket.server.WsFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+21
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+122
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+52
|
|
||||||
j org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(Lorg/springframework/security/web/FilterInvocation;)V+79
|
|
||||||
j org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+11
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+3
|
|
||||||
j org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+10
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.session.SessionManagementFilter.doFilter(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+210
|
|
||||||
j org.springframework.security.web.session.SessionManagementFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+10
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+105
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+19
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+32
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j com.gxwebsoft.common.core.security.JwtAuthenticationFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+275
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.web.filter.CorsFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+43
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+29
|
|
||||||
j org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+21
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+181
|
|
||||||
j org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+10
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+42
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.FilterChainProxy.doFilterInternal(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+148
|
|
||||||
j org.springframework.security.web.FilterChainProxy.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+48
|
|
||||||
j org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(Ljavax/servlet/Filter;Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+5
|
|
||||||
j org.springframework.web.filter.DelegatingFilterProxy.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+85
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.springframework.web.filter.RequestContextFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+21
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.springframework.web.filter.FormContentFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+38
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+53
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+694
|
|
||||||
j org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+169
|
|
||||||
j org.apache.catalina.authenticator.AuthenticatorBase.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+260
|
|
||||||
j org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+128
|
|
||||||
j org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
|
|
||||||
j org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+59
|
|
||||||
j org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+199
|
|
||||||
j org.apache.coyote.http11.Http11Processor.service(Lorg/apache/tomcat/util/net/SocketWrapperBase;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;+737
|
|
||||||
j org.apache.coyote.AbstractProcessorLight.process(Lorg/apache/tomcat/util/net/SocketWrapperBase;Lorg/apache/tomcat/util/net/SocketEvent;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;+170
|
|
||||||
j org.apache.coyote.AbstractProtocol$ConnectionHandler.process(Lorg/apache/tomcat/util/net/SocketWrapperBase;Lorg/apache/tomcat/util/net/SocketEvent;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;+505
|
|
||||||
j org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun()V+216
|
|
||||||
j org.apache.tomcat.util.net.SocketProcessorBase.run()V+21
|
|
||||||
j org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(Lorg/apache/tomcat/util/threads/ThreadPoolExecutor$Worker;)V+92
|
|
||||||
j org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run()V+5
|
|
||||||
j org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run()V+4
|
|
||||||
j java.lang.Thread.run()V+11
|
|
||||||
v ~StubRoutines::call_stub
|
|
||||||
V [libjvm.dylib+0x282778]
|
|
||||||
V [libjvm.dylib+0x2812a4]
|
|
||||||
V [libjvm.dylib+0x2814f8]
|
|
||||||
V [libjvm.dylib+0x3086e4]
|
|
||||||
V [libjvm.dylib+0x514724]
|
|
||||||
V [libjvm.dylib+0x5145d0]
|
|
||||||
V [libjvm.dylib+0x44aeb8]
|
|
||||||
...<more frames>...
|
|
||||||
|
|
||||||
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
|
|
||||||
j org.springframework.web.method.annotation.ModelFactory.updateModel(Lorg/springframework/web/context/request/NativeWebRequest;Lorg/springframework/web/method/support/ModelAndViewContainer;)V+34
|
|
||||||
j org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.getModelAndView(Lorg/springframework/web/method/support/ModelAndViewContainer;Lorg/springframework/web/method/annotation/ModelFactory;Lorg/springframework/web/context/request/NativeWebRequest;)Lorg/springframework/web/servlet/ModelAndView;+3
|
|
||||||
j org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/springframework/web/method/HandlerMethod;)Lorg/springframework/web/servlet/ModelAndView;+273
|
|
||||||
j org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/springframework/web/method/HandlerMethod;)Lorg/springframework/web/servlet/ModelAndView;+81
|
|
||||||
j org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/Object;)Lorg/springframework/web/servlet/ModelAndView;+7
|
|
||||||
j org.springframework.web.servlet.DispatcherServlet.doDispatch(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+259
|
|
||||||
j org.springframework.web.servlet.DispatcherServlet.doService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+241
|
|
||||||
j org.springframework.web.servlet.FrameworkServlet.processRequest(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+71
|
|
||||||
j org.springframework.web.servlet.FrameworkServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3
|
|
||||||
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+35
|
|
||||||
j org.springframework.web.servlet.FrameworkServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+33
|
|
||||||
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+36
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+304
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.apache.tomcat.websocket.server.WsFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+21
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+122
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+52
|
|
||||||
j org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(Lorg/springframework/security/web/FilterInvocation;)V+79
|
|
||||||
j org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+11
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+3
|
|
||||||
j org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+10
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.session.SessionManagementFilter.doFilter(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+210
|
|
||||||
j org.springframework.security.web.session.SessionManagementFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+10
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+105
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+19
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+32
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j com.gxwebsoft.common.core.security.JwtAuthenticationFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+275
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.web.filter.CorsFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+43
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+29
|
|
||||||
j org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+21
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+181
|
|
||||||
j org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+10
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+42
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+136
|
|
||||||
j org.springframework.security.web.FilterChainProxy.doFilterInternal(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+148
|
|
||||||
j org.springframework.security.web.FilterChainProxy.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+48
|
|
||||||
j org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(Ljavax/servlet/Filter;Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+5
|
|
||||||
j org.springframework.web.filter.DelegatingFilterProxy.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+85
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.springframework.web.filter.RequestContextFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+21
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.springframework.web.filter.FormContentFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+38
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V+53
|
|
||||||
j org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+147
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+135
|
|
||||||
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+99
|
|
||||||
j org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+694
|
|
||||||
j org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+169
|
|
||||||
j org.apache.catalina.authenticator.AuthenticatorBase.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+260
|
|
||||||
j org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+128
|
|
||||||
j org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
|
|
||||||
j org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+59
|
|
||||||
j org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+199
|
|
||||||
j org.apache.coyote.http11.Http11Processor.service(Lorg/apache/tomcat/util/net/SocketWrapperBase;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;+737
|
|
||||||
j org.apache.coyote.AbstractProcessorLight.process(Lorg/apache/tomcat/util/net/SocketWrapperBase;Lorg/apache/tomcat/util/net/SocketEvent;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;+170
|
|
||||||
j org.apache.coyote.AbstractProtocol$ConnectionHandler.process(Lorg/apache/tomcat/util/net/SocketWrapperBase;Lorg/apache/tomcat/util/net/SocketEvent;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;+505
|
|
||||||
j org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun()V+216
|
|
||||||
j org.apache.tomcat.util.net.SocketProcessorBase.run()V+21
|
|
||||||
j org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(Lorg/apache/tomcat/util/threads/ThreadPoolExecutor$Worker;)V+92
|
|
||||||
j org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run()V+5
|
|
||||||
j org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run()V+4
|
|
||||||
j java.lang.Thread.run()V+11
|
|
||||||
v ~StubRoutines::call_stub
|
|
||||||
|
|
||||||
--------------- P R O C E S S ---------------
|
|
||||||
|
|
||||||
Java Threads: ( => current thread )
|
|
||||||
0x000000012ca6b800 JavaThread "lettuce-eventExecutorLoop-1-1" daemon [_thread_blocked, id=29955, stack(0x0000000175b70000,0x0000000175d73000)]
|
|
||||||
0x000000012ca9d000 JavaThread "lettuce-nioEventLoop-6-1" daemon [_thread_in_native, id=29703, stack(0x0000000175964000,0x0000000175b67000)]
|
|
||||||
=>0x000000012d2c4000 JavaThread "http-nio-9090-exec-4" daemon [_thread_in_vm, id=29443, stack(0x0000000175758000,0x000000017595b000)]
|
|
||||||
0x000000011f0a3800 JavaThread "http-nio-9090-exec-3" daemon [_thread_in_Java, id=38403, stack(0x000000017554c000,0x000000017574f000)]
|
|
||||||
0x000000011f0a0000 JavaThread "http-nio-9090-exec-2" daemon [_thread_blocked, id=38659, stack(0x0000000175340000,0x0000000175543000)]
|
|
||||||
0x000000011f09f000 JavaThread "http-nio-9090-exec-1" daemon [_thread_blocked, id=28459, stack(0x0000000175134000,0x0000000175337000)]
|
|
||||||
0x000000012cad2000 JavaThread "http-nio-9090-Acceptor" daemon [_thread_in_native, id=39171, stack(0x0000000174f28000,0x000000017512b000)]
|
|
||||||
0x000000012cad1000 JavaThread "http-nio-9090-Poller" daemon [_thread_in_native, id=39431, stack(0x0000000174d1c000,0x0000000174f1f000)]
|
|
||||||
0x000000014ecb0800 JavaThread "File Watcher" daemon [_thread_blocked, id=27907, stack(0x0000000174b10000,0x0000000174d13000)]
|
|
||||||
0x000000012cabf000 JavaThread "Live Reload Server" daemon [_thread_in_native, id=27675, stack(0x0000000174904000,0x0000000174b07000)]
|
|
||||||
0x000000012c8de000 JavaThread "nioEventLoopGroup-4-1" [_thread_in_native, id=27155, stack(0x00000001746f8000,0x00000001748fb000)]
|
|
||||||
0x000000014d207000 JavaThread "container-0" [_thread_blocked, id=40195, stack(0x00000001744ec000,0x00000001746ef000)]
|
|
||||||
0x000000014e3a1800 JavaThread "Catalina-utility-2" [_thread_blocked, id=26371, stack(0x00000001742e0000,0x00000001744e3000)]
|
|
||||||
0x000000014d202000 JavaThread "Catalina-utility-1" [_thread_blocked, id=40455, stack(0x00000001740d4000,0x00000001742d7000)]
|
|
||||||
0x000000014e755800 JavaThread "lettuce-timer-3-1" daemon [_thread_blocked, id=40719, stack(0x0000000173ec8000,0x00000001740cb000)]
|
|
||||||
0x000000014d0ae800 JavaThread "RMI TCP Connection(5)-127.0.0.1" daemon [_thread_in_native, id=14599, stack(0x0000000173cbc000,0x0000000173ebf000)]
|
|
||||||
0x000000014ed3b000 JavaThread "RMI TCP Connection(2)-127.0.0.1" daemon [_thread_in_native, id=41227, stack(0x0000000173ab0000,0x0000000173cb3000)]
|
|
||||||
0x000000012a00a800 JavaThread "Druid-ConnectionPool-Destroy-1108833840" daemon [_thread_blocked, id=25347, stack(0x00000001738a4000,0x0000000173aa7000)]
|
|
||||||
0x000000012980b000 JavaThread "Druid-ConnectionPool-Create-1108833840" daemon [_thread_blocked, id=25103, stack(0x0000000173698000,0x000000017389b000)]
|
|
||||||
0x000000014d1dc800 JavaThread "mysql-cj-abandoned-connection-cleanup" daemon [_thread_blocked, id=24591, stack(0x000000017348c000,0x000000017368f000)]
|
|
||||||
0x000000014e4ec800 JavaThread "RMI Scheduler(0)" daemon [_thread_blocked, id=24067, stack(0x0000000173280000,0x0000000173483000)]
|
|
||||||
0x000000014d171000 JavaThread "RMI TCP Connection(4)-127.0.0.1" daemon [_thread_in_native, id=23555, stack(0x0000000173074000,0x0000000173277000)]
|
|
||||||
0x000000014e453800 JavaThread "Attach Listener" daemon [_thread_blocked, id=23051, stack(0x0000000172e68000,0x000000017306b000)]
|
|
||||||
0x000000011f8d0000 JavaThread "restartedMain" [_thread_blocked, id=42243, stack(0x0000000172c5c000,0x0000000172e5f000)]
|
|
||||||
0x000000014e0f1000 JavaThread "Thread-1" [_thread_blocked, id=22787, stack(0x0000000172a50000,0x0000000172c53000)]
|
|
||||||
0x000000014e0c2000 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=22275, stack(0x0000000172638000,0x000000017283b000)]
|
|
||||||
0x000000014e09f000 JavaThread "Service Thread" daemon [_thread_blocked, id=22019, stack(0x000000017242c000,0x000000017262f000)]
|
|
||||||
0x000000014ee0e800 JavaThread "C1 CompilerThread3" daemon [_thread_in_vm, id=16387, stack(0x0000000172220000,0x0000000172423000)]
|
|
||||||
0x000000014ee0d800 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=16899, stack(0x0000000172014000,0x0000000172217000)]
|
|
||||||
0x000000014ee0c800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=15875, stack(0x0000000171e08000,0x000000017200b000)]
|
|
||||||
0x000000014ee0b800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=17411, stack(0x0000000171bfc000,0x0000000171dff000)]
|
|
||||||
0x000000014ee07800 JavaThread "Monitor Ctrl-Break" daemon [_thread_in_native, id=17667, stack(0x00000001719f0000,0x0000000171bf3000)]
|
|
||||||
0x000000014e810800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=17923, stack(0x00000001717e4000,0x00000001719e7000)]
|
|
||||||
0x000000014e029800 JavaThread "Finalizer" daemon [_thread_blocked, id=13827, stack(0x00000001714c0000,0x00000001716c3000)]
|
|
||||||
0x000000014e027000 JavaThread "Reference Handler" daemon [_thread_blocked, id=19971, stack(0x00000001712b4000,0x00000001714b7000)]
|
|
||||||
0x000000014e009000 JavaThread "main" [_thread_blocked, id=5635, stack(0x000000016fc30000,0x000000016fe33000)]
|
|
||||||
|
|
||||||
Other Threads:
|
|
||||||
0x000000013c815000 VMThread [stack: 0x00000001710a8000,0x00000001712ab000] [id=13059]
|
|
||||||
0x000000011f865000 WatcherThread [stack: 0x0000000172844000,0x0000000172a47000] [id=42755]
|
|
||||||
|
|
||||||
VM state:not at safepoint (normal execution)
|
|
||||||
|
|
||||||
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
|
|
||||||
[0x0000600002eb2900] CodeCache_lock - owner thread: 0x000000014ee0e800
|
|
||||||
[0x0000600002eb3f80] Compile_lock - owner thread: 0x000000014ee0e800
|
|
||||||
[0x0000600002eb8080] MethodCompileQueue_lock - owner thread: 0x000000014ee0e800
|
|
||||||
|
|
||||||
heap address: 0x00000005c0000000, size: 8192 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
|
|
||||||
Narrow klass base: 0x0000000800000000, Narrow klass shift: 0
|
|
||||||
Compressed class space size: 1073741824 Address: 0x0000000800000000
|
|
||||||
|
|
||||||
Heap:
|
|
||||||
PSYoungGen total 2729984K, used 76175K [0x0000000715580000, 0x00000007bfd00000, 0x00000007c0000000)
|
|
||||||
eden space 2672128K, 2% used [0x0000000715580000,0x0000000719fe3fc8,0x00000007b8700000)
|
|
||||||
from space 57856K, 0% used [0x00000007bc480000,0x00000007bc480000,0x00000007bfd00000)
|
|
||||||
to space 60416K, 0% used [0x00000007b8700000,0x00000007b8700000,0x00000007bc200000)
|
|
||||||
ParOldGen total 483328K, used 184293K [0x00000005c0000000, 0x00000005dd800000, 0x0000000715580000)
|
|
||||||
object space 483328K, 38% used [0x00000005c0000000,0x00000005cb3f9600,0x00000005dd800000)
|
|
||||||
Metaspace used 92443K, capacity 98046K, committed 99632K, reserved 1136640K
|
|
||||||
class space used 10271K, capacity 11254K, committed 11568K, reserved 1048576K
|
|
||||||
|
|
||||||
Card table byte_map: [0x0000000109ecc000,0x000000010aed0000] byte_map_base: 0x00000001070cc000
|
|
||||||
|
|
||||||
Marking Bits: (ParMarkBitMap*) 0x000000010184da70
|
|
||||||
Begin Bits: [0x000000010b97c000, 0x000000011397c000)
|
|
||||||
End Bits: [0x000000011397c000, 0x000000011b97c000)
|
|
||||||
|
|
||||||
Polling page: 0x00000001003dc000
|
|
||||||
|
|
||||||
CodeCache: size=131072Kb used=20310Kb max_used=20310Kb free=110761Kb
|
|
||||||
bounds [0x0000000101ecc000, 0x00000001032ac000, 0x0000000109ecc000]
|
|
||||||
total_blobs=11280 nmethods=10658 adapters=535
|
|
||||||
compilation: enabled
|
|
||||||
|
|
||||||
Compilation events (10 events):
|
|
||||||
Event: 18.150 Thread 0x000000014ee0e800 nmethod 10897 0x000000010327fed0 code [0x0000000103280000, 0x0000000103280090]
|
|
||||||
Event: 18.150 Thread 0x000000014ee0e800 10899 1 org.apache.ibatis.ognl.OgnlContext::getRoot (5 bytes)
|
|
||||||
Event: 18.150 Thread 0x000000014ee0e800 nmethod 10899 0x0000000103280110 code [0x0000000103280240, 0x00000001032802d0]
|
|
||||||
Event: 18.150 Thread 0x000000014ee0e800 10898 1 com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl::getRawObject (5 bytes)
|
|
||||||
Event: 18.150 Thread 0x000000014ee0e800 nmethod 10898 0x0000000103280350 code [0x0000000103280480, 0x0000000103280510]
|
|
||||||
Event: 18.150 Thread 0x000000014ee0e800 10900 1 net.sf.jsqlparser.parser.CCJSqlParser$JJCalls::<init> (5 bytes)
|
|
||||||
Event: 18.150 Thread 0x000000014ee0e800 nmethod 10900 0x0000000103280590 code [0x00000001032806c0, 0x0000000103280790]
|
|
||||||
Event: 18.150 Thread 0x000000014ee0e800 10901 1 java.util.Collections::reverse (125 bytes)
|
|
||||||
Event: 18.150 Thread 0x000000014ee0e800 nmethod 10901 0x0000000103280810 code [0x0000000103280a00, 0x0000000103280dc0]
|
|
||||||
Event: 18.176 Thread 0x000000014ee0e800 10902 1 com.alibaba.druid.sql.parser.SQLExprParser::primary (6226 bytes)
|
|
||||||
|
|
||||||
GC Heap History (10 events):
|
|
||||||
Event: 7.500 GC heap before
|
|
||||||
{Heap before GC invocations=12 (full 3):
|
|
||||||
PSYoungGen total 1641984K, used 42475K [0x0000000715580000, 0x00000007a1980000, 0x00000007c0000000)
|
|
||||||
eden space 1599488K, 0% used [0x0000000715580000,0x0000000715580000,0x0000000776f80000)
|
|
||||||
from space 42496K, 99% used [0x0000000776f80000,0x00000007798facd0,0x0000000779900000)
|
|
||||||
to space 57856K, 0% used [0x000000079e100000,0x000000079e100000,0x00000007a1980000)
|
|
||||||
ParOldGen total 189440K, used 64230K [0x00000005c0000000, 0x00000005cb900000, 0x0000000715580000)
|
|
||||||
object space 189440K, 33% used [0x00000005c0000000,0x00000005c3eb9b00,0x00000005cb900000)
|
|
||||||
Metaspace used 56074K, capacity 59103K, committed 59184K, reserved 1101824K
|
|
||||||
class space used 6856K, capacity 7422K, committed 7472K, reserved 1048576K
|
|
||||||
Event: 7.729 GC heap after
|
|
||||||
Heap after GC invocations=12 (full 3):
|
|
||||||
PSYoungGen total 1641984K, used 0K [0x0000000715580000, 0x00000007a1980000, 0x00000007c0000000)
|
|
||||||
eden space 1599488K, 0% used [0x0000000715580000,0x0000000715580000,0x0000000776f80000)
|
|
||||||
from space 42496K, 0% used [0x0000000776f80000,0x0000000776f80000,0x0000000779900000)
|
|
||||||
to space 57856K, 0% used [0x000000079e100000,0x000000079e100000,0x00000007a1980000)
|
|
||||||
ParOldGen total 327168K, used 104687K [0x00000005c0000000, 0x00000005d3f80000, 0x0000000715580000)
|
|
||||||
object space 327168K, 31% used [0x00000005c0000000,0x00000005c663bed0,0x00000005d3f80000)
|
|
||||||
Metaspace used 55901K, capacity 58827K, committed 59184K, reserved 1101824K
|
|
||||||
class space used 6831K, capacity 7376K, committed 7472K, reserved 1048576K
|
|
||||||
}
|
|
||||||
Event: 12.785 GC heap before
|
|
||||||
{Heap before GC invocations=13 (full 3):
|
|
||||||
PSYoungGen total 1641984K, used 1599488K [0x0000000715580000, 0x00000007a1980000, 0x00000007c0000000)
|
|
||||||
eden space 1599488K, 100% used [0x0000000715580000,0x0000000776f80000,0x0000000776f80000)
|
|
||||||
from space 42496K, 0% used [0x0000000776f80000,0x0000000776f80000,0x0000000779900000)
|
|
||||||
to space 57856K, 0% used [0x000000079e100000,0x000000079e100000,0x00000007a1980000)
|
|
||||||
ParOldGen total 327168K, used 104687K [0x00000005c0000000, 0x00000005d3f80000, 0x0000000715580000)
|
|
||||||
object space 327168K, 31% used [0x00000005c0000000,0x00000005c663bed0,0x00000005d3f80000)
|
|
||||||
Metaspace used 79446K, capacity 84909K, committed 85040K, reserved 1124352K
|
|
||||||
class space used 9049K, capacity 9984K, committed 10032K, reserved 1048576K
|
|
||||||
Event: 12.804 GC heap after
|
|
||||||
Heap after GC invocations=13 (full 3):
|
|
||||||
PSYoungGen total 2195456K, used 49272K [0x0000000715580000, 0x00000007a1180000, 0x00000007c0000000)
|
|
||||||
eden space 2145792K, 0% used [0x0000000715580000,0x0000000715580000,0x0000000798500000)
|
|
||||||
from space 49664K, 99% used [0x000000079e100000,0x00000007a111e178,0x00000007a1180000)
|
|
||||||
to space 62976K, 0% used [0x0000000799680000,0x0000000799680000,0x000000079d400000)
|
|
||||||
ParOldGen total 327168K, used 104703K [0x00000005c0000000, 0x00000005d3f80000, 0x0000000715580000)
|
|
||||||
object space 327168K, 32% used [0x00000005c0000000,0x00000005c663fed0,0x00000005d3f80000)
|
|
||||||
Metaspace used 79446K, capacity 84909K, committed 85040K, reserved 1124352K
|
|
||||||
class space used 9049K, capacity 9984K, committed 10032K, reserved 1048576K
|
|
||||||
}
|
|
||||||
Event: 17.034 GC heap before
|
|
||||||
{Heap before GC invocations=14 (full 3):
|
|
||||||
PSYoungGen total 2195456K, used 2195064K [0x0000000715580000, 0x00000007a1180000, 0x00000007c0000000)
|
|
||||||
eden space 2145792K, 100% used [0x0000000715580000,0x0000000798500000,0x0000000798500000)
|
|
||||||
from space 49664K, 99% used [0x000000079e100000,0x00000007a111e178,0x00000007a1180000)
|
|
||||||
to space 62976K, 0% used [0x0000000799680000,0x0000000799680000,0x000000079d400000)
|
|
||||||
ParOldGen total 327168K, used 104703K [0x00000005c0000000, 0x00000005d3f80000, 0x0000000715580000)
|
|
||||||
object space 327168K, 32% used [0x00000005c0000000,0x00000005c663fed0,0x00000005d3f80000)
|
|
||||||
Metaspace used 79973K, capacity 85653K, committed 85936K, reserved 1124352K
|
|
||||||
class space used 9083K, capacity 10044K, committed 10160K, reserved 1048576K
|
|
||||||
Event: 17.090 GC heap after
|
|
||||||
Heap after GC invocations=14 (full 3):
|
|
||||||
PSYoungGen total 2226688K, used 32624K [0x0000000715580000, 0x00000007c0000000, 0x00000007c0000000)
|
|
||||||
eden space 2163712K, 0% used [0x0000000715580000,0x0000000715580000,0x0000000799680000)
|
|
||||||
from space 62976K, 51% used [0x0000000799680000,0x000000079b65c2d0,0x000000079d400000)
|
|
||||||
to space 60928K, 0% used [0x00000007bc480000,0x00000007bc480000,0x00000007c0000000)
|
|
||||||
ParOldGen total 327168K, used 145593K [0x00000005c0000000, 0x00000005d3f80000, 0x0000000715580000)
|
|
||||||
object space 327168K, 44% used [0x00000005c0000000,0x00000005c8e2e718,0x00000005d3f80000)
|
|
||||||
Metaspace used 79973K, capacity 85653K, committed 85936K, reserved 1124352K
|
|
||||||
class space used 9083K, capacity 10044K, committed 10160K, reserved 1048576K
|
|
||||||
}
|
|
||||||
Event: 17.875 GC heap before
|
|
||||||
{Heap before GC invocations=15 (full 3):
|
|
||||||
PSYoungGen total 2226688K, used 550337K [0x0000000715580000, 0x00000007c0000000, 0x00000007c0000000)
|
|
||||||
eden space 2163712K, 23% used [0x0000000715580000,0x0000000734f14408,0x0000000799680000)
|
|
||||||
from space 62976K, 51% used [0x0000000799680000,0x000000079b65c2d0,0x000000079d400000)
|
|
||||||
to space 60928K, 0% used [0x00000007bc480000,0x00000007bc480000,0x00000007c0000000)
|
|
||||||
ParOldGen total 327168K, used 145593K [0x00000005c0000000, 0x00000005d3f80000, 0x0000000715580000)
|
|
||||||
object space 327168K, 44% used [0x00000005c0000000,0x00000005c8e2e718,0x00000005d3f80000)
|
|
||||||
Metaspace used 92415K, capacity 98572K, committed 98640K, reserved 1136640K
|
|
||||||
class space used 10319K, capacity 11401K, committed 11440K, reserved 1048576K
|
|
||||||
Event: 17.902 GC heap after
|
|
||||||
Heap after GC invocations=15 (full 3):
|
|
||||||
PSYoungGen total 2729984K, used 14366K [0x0000000715580000, 0x00000007bfd00000, 0x00000007c0000000)
|
|
||||||
eden space 2672128K, 0% used [0x0000000715580000,0x0000000715580000,0x00000007b8700000)
|
|
||||||
from space 57856K, 24% used [0x00000007bc480000,0x00000007bd2878a0,0x00000007bfd00000)
|
|
||||||
to space 60416K, 0% used [0x00000007b8700000,0x00000007b8700000,0x00000007bc200000)
|
|
||||||
ParOldGen total 327168K, used 178070K [0x00000005c0000000, 0x00000005d3f80000, 0x0000000715580000)
|
|
||||||
object space 327168K, 54% used [0x00000005c0000000,0x00000005cade5818,0x00000005d3f80000)
|
|
||||||
Metaspace used 92415K, capacity 98572K, committed 98640K, reserved 1136640K
|
|
||||||
class space used 10319K, capacity 11401K, committed 11440K, reserved 1048576K
|
|
||||||
}
|
|
||||||
Event: 17.902 GC heap before
|
|
||||||
{Heap before GC invocations=16 (full 4):
|
|
||||||
PSYoungGen total 2729984K, used 14366K [0x0000000715580000, 0x00000007bfd00000, 0x00000007c0000000)
|
|
||||||
eden space 2672128K, 0% used [0x0000000715580000,0x0000000715580000,0x00000007b8700000)
|
|
||||||
from space 57856K, 24% used [0x00000007bc480000,0x00000007bd2878a0,0x00000007bfd00000)
|
|
||||||
to space 60416K, 0% used [0x00000007b8700000,0x00000007b8700000,0x00000007bc200000)
|
|
||||||
ParOldGen total 327168K, used 178070K [0x00000005c0000000, 0x00000005d3f80000, 0x0000000715580000)
|
|
||||||
object space 327168K, 54% used [0x00000005c0000000,0x00000005cade5818,0x00000005d3f80000)
|
|
||||||
Metaspace used 92415K, capacity 98572K, committed 98640K, reserved 1136640K
|
|
||||||
class space used 10319K, capacity 11401K, committed 11440K, reserved 1048576K
|
|
||||||
Event: 18.135 GC heap after
|
|
||||||
Heap after GC invocations=16 (full 4):
|
|
||||||
PSYoungGen total 2729984K, used 0K [0x0000000715580000, 0x00000007bfd00000, 0x00000007c0000000)
|
|
||||||
eden space 2672128K, 0% used [0x0000000715580000,0x0000000715580000,0x00000007b8700000)
|
|
||||||
from space 57856K, 0% used [0x00000007bc480000,0x00000007bc480000,0x00000007bfd00000)
|
|
||||||
to space 60416K, 0% used [0x00000007b8700000,0x00000007b8700000,0x00000007bc200000)
|
|
||||||
ParOldGen total 483328K, used 184293K [0x00000005c0000000, 0x00000005dd800000, 0x0000000715580000)
|
|
||||||
object space 483328K, 38% used [0x00000005c0000000,0x00000005cb3f9600,0x00000005dd800000)
|
|
||||||
Metaspace used 91510K, capacity 97090K, committed 98640K, reserved 1136640K
|
|
||||||
class space used 10179K, capacity 11150K, committed 11440K, reserved 1048576K
|
|
||||||
}
|
|
||||||
|
|
||||||
Deoptimization events (0 events):
|
|
||||||
No events
|
|
||||||
|
|
||||||
Classes redefined (0 events):
|
|
||||||
No events
|
|
||||||
|
|
||||||
Internal exceptions (10 events):
|
|
||||||
Event: 18.172 Thread 0x000000011f8d0000 Exception <a 'java/lang/ClassNotFoundException': > (0x00000007166f8760) thrown at [/System/Volumes/Data/ws/workspace/jdk-8u322/label/macosx-aarch64/type/b8/build/hotspot/src/share/vm/prims/jni.cpp, line 738]
|
|
||||||
Event: 18.172 Thread 0x000000011f8d0000 Exception <a 'java/lang/ClassNotFoundException': > (0x00000007166ffc50) thrown at [/System/Volumes/Data/ws/workspace/jdk-8u322/label/macosx-aarch64/type/b8/build/hotspot/src/share/vm/prims/jni.cpp, line 738]
|
|
||||||
Event: 18.178 Thread 0x000000011f8d0000 Exception <a 'java/lang/ClassNotFoundException': > (0x00000007168c3b80) thrown at [/System/Volumes/Data/ws/workspace/jdk-8u322/label/macosx-aarch64/type/b8/build/hotspot/src/share/vm/prims/jni.cpp, line 738]
|
|
||||||
Event: 18.178 Thread 0x000000011f8d0000 Exception <a 'java/lang/ClassNotFoundException': > (0x00000007168cdcf0) thrown at [/System/Volumes/Data/ws/workspace/jdk-8u322/label/macosx-aarch64/type/b8/build/hotspot/src/share/vm/prims/jni.cpp, line 738]
|
|
||||||
Event: 18.178 Thread 0x000000011f8d0000 Exception <a 'java/lang/ClassNotFoundException': > (0x00000007168d4200) thrown at [/System/Volumes/Data/ws/workspace/jdk-8u322/label/macosx-aarch64/type/b8/build/hotspot/src/share/vm/prims/jni.cpp, line 738]
|
|
||||||
Event: 18.178 Thread 0x000000011f8d0000 Exception <a 'java/lang/ClassNotFoundException': > (0x00000007168da6e0) thrown at [/System/Volumes/Data/ws/workspace/jdk-8u322/label/macosx-aarch64/type/b8/build/hotspot/src/share/vm/prims/jni.cpp, line 738]
|
|
||||||
Event: 18.182 Thread 0x000000011f8d0000 Exception <a 'java/lang/ClassNotFoundException': > (0x0000000716b67a70) thrown at [/System/Volumes/Data/ws/workspace/jdk-8u322/label/macosx-aarch64/type/b8/build/hotspot/src/share/vm/prims/jni.cpp, line 738]
|
|
||||||
Event: 18.182 Thread 0x000000011f8d0000 Exception <a 'java/lang/ClassNotFoundException': > (0x0000000716b6f330) thrown at [/System/Volumes/Data/ws/workspace/jdk-8u322/label/macosx-aarch64/type/b8/build/hotspot/src/share/vm/prims/jni.cpp, line 738]
|
|
||||||
Event: 18.182 Thread 0x000000011f8d0000 Exception <a 'java/lang/ClassNotFoundException': > (0x0000000716b796a8) thrown at [/System/Volumes/Data/ws/workspace/jdk-8u322/label/macosx-aarch64/type/b8/build/hotspot/src/share/vm/prims/jni.cpp, line 738]
|
|
||||||
Event: 18.182 Thread 0x000000011f8d0000 Exception <a 'java/lang/ClassNotFoundException': > (0x0000000716b80b98) thrown at [/System/Volumes/Data/ws/workspace/jdk-8u322/label/macosx-aarch64/type/b8/build/hotspot/src/share/vm/prims/jni.cpp, line 738]
|
|
||||||
|
|
||||||
Events (10 events):
|
|
||||||
Event: 18.180 loading class com/fasterxml/jackson/core/json/JsonWriteContext
|
|
||||||
Event: 18.180 loading class com/fasterxml/jackson/core/json/JsonWriteContext done
|
|
||||||
Event: 18.180 loading class org/springframework/util/TypeUtils
|
|
||||||
Event: 18.180 loading class org/springframework/util/TypeUtils done
|
|
||||||
Event: 18.181 Executing VM operation: ForceSafepoint
|
|
||||||
Event: 18.181 Executing VM operation: ForceSafepoint done
|
|
||||||
Event: 18.181 loading class com/fasterxml/jackson/core/io/NumberOutput
|
|
||||||
Event: 18.181 loading class com/fasterxml/jackson/core/io/NumberOutput done
|
|
||||||
Event: 18.182 loading class org/apache/tomcat/util/buf/HexUtils
|
|
||||||
Event: 18.182 loading class org/apache/tomcat/util/buf/HexUtils done
|
|
||||||
|
|
||||||
|
|
||||||
Dynamic libraries:
|
|
||||||
0x00000001a144e000 /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
|
|
||||||
0x000000018d9c7000 /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
|
|
||||||
0x0000000190efd000 /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
|
|
||||||
0x000000018bd24000 /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
|
|
||||||
0x0000000195849000 /usr/lib/libSystem.B.dylib
|
|
||||||
0x000000018e87e000 /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation
|
|
||||||
0x000000019b747000 /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices
|
|
||||||
0x0000000193d60000 /System/Library/PrivateFrameworks/XCTTargetBootstrap.framework/Versions/A/XCTTargetBootstrap
|
|
||||||
0x000000019754a000 /System/Library/PrivateFrameworks/InternationalSupport.framework/Versions/A/InternationalSupport
|
|
||||||
0x00000001975d3000 /System/Library/PrivateFrameworks/UserActivity.framework/Versions/A/UserActivity
|
|
||||||
0x0000000196a78000 /usr/lib/libspindump.dylib
|
|
||||||
0x000000018eaee000 /System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/UniformTypeIdentifiers
|
|
||||||
0x00000001922ed000 /usr/lib/libapp_launch_measurement.dylib
|
|
||||||
0x0000000191865000 /System/Library/PrivateFrameworks/CoreAnalytics.framework/Versions/A/CoreAnalytics
|
|
||||||
0x00000001922f0000 /System/Library/PrivateFrameworks/CoreAutoLayout.framework/Versions/A/CoreAutoLayout
|
|
||||||
0x0000000193663000 /System/Library/Frameworks/Metal.framework/Versions/A/Metal
|
|
||||||
0x00000001943b2000 /usr/lib/liblangid.dylib
|
|
||||||
0x0000000193d64000 /System/Library/PrivateFrameworks/CoreSVG.framework/Versions/A/CoreSVG
|
|
||||||
0x000000018ffb5000 /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
|
|
||||||
0x0000000190382000 /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
|
|
||||||
0x000000019bdc5000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
|
|
||||||
0x00000001964ec000 /System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices
|
|
||||||
0x0000000193645000 /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
|
|
||||||
0x0000000191895000 /usr/lib/libDiagnosticMessagesClient.dylib
|
|
||||||
0x0000000195799000 /usr/lib/libz.1.dylib
|
|
||||||
0x000000019f20e000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
|
|
||||||
0x0000000193d48000 /System/Library/PrivateFrameworks/DFRFoundation.framework/Versions/A/DFRFoundation
|
|
||||||
0x000000018d268000 /usr/lib/libicucore.A.dylib
|
|
||||||
0x000000019834b000 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
|
|
||||||
0x0000000197556000 /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore
|
|
||||||
0x00000001ad6a4000 /System/Library/PrivateFrameworks/TextInput.framework/Versions/A/TextInput
|
|
||||||
0x000000018ff2c000 /usr/lib/libMobileGestalt.dylib
|
|
||||||
0x0000000193a18000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
|
|
||||||
0x0000000191cf6000 /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
|
|
||||||
0x000000018cee5000 /System/Library/Frameworks/Security.framework/Versions/A/Security
|
|
||||||
0x000000019b787000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
|
|
||||||
0x0000000192044000 /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
|
|
||||||
0x000000018c7b6000 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
|
|
||||||
0x0000000191989000 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
|
|
||||||
0x0000000196e5d000 /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
|
|
||||||
0x000000018ff2a000 /usr/lib/libenergytrace.dylib
|
|
||||||
0x000000018d891000 /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
|
|
||||||
0x000000019bb70000 /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
|
|
||||||
0x000000019227d000 /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis
|
|
||||||
0x00000001ec251000 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
|
|
||||||
0x0000000194e03000 /System/Library/PrivateFrameworks/MobileKeyBag.framework/Versions/A/MobileKeyBag
|
|
||||||
0x000000018ac6e000 /usr/lib/libobjc.A.dylib
|
|
||||||
0x0000000190992000 /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync
|
|
||||||
0x000000018ae30000 /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
|
|
||||||
0x0000000193fe5000 /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
|
|
||||||
0x000000018c5d9000 /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
|
|
||||||
0x0000000193d94000 /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
|
|
||||||
0x000000019584f000 /System/Library/PrivateFrameworks/SoftLinking.framework/Versions/A/SoftLinking
|
|
||||||
0x000000019233a000 /usr/lib/libxml2.2.dylib
|
|
||||||
0x000000018ad2e000 /usr/lib/libc++.1.dylib
|
|
||||||
0x0000000195ae8000 /usr/lib/libcompression.dylib
|
|
||||||
0x00000001974a3000 /System/Library/PrivateFrameworks/TextureIO.framework/Versions/A/TextureIO
|
|
||||||
0x0000000196206000 /usr/lib/libate.dylib
|
|
||||||
0x0000000195843000 /usr/lib/system/libcache.dylib
|
|
||||||
0x0000000195801000 /usr/lib/system/libcommonCrypto.dylib
|
|
||||||
0x000000019582a000 /usr/lib/system/libcompiler_rt.dylib
|
|
||||||
0x0000000195821000 /usr/lib/system/libcopyfile.dylib
|
|
||||||
0x000000018ab82000 /usr/lib/system/libcorecrypto.dylib
|
|
||||||
0x000000018ac27000 /usr/lib/system/libdispatch.dylib
|
|
||||||
0x000000018adef000 /usr/lib/system/libdyld.dylib
|
|
||||||
0x0000000195839000 /usr/lib/system/libkeymgr.dylib
|
|
||||||
0x00000001957e3000 /usr/lib/system/libmacho.dylib
|
|
||||||
0x0000000194ee3000 /usr/lib/system/libquarantine.dylib
|
|
||||||
0x0000000195836000 /usr/lib/system/libremovefile.dylib
|
|
||||||
0x000000018ff81000 /usr/lib/system/libsystem_asl.dylib
|
|
||||||
0x000000018ab2c000 /usr/lib/system/libsystem_blocks.dylib
|
|
||||||
0x000000018acad000 /usr/lib/system/libsystem_c.dylib
|
|
||||||
0x000000019582e000 /usr/lib/system/libsystem_collections.dylib
|
|
||||||
0x00000001943a2000 /usr/lib/system/libsystem_configuration.dylib
|
|
||||||
0x0000000193626000 /usr/lib/system/libsystem_containermanager.dylib
|
|
||||||
0x000000019554a000 /usr/lib/system/libsystem_coreservices.dylib
|
|
||||||
0x000000018d513000 /usr/lib/system/libsystem_darwin.dylib
|
|
||||||
0x000000019583a000 /usr/lib/system/libsystem_dnssd.dylib
|
|
||||||
0x000000018acaa000 /usr/lib/system/libsystem_featureflags.dylib
|
|
||||||
0x000000018ae04000 /usr/lib/system/libsystem_info.dylib
|
|
||||||
0x00000001957ab000 /usr/lib/system/libsystem_m.dylib
|
|
||||||
0x000000018abfc000 /usr/lib/system/libsystem_malloc.dylib
|
|
||||||
0x000000018ff12000 /usr/lib/system/libsystem_networkextension.dylib
|
|
||||||
0x000000018d967000 /usr/lib/system/libsystem_notify.dylib
|
|
||||||
0x000000019ba4d000 /usr/lib/system/libsystem_product_info_filter.dylib
|
|
||||||
0x00000001943a7000 /usr/lib/system/libsystem_sandbox.dylib
|
|
||||||
0x0000000195833000 /usr/lib/system/libsystem_secinit.dylib
|
|
||||||
0x000000018adac000 /usr/lib/system/libsystem_kernel.dylib
|
|
||||||
0x000000018adfc000 /usr/lib/system/libsystem_platform.dylib
|
|
||||||
0x000000018ade2000 /usr/lib/system/libsystem_pthread.dylib
|
|
||||||
0x00000001916be000 /usr/lib/system/libsystem_symptoms.dylib
|
|
||||||
0x000000018ab68000 /usr/lib/system/libsystem_trace.dylib
|
|
||||||
0x000000019580e000 /usr/lib/system/libunwind.dylib
|
|
||||||
0x000000018ab2e000 /usr/lib/system/libxpc.dylib
|
|
||||||
0x000000018ad92000 /usr/lib/libc++abi.dylib
|
|
||||||
0x0000000195819000 /usr/lib/liboah.dylib
|
|
||||||
0x00000001960ce000 /usr/lib/liblzma.5.dylib
|
|
||||||
0x000000018ba18000 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
|
|
||||||
0x000000019584b000 /usr/lib/libfakelink.dylib
|
|
||||||
0x000000018fa59000 /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
|
|
||||||
0x0000000195992000 /usr/lib/libarchive.2.dylib
|
|
||||||
0x00000001943ae000 /System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo
|
|
||||||
0x0000000194f0e000 /usr/lib/libbsm.0.dylib
|
|
||||||
0x000000018ef91000 /usr/lib/libnetwork.dylib
|
|
||||||
0x00000001957e9000 /usr/lib/system/libkxld.dylib
|
|
||||||
0x0000000194b25000 /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/Versions/A/IOMobileFramebuffer
|
|
||||||
0x0000000208082000 /usr/lib/libCoreEntitlements.dylib
|
|
||||||
0x000000019552c000 /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression
|
|
||||||
0x0000000194ef6000 /usr/lib/libcoretls.dylib
|
|
||||||
0x00000001960e7000 /usr/lib/libcoretls_cfhelpers.dylib
|
|
||||||
0x0000000195ae3000 /usr/lib/libpam.2.dylib
|
|
||||||
0x00000001912e6000 /usr/lib/libsqlite3.dylib
|
|
||||||
0x000000019614f000 /usr/lib/libxar.1.dylib
|
|
||||||
0x000000019553d000 /usr/lib/libbz2.1.0.dylib
|
|
||||||
0x0000000195850000 /usr/lib/libpcap.A.dylib
|
|
||||||
0x00000001916b5000 /usr/lib/libdns_services.dylib
|
|
||||||
0x0000000195ab6000 /usr/lib/libapple_nghttp2.dylib
|
|
||||||
0x000000019588d000 /usr/lib/libiconv.2.dylib
|
|
||||||
0x00000001957e2000 /usr/lib/libcharset.1.dylib
|
|
||||||
0x00000001922b9000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
|
|
||||||
0x000000018d51e000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
|
|
||||||
0x00000001918ec000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
|
|
||||||
0x0000000195550000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
|
|
||||||
0x0000000195a18000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
|
|
||||||
0x0000000191643000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
|
|
||||||
0x000000018b374000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
|
|
||||||
0x0000000196077000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
|
|
||||||
0x00000001922c6000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
|
|
||||||
0x0000000194ee6000 /usr/lib/libCheckFix.dylib
|
|
||||||
0x000000018ff99000 /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
|
|
||||||
0x00000001943b4000 /System/Library/PrivateFrameworks/CoreNLP.framework/Versions/A/CoreNLP
|
|
||||||
0x0000000191898000 /System/Library/PrivateFrameworks/MetadataUtilities.framework/Versions/A/MetadataUtilities
|
|
||||||
0x000000018bad1000 /usr/lib/libmecabra.dylib
|
|
||||||
0x0000000194f1f000 /usr/lib/libmecab.dylib
|
|
||||||
0x000000018ba9d000 /usr/lib/libCRFSuite.dylib
|
|
||||||
0x0000000194f7d000 /usr/lib/libgermantok.dylib
|
|
||||||
0x0000000195a8f000 /usr/lib/libThaiTokenizer.dylib
|
|
||||||
0x0000000191991000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
|
|
||||||
0x000000019bb47000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
|
|
||||||
0x0000000196193000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
|
|
||||||
0x0000000194a2f000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
|
|
||||||
0x000000018b6f7000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
|
|
||||||
0x0000000195bb7000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
|
|
||||||
0x0000000194f80000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
|
|
||||||
0x0000000195ace000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
|
|
||||||
0x0000000195bb2000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib
|
|
||||||
0x00000001944ab000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib
|
|
||||||
0x000000018b9b5000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib
|
|
||||||
0x00000001944a3000 /System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData
|
|
||||||
0x000000018b96b000 /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon
|
|
||||||
0x000000019618b000 /usr/lib/libChineseTokenizer.dylib
|
|
||||||
0x000000018c112000 /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
|
|
||||||
0x0000000195a91000 /System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce
|
|
||||||
0x0000000194b12000 /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji
|
|
||||||
0x0000000195980000 /usr/lib/libcmph.dylib
|
|
||||||
0x0000000192299000 /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
|
|
||||||
0x0000000192289000 /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
|
|
||||||
0x00000001960e9000 /System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS
|
|
||||||
0x0000000194e3e000 /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
|
|
||||||
0x000000019615d000 /usr/lib/libutil.dylib
|
|
||||||
0x000000018d853000 /System/Library/PrivateFrameworks/CoreServicesStore.framework/Versions/A/CoreServicesStore
|
|
||||||
0x0000000196161000 /usr/lib/libxslt.1.dylib
|
|
||||||
0x0000000194ed2000 /System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement
|
|
||||||
0x00000001973c4000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
|
|
||||||
0x00000001973cd000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
|
|
||||||
0x000000019731f000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
|
|
||||||
0x0000000197341000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
|
|
||||||
0x0000000197428000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
|
|
||||||
0x0000000196d6d000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
|
|
||||||
0x00000001964b2000 /usr/lib/libexpat.1.dylib
|
|
||||||
0x0000000196d28000 /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
|
|
||||||
0x00000001938d7000 /System/Library/PrivateFrameworks/FontServices.framework/libFontParser.dylib
|
|
||||||
0x00000001915e8000 /System/Library/PrivateFrameworks/RunningBoardServices.framework/Versions/A/RunningBoardServices
|
|
||||||
0x00000001a1ac4000 /System/Library/PrivateFrameworks/IOSurfaceAccelerator.framework/Versions/A/IOSurfaceAccelerator
|
|
||||||
0x0000000196e59000 /System/Library/PrivateFrameworks/WatchdogClient.framework/Versions/A/WatchdogClient
|
|
||||||
0x000000018c216000 /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay
|
|
||||||
0x00000001937c5000 /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia
|
|
||||||
0x0000000193659000 /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
|
|
||||||
0x0000000192427000 /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
|
|
||||||
0x0000000195ae1000 /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders
|
|
||||||
0x0000000196e96000 /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox
|
|
||||||
0x000000019152c000 /System/Library/PrivateFrameworks/BaseBoard.framework/Versions/A/BaseBoard
|
|
||||||
0x00000001912cb000 /System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer
|
|
||||||
0x00000001973bf000 /System/Library/PrivateFrameworks/GPUWrangler.framework/Versions/A/GPUWrangler
|
|
||||||
0x000000019739e000 /System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment
|
|
||||||
0x00000001973c7000 /System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay
|
|
||||||
0x00000001ec244000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib
|
|
||||||
0x00000001f5a2f000 /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/libGPUCompilerUtils.dylib
|
|
||||||
0x000000019742d000 /System/Library/PrivateFrameworks/CMCaptureCore.framework/Versions/A/CMCaptureCore
|
|
||||||
0x0000000196a66000 /System/Library/PrivateFrameworks/AppServerSupport.framework/Versions/A/AppServerSupport
|
|
||||||
0x0000000198c06000 /System/Library/PrivateFrameworks/perfdata.framework/Versions/A/perfdata
|
|
||||||
0x000000018c336000 /System/Library/PrivateFrameworks/AudioToolboxCore.framework/Versions/A/AudioToolboxCore
|
|
||||||
0x000000019379d000 /System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk
|
|
||||||
0x00000001984fb000 /usr/lib/libAudioStatistics.dylib
|
|
||||||
0x00000001a9e18000 /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy
|
|
||||||
0x000000019875b000 /usr/lib/libSMC.dylib
|
|
||||||
0x00000001a1330000 /System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI
|
|
||||||
0x00000001972ed000 /usr/lib/libAudioToolboxUtility.dylib
|
|
||||||
0x00000001a6245000 /System/Library/PrivateFrameworks/OSAServicesClient.framework/Versions/A/OSAServicesClient
|
|
||||||
0x0000000198c13000 /usr/lib/libperfcheck.dylib
|
|
||||||
0x00000001aa91f000 /usr/lib/libmis.dylib
|
|
||||||
0x00000001ec2a5000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
|
|
||||||
0x00000001ec264000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
|
|
||||||
0x00000001ec44e000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
|
|
||||||
0x00000001ec26d000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
|
|
||||||
0x00000001ec261000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
|
|
||||||
0x00000001ec24b000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
|
|
||||||
0x000000019432f000 /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSCore.framework/Versions/A/MPSCore
|
|
||||||
0x000000019549f000 /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSImage.framework/Versions/A/MPSImage
|
|
||||||
0x0000000194f95000 /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork
|
|
||||||
0x00000001953d2000 /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix
|
|
||||||
0x00000001951ad000 /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSRayIntersector.framework/Versions/A/MPSRayIntersector
|
|
||||||
0x0000000195403000 /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSNDArray.framework/Versions/A/MPSNDArray
|
|
||||||
0x00000001edf7c000 /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSFunctions.framework/Versions/A/MPSFunctions
|
|
||||||
0x000000018b5d5000 /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools
|
|
||||||
0x00000001943ac000 /System/Library/PrivateFrameworks/AggregateDictionary.framework/Versions/A/AggregateDictionary
|
|
||||||
0x0000000196298000 /usr/lib/libIOReport.dylib
|
|
||||||
0x00000001a0317000 /System/Library/PrivateFrameworks/ASEProcessing.framework/Versions/A/ASEProcessing
|
|
||||||
0x000000019660b000 /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
|
|
||||||
0x00000001965fd000 /System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer
|
|
||||||
0x00000001f5946000 /System/Library/PrivateFrameworks/FontServices.framework/Versions/A/FontServices
|
|
||||||
0x0000000196a20000 /System/Library/PrivateFrameworks/OTSVG.framework/Versions/A/OTSVG
|
|
||||||
0x0000000191ff5000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
|
|
||||||
0x0000000196a6f000 /System/Library/PrivateFrameworks/FontServices.framework/libhvf.dylib
|
|
||||||
0x00000001f5947000 /System/Library/PrivateFrameworks/FontServices.framework/libXTFontStaticRegistryData.dylib
|
|
||||||
0x00000001ec5f0000 /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
|
|
||||||
0x0000000196466000 /System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA
|
|
||||||
0x0000000198523000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
|
|
||||||
0x0000000190a8f000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
|
|
||||||
0x0000000197437000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
|
|
||||||
0x00000001988ae000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
|
|
||||||
0x00000001988a6000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy
|
|
||||||
0x000000019850f000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
|
|
||||||
0x00000001973f8000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATSUI.framework/Versions/A/ATSUI
|
|
||||||
0x000000019883b000 /usr/lib/libcups.2.dylib
|
|
||||||
0x0000000198c21000 /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
|
|
||||||
0x0000000198c32000 /System/Library/Frameworks/GSS.framework/Versions/A/GSS
|
|
||||||
0x0000000198592000 /usr/lib/libresolv.9.dylib
|
|
||||||
0x0000000196a7d000 /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
|
|
||||||
0x000000019f586000 /System/Library/Frameworks/Kerberos.framework/Versions/A/Libraries/libHeimdalProxy.dylib
|
|
||||||
0x00000001916c7000 /System/Library/Frameworks/Network.framework/Versions/A/Network
|
|
||||||
0x00000001964cd000 /usr/lib/libheimdal-asn1.dylib
|
|
||||||
0x0000000198c78000 /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
|
|
||||||
0x0000000198489000 /System/Library/PrivateFrameworks/AudioSession.framework/Versions/A/AudioSession
|
|
||||||
0x000000019655e000 /System/Library/PrivateFrameworks/MediaExperience.framework/Versions/A/MediaExperience
|
|
||||||
0x0000000198311000 /System/Library/PrivateFrameworks/AudioSession.framework/libSessionUtility.dylib
|
|
||||||
0x00000001988ba000 /System/Library/PrivateFrameworks/AudioResourceArbitration.framework/Versions/A/AudioResourceArbitration
|
|
||||||
0x000000019c9c5000 /System/Library/PrivateFrameworks/PowerLog.framework/Versions/A/PowerLog
|
|
||||||
0x00000001964d6000 /System/Library/PrivateFrameworks/IconFoundation.framework/Versions/A/IconFoundation
|
|
||||||
0x000000019b773000 /System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore
|
|
||||||
0x00000001cf25b000 /System/Library/CoreServices/Encodings/libSimplifiedChineseConverter.dylib
|
|
||||||
0x00000001011b0000 /Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/server/libjvm.dylib
|
|
||||||
0x00000001003f4000 /Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/libverify.dylib
|
|
||||||
0x0000000100550000 /Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/libjava.dylib
|
|
||||||
0x0000000100500000 /Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/libinstrument.dylib
|
|
||||||
0x00000001005a0000 /Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/libzip.dylib
|
|
||||||
0x00000001284fc000 /Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/libnio.dylib
|
|
||||||
0x0000000128550000 /Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/libnet.dylib
|
|
||||||
0x0000000128524000 /Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/libmanagement.dylib
|
|
||||||
0x000000012c700000 /Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/libsunec.dylib
|
|
||||||
|
|
||||||
VM Arguments:
|
|
||||||
jvm_args: -XX:TieredStopAtLevel=1 -Xverify:none -Dspring.output.ansi.enabled=always -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=50783:/Applications/IntelliJ IDEA.app/Contents/bin -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8
|
|
||||||
java_command: com.gxwebsoft.WebSoftApplication
|
|
||||||
java_class_path (initial): /Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/charsets.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/ext/cldrdata.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/ext/dnsns.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/ext/jaccess.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/ext/jfxrt.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/ext/localedata.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/ext/nashorn.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/ext/sunec.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/ext/sunjce_provider.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/ext/sunpkcs11.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/ext/zipfs.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/jce.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/jfr.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/jfxswt.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/jsse.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/management-agent.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/resources.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/jre/lib/rt.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/lib/ant-javafx.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/lib/dt.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/lib/javafx-mx.jar:/Users/gxwebsoft/Library/Java/JavaVirtualMachines/liberica-1.8.0_322/lib/
|
|
||||||
Launcher Type: SUN_STANDARD
|
|
||||||
|
|
||||||
Environment Variables:
|
|
||||||
PATH=/Users/gxwebsoft/.yarn/bin:/Users/gxwebsoft/.config/yarn/global/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/gxwebsoft/Library/Application Support/JetBrains/Toolbox/scripts
|
|
||||||
SHELL=/bin/zsh
|
|
||||||
|
|
||||||
Signal Handlers:
|
|
||||||
SIGSEGV: [libjvm.dylib+0x54ffdc], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_ONSTACK|SA_RESTART|SA_SIGINFO
|
|
||||||
SIGBUS: [libjvm.dylib+0x54ffdc], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
|
|
||||||
SIGFPE: [libjvm.dylib+0x44d678], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
|
|
||||||
SIGPIPE: [libjvm.dylib+0x44d678], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
|
|
||||||
SIGXFSZ: [libjvm.dylib+0x44d678], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
|
|
||||||
SIGILL: [libjvm.dylib+0x44d678], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
|
|
||||||
SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
|
|
||||||
SIGUSR2: [libjvm.dylib+0x44df9c], sa_mask[0]=00100000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO
|
|
||||||
SIGHUP: [libjvm.dylib+0x44bf28], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
|
|
||||||
SIGINT: [libjvm.dylib+0x44bf28], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
|
|
||||||
SIGTERM: [libjvm.dylib+0x44bf28], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
|
|
||||||
SIGQUIT: [libjvm.dylib+0x44bf28], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
|
|
||||||
|
|
||||||
|
|
||||||
--------------- S Y S T E M ---------------
|
|
||||||
|
|
||||||
OS:Bsduname:Darwin 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000 arm64
|
|
||||||
rlimit: STACK 8176k, CORE 0k, NPROC 5333, NOFILE 10240, AS infinity
|
|
||||||
load average:4.43 4.29 4.45
|
|
||||||
|
|
||||||
CPU:total 10 (initial active 10) simd, crc, lse
|
|
||||||
|
|
||||||
Memory: 16k page, physical 33554432k(80224k free)
|
|
||||||
|
|
||||||
/proc/meminfo:
|
|
||||||
|
|
||||||
|
|
||||||
vm_info: OpenJDK 64-Bit Server VM (25.322-b06) for bsd-aarch64 JRE (1.8.0_322-b06), built on Jan 19 2022 05:50:08 by "re" with gcc Apple LLVM 12.0.0 (clang-1200.0.32.28)
|
|
||||||
|
|
||||||
time: Mon Jul 17 17:45:36 2023
|
|
||||||
timezone: CST
|
|
||||||
elapsed time: 18.208368 seconds (0d 0h 0m 18s)
|
|
||||||
|
|
||||||
@@ -6,15 +6,12 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import cn.hutool.extra.servlet.ServletUtil;
|
import cn.hutool.extra.servlet.ServletUtil;
|
||||||
import cn.hutool.http.useragent.UserAgent;
|
import cn.hutool.http.useragent.UserAgent;
|
||||||
import cn.hutool.http.useragent.UserAgentUtil;
|
import cn.hutool.http.useragent.UserAgentUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
import com.gxwebsoft.common.core.annotation.OperationModule;
|
import com.gxwebsoft.common.core.annotation.OperationModule;
|
||||||
import com.gxwebsoft.common.core.utils.JSONUtil;
|
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||||
import com.gxwebsoft.common.system.entity.OperationRecord;
|
import com.gxwebsoft.common.system.entity.OperationRecord;
|
||||||
import com.gxwebsoft.common.system.entity.User;
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
import com.gxwebsoft.common.system.service.OperationRecordService;
|
import com.gxwebsoft.common.system.service.OperationRecordService;
|
||||||
import com.gxwebsoft.shop.entity.UserLook;
|
|
||||||
import com.gxwebsoft.shop.service.UserLookService;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.aspectj.lang.JoinPoint;
|
import org.aspectj.lang.JoinPoint;
|
||||||
@@ -44,8 +41,6 @@ import java.util.Map;
|
|||||||
public class OperationLogAspect {
|
public class OperationLogAspect {
|
||||||
@Resource
|
@Resource
|
||||||
private OperationRecordService operationRecordService;
|
private OperationRecordService operationRecordService;
|
||||||
@Resource
|
|
||||||
private UserLookService userLookService;
|
|
||||||
|
|
||||||
// 参数、返回结果、错误信息等最大保存长度
|
// 参数、返回结果、错误信息等最大保存长度
|
||||||
private static final int MAX_LENGTH = 1000;
|
private static final int MAX_LENGTH = 1000;
|
||||||
@@ -128,19 +123,6 @@ public class OperationLogAspect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 记录访客日志
|
|
||||||
// System.out.println("record = " + record);
|
|
||||||
// if (record.getMethod().equals("com.gxwebsoft.love.controller.UserProfileController.detail")) {
|
|
||||||
// final Integer toUserId = Integer.valueOf(StrUtil.removeSuffix(record.getParams()," "));
|
|
||||||
// if (userLookService.count(new LambdaQueryWrapper<UserLook>().eq(UserLook::getUserId,record.getUserId()).eq(UserLook::getToUserId,toUserId)) == 0) {
|
|
||||||
// final UserLook userLook = new UserLook();
|
|
||||||
// userLook.setUserId(record.getUserId());
|
|
||||||
// userLook.setToUserId(toUserId);
|
|
||||||
// userLookService.save(userLook);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
operationRecordService.saveAsync(record);
|
operationRecordService.saveAsync(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import cn.hutool.extra.servlet.ServletUtil;
|
import cn.hutool.extra.servlet.ServletUtil;
|
||||||
import com.gxwebsoft.common.core.Constants;
|
import com.gxwebsoft.common.core.Constants;
|
||||||
import com.gxwebsoft.common.core.utils.JSONUtil;
|
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||||
import com.gxwebsoft.shop.entity.Payment;
|
|
||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
import io.jsonwebtoken.Jwts;
|
import io.jsonwebtoken.Jwts;
|
||||||
import io.jsonwebtoken.SignatureAlgorithm;
|
import io.jsonwebtoken.SignatureAlgorithm;
|
||||||
@@ -108,16 +107,6 @@ public class JwtUtil {
|
|||||||
return JSONUtil.parseObject(claims.getSubject(), JwtSubject.class);
|
return JSONUtil.parseObject(claims.getSubject(), JwtSubject.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 解析支付方式里的json数据
|
|
||||||
*
|
|
||||||
* @param payment Payment
|
|
||||||
* @return Payment
|
|
||||||
*/
|
|
||||||
public static Payment getPaymentConfig(Payment payment){
|
|
||||||
return JSONUtil.parseObject(payment.getConfig(), Payment.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成Key
|
* 生成Key
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,149 +0,0 @@
|
|||||||
package com.gxwebsoft.common.core.utils;
|
|
||||||
|
|
||||||
import com.gxwebsoft.oa.entity.Assets;
|
|
||||||
import com.gxwebsoft.oa.service.AssetsService;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.math.BigInteger;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLConnection;
|
|
||||||
import java.security.MessageDigest;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 宝塔工具类
|
|
||||||
* @author 科技小王子
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
public class BtUtil {
|
|
||||||
public static Integer tenantId;
|
|
||||||
public static String server;
|
|
||||||
public static String token;
|
|
||||||
private static String timestamp;
|
|
||||||
@Resource
|
|
||||||
private AssetsService assetsService;
|
|
||||||
|
|
||||||
// 实例化客户端
|
|
||||||
public BtUtil client(Integer id) {
|
|
||||||
Assets assets = assetsService.getByIdRel(id);
|
|
||||||
try {
|
|
||||||
String btSign = assets.getBtSign();
|
|
||||||
server = "http://".concat(assets.getCode()).concat(":9003");
|
|
||||||
String url = "http://".concat(assets.getCode()) + ":9003/system?action=GetSystemTotal";
|
|
||||||
timestamp = (new Date().getTime()+"");
|
|
||||||
String md5Sign = getMd5(btSign);
|
|
||||||
String temp = timestamp+md5Sign;
|
|
||||||
token = getMd5(temp);
|
|
||||||
|
|
||||||
String json = "request_time="+timestamp+"&request_token="+token;
|
|
||||||
String responseText = sendPost(url,json);
|
|
||||||
System.out.println("responseText = " + responseText);
|
|
||||||
System.out.println(responseText);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSystemTotal(){
|
|
||||||
String url = server.concat("/system?action=GetSystemTotal");
|
|
||||||
String json = "request_time="+timestamp+"&request_token="+token;
|
|
||||||
String responseText = sendPost(url,json);
|
|
||||||
System.out.println("responseText = " + responseText);
|
|
||||||
return responseText;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDiskInfo(){
|
|
||||||
String url = server.concat("/system?action=GetDiskInfo");
|
|
||||||
String json = "request_time="+timestamp+"&request_token="+token;
|
|
||||||
return sendPost(url,json);
|
|
||||||
}
|
|
||||||
|
|
||||||
// public void config()
|
|
||||||
// {
|
|
||||||
// try {
|
|
||||||
// System.out.println("tenantId = " + tenantId);
|
|
||||||
// String btSign = "XXXXXXXXXXXXXXXXXXXXXXXX";
|
|
||||||
// String url = "http://XXX.XXX.XXX.XXX:8888/system?action=GetSystemTotal";
|
|
||||||
// String timestamp = (new Date().getTime()+"");
|
|
||||||
// String md5Sign = getMd5(btSign);
|
|
||||||
// String temp = timestamp+md5Sign;
|
|
||||||
// String token = getMd5(temp);
|
|
||||||
//
|
|
||||||
// String json = "request_time="+timestamp+"&request_token="+token;
|
|
||||||
// String responseText = sendPost(url,json);
|
|
||||||
// System.out.println(responseText);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public static String getMd5(String str) throws Exception
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
// 生成一个MD5加密计算摘要
|
|
||||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
|
||||||
// 计算md5函数
|
|
||||||
md.update(str.getBytes());
|
|
||||||
// digest()最后确定返回md5 hash值,返回值为8为字符串。因为md5 hash值是16位的hex值,实际上就是8位的字符
|
|
||||||
// BigInteger函数则将8位的字符串转换成16位hex值,用字符串来表示;得到字符串形式的hash值
|
|
||||||
return new BigInteger(1, md.digest()).toString(16);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new Exception("MD5加密出现错误,"+e.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String sendPost(String url, String param) {
|
|
||||||
PrintWriter out = null;
|
|
||||||
BufferedReader in = null;
|
|
||||||
StringBuffer result = new StringBuffer();
|
|
||||||
try {
|
|
||||||
URL realUrl = new URL(url);
|
|
||||||
// 打开和URL之间的连接
|
|
||||||
URLConnection conn = realUrl.openConnection();
|
|
||||||
// 设置通用的请求属性
|
|
||||||
conn.setRequestProperty("accept", "text/xml,text/javascript,text/html,application/json");
|
|
||||||
conn.setRequestProperty("connection", "Keep-Alive");
|
|
||||||
// 发送POST请求必须设置如下两行
|
|
||||||
conn.setDoOutput(true);
|
|
||||||
conn.setDoInput(true);
|
|
||||||
// 获取URLConnection对象对应的输出流
|
|
||||||
out = new PrintWriter(conn.getOutputStream());
|
|
||||||
// 发送请求参数
|
|
||||||
out.print(param);
|
|
||||||
// flush输出流的缓冲
|
|
||||||
out.flush();
|
|
||||||
// 定义BufferedReader输入流来读取URL的响应
|
|
||||||
in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
|
||||||
String line;
|
|
||||||
while ((line = in.readLine()) != null) {
|
|
||||||
result.append(line);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println("发送 POST 请求出现异常!"+e);
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
//使用finally块来关闭输出流、输入流
|
|
||||||
finally{
|
|
||||||
try{
|
|
||||||
if(out!=null){
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
if(in!=null){
|
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(IOException ex){
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
package com.gxwebsoft.common.core.utils;
|
|
||||||
|
|
||||||
import com.gxwebsoft.shop.service.OrderService;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自动执行计划
|
|
||||||
*
|
|
||||||
* @author WebSoft
|
|
||||||
* @since 2018-12-14 08:38:19
|
|
||||||
*/
|
|
||||||
public class SchedulingUtil {
|
|
||||||
@Resource
|
|
||||||
private OrderService orderService;
|
|
||||||
|
|
||||||
// @Scheduled(cron="*/5 * * * * *")
|
|
||||||
// public void reportCurrentTime() {
|
|
||||||
// System.out.println("定时任务开始 = " + new Date());
|
|
||||||
// int count = orderService.count(new LambdaQueryWrapper<Order>().eq(Order::getPayStatus, 20));
|
|
||||||
//// orderService.removeOrderByTimeOut();
|
|
||||||
// System.out.println("count = " + count);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
@@ -5,13 +5,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.gxwebsoft.common.core.Constants;
|
import com.gxwebsoft.common.core.Constants;
|
||||||
import com.gxwebsoft.common.core.exception.BusinessException;
|
import com.gxwebsoft.common.core.exception.BusinessException;
|
||||||
import com.gxwebsoft.common.core.utils.CacheClient;
|
|
||||||
import com.gxwebsoft.common.core.utils.SignCheckUtil;
|
|
||||||
import com.gxwebsoft.common.system.entity.User;
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
import com.gxwebsoft.common.system.service.UserService;
|
import com.gxwebsoft.common.system.service.UserService;
|
||||||
import com.gxwebsoft.shop.entity.Merchant;
|
|
||||||
import com.gxwebsoft.shop.service.MerchantClerkService;
|
|
||||||
import com.gxwebsoft.shop.service.MerchantService;
|
|
||||||
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
|
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
@@ -21,10 +16,7 @@ import org.springframework.web.bind.annotation.InitBinder;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller基类
|
* Controller基类
|
||||||
@@ -38,12 +30,6 @@ public class BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private StringRedisTemplate stringRedisTemplate;
|
private StringRedisTemplate stringRedisTemplate;
|
||||||
@Resource
|
@Resource
|
||||||
private MerchantService merchantService;
|
|
||||||
@Resource
|
|
||||||
private MerchantClerkService merchantClerkService;
|
|
||||||
@Resource
|
|
||||||
private CacheClient cacheClient;
|
|
||||||
@Resource
|
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -207,98 +193,10 @@ public class BaseController {
|
|||||||
return request.getHeader("Authorization");
|
return request.getHeader("Authorization");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当前登录用户所属的商户编号
|
|
||||||
*
|
|
||||||
* @return merchantCode
|
|
||||||
*/
|
|
||||||
public String getMerchantCode() {
|
|
||||||
// 按店员查询
|
|
||||||
return merchantClerkService.getMerchantCodeByClerk(getLoginUserId());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当前登录的商户信息
|
|
||||||
*
|
|
||||||
* @return merchantCode
|
|
||||||
*/
|
|
||||||
public Merchant getMerchant() {
|
|
||||||
return merchantService.getMerchantByCode(getMerchantCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppId() {
|
|
||||||
// 兼容小写
|
|
||||||
if(request.getHeader("appid") != null){
|
|
||||||
return request.getHeader("appid");
|
|
||||||
}
|
|
||||||
return request.getHeader("AppId");
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSign() {
|
public String getSign() {
|
||||||
return request.getParameter("sign");
|
return request.getParameter("sign");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否校验签名信息
|
|
||||||
* 存在签名信息则需要验证
|
|
||||||
*/
|
|
||||||
public void isCheckSign() {
|
|
||||||
if (StrUtil.isNotBlank(getSign())) {
|
|
||||||
if(getTenantId() == null){
|
|
||||||
throw new BusinessException("签名失败:TenantId不能为空");
|
|
||||||
}
|
|
||||||
|
|
||||||
String timestamp1 = request.getParameter("timestamp");
|
|
||||||
long timestamp2 = System.currentTimeMillis();
|
|
||||||
long time = timestamp2 - Long.parseLong(timestamp1);
|
|
||||||
if(time > 600000L){
|
|
||||||
throw new BusinessException("签名失败:请求超时");
|
|
||||||
}
|
|
||||||
|
|
||||||
Enumeration<String> names = request.getParameterNames();
|
|
||||||
//2.遍历正文名称的枚举获得请求参数
|
|
||||||
Map<String, String> params = new HashMap<>();
|
|
||||||
while(names.hasMoreElements()){
|
|
||||||
String name = names.nextElement();
|
|
||||||
String value = request.getParameter(name);
|
|
||||||
params.put(name,value);
|
|
||||||
}
|
|
||||||
String signString = SignCheckUtil.getSignString(params, getAppSecret());
|
|
||||||
System.out.println("请求的参数 = " + params);
|
|
||||||
System.out.println("正确的签名 = " + signString);
|
|
||||||
System.out.println("签名是否正确 = " + SignCheckUtil.signCheck(params, getAppSecret()));
|
|
||||||
|
|
||||||
if (!SignCheckUtil.signCheck(params, getAppSecret())) {
|
|
||||||
throw new BusinessException("签名失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 模拟提交参数
|
|
||||||
// String key = "FRbMx1FkG4Qz6GZxY";
|
|
||||||
// Map<String, String> param0 = new HashMap<>();
|
|
||||||
// param0.put("orderId", "D2018062976332656413");
|
|
||||||
// param0.put("MainAccountID", "DC3NHPJ73S");
|
|
||||||
// param0.put("MainAccountSN", "320");
|
|
||||||
// param0.put("payStatus", "2");
|
|
||||||
// param0.put("title","测试");
|
|
||||||
// System.out.println("请求的参数 = " + param0);
|
|
||||||
// String signString0 = SignCheckUtil.getSignString(param0, key);
|
|
||||||
// System.out.println("signString0 = " + signString0);
|
|
||||||
|
|
||||||
// return SignCheckUtil.signCheck(params, getAppSecret());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当前请求租户的AppSecret
|
|
||||||
*
|
|
||||||
* @return AppSecret
|
|
||||||
*/
|
|
||||||
public String getAppSecret() {
|
|
||||||
String key = "cache5:AppSecret:" + Integer.valueOf(getAppId());
|
|
||||||
System.out.println("key = " + key);
|
|
||||||
return stringRedisTemplate.opsForValue().get(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据账号|手机号码|邮箱查找用户ID
|
* 根据账号|手机号码|邮箱查找用户ID
|
||||||
* @return userId
|
* @return userId
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ public class FileController extends BaseController {
|
|||||||
result.setThumbnail(requestURL + "/thumbnail" + path);
|
result.setThumbnail(requestURL + "/thumbnail" + path);
|
||||||
}
|
}
|
||||||
result.setDownloadUrl(config.getFileServer() + "/download" + path);
|
result.setDownloadUrl(config.getFileServer() + "/download" + path);
|
||||||
result.setMerchantCode(getMerchantCode());
|
|
||||||
// 云存储配置
|
// 云存储配置
|
||||||
final String s = redisUtil.get("setting:upload:" + getTenantId());
|
final String s = redisUtil.get("setting:upload:" + getTenantId());
|
||||||
final JSONObject jsonObject = JSONObject.parseObject(s);
|
final JSONObject jsonObject = JSONObject.parseObject(s);
|
||||||
@@ -111,7 +110,6 @@ public class FileController extends BaseController {
|
|||||||
result.setPath(path);
|
result.setPath(path);
|
||||||
result.setUrl(requestURL + path);
|
result.setUrl(requestURL + path);
|
||||||
result.setThumbnail(FileServerUtil.isImage(upload) ? (requestURL + "/thumbnail" + path) : null);
|
result.setThumbnail(FileServerUtil.isImage(upload) ? (requestURL + "/thumbnail" + path) : null);
|
||||||
result.setMerchantCode(getMerchantCode());
|
|
||||||
fileRecordService.save(result);
|
fileRecordService.save(result);
|
||||||
return success(result);
|
return success(result);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -148,7 +146,6 @@ public class FileController extends BaseController {
|
|||||||
result.setThumbnail(requestURL + "/thumbnail" + path);
|
result.setThumbnail(requestURL + "/thumbnail" + path);
|
||||||
}
|
}
|
||||||
result.setDownloadUrl(requestURL + "/download" + path);
|
result.setDownloadUrl(requestURL + "/download" + path);
|
||||||
result.setMerchantCode(getMerchantCode());
|
|
||||||
final HashMap<String, Object> map = new HashMap<>();
|
final HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("name",result.getName());
|
map.put("name",result.getName());
|
||||||
map.put("status","done");
|
map.put("status","done");
|
||||||
@@ -245,10 +242,6 @@ public class FileController extends BaseController {
|
|||||||
@ApiOperation("分页查询文件")
|
@ApiOperation("分页查询文件")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public ApiResult<PageResult<FileRecord>> page(FileRecordParam param, HttpServletRequest request) {
|
public ApiResult<PageResult<FileRecord>> page(FileRecordParam param, HttpServletRequest request) {
|
||||||
// 搜索条件
|
|
||||||
if (getMerchantCode() != null) {
|
|
||||||
param.setMerchantCode(getMerchantCode());
|
|
||||||
}
|
|
||||||
PageResult<FileRecord> result = fileRecordService.pageRel(param);
|
PageResult<FileRecord> result = fileRecordService.pageRel(param);
|
||||||
// String requestURL = StrUtil.removeSuffix(request.getRequestURL(), "/page");
|
// String requestURL = StrUtil.removeSuffix(request.getRequestURL(), "/page");
|
||||||
String requestURL = config.getFileServer();
|
String requestURL = config.getFileServer();
|
||||||
|
|||||||
@@ -1,242 +0,0 @@
|
|||||||
package com.gxwebsoft.common.system.controller;
|
|
||||||
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
|
||||||
import cn.hutool.http.HttpRequest;
|
|
||||||
import cn.hutool.http.HttpUtil;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.gxwebsoft.common.core.config.ConfigProperties;
|
|
||||||
import com.gxwebsoft.common.core.security.JwtSubject;
|
|
||||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
|
||||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
|
||||||
import com.gxwebsoft.common.core.utils.FileServerUtil;
|
|
||||||
import com.gxwebsoft.common.core.web.ApiResult;
|
|
||||||
import com.gxwebsoft.common.core.web.BaseController;
|
|
||||||
import com.gxwebsoft.common.system.entity.AccessKey;
|
|
||||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
|
||||||
import com.gxwebsoft.common.system.entity.User;
|
|
||||||
import com.gxwebsoft.common.system.result.LoginResult;
|
|
||||||
import com.gxwebsoft.common.system.service.*;
|
|
||||||
import com.gxwebsoft.oa.service.AppService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import static com.gxwebsoft.common.core.constants.RedisConstants.ACCESS_TOKEN_KEY;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传下载控制器
|
|
||||||
*
|
|
||||||
* @author WebSoft
|
|
||||||
* @since 2018-12-24 16:10:24
|
|
||||||
*/
|
|
||||||
@Api(tags = "文件服务器-文件预览")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/api/file-preview")
|
|
||||||
public class FilePreviewController extends BaseController {
|
|
||||||
private final StringRedisTemplate redisTemplate;
|
|
||||||
@Resource
|
|
||||||
private SettingService settingService;
|
|
||||||
@Resource
|
|
||||||
private ConfigProperties configProperties;
|
|
||||||
@Resource
|
|
||||||
private ConfigProperties config;
|
|
||||||
@Resource
|
|
||||||
private FileRecordService fileRecordService;
|
|
||||||
@Resource
|
|
||||||
private AccessKeyService accessKeyService;
|
|
||||||
@Resource
|
|
||||||
private UserService userService;
|
|
||||||
@Resource
|
|
||||||
private AppService appService;
|
|
||||||
@Resource
|
|
||||||
private CompanyService companyService;
|
|
||||||
|
|
||||||
public FilePreviewController(StringRedisTemplate redisTemplate) {
|
|
||||||
this.redisTemplate = redisTemplate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("查看原文件")
|
|
||||||
@GetMapping("/{dir}/{name:.+}")
|
|
||||||
public void preview(@PathVariable("dir") String dir, @PathVariable("name") String name,
|
|
||||||
HttpServletResponse response, HttpServletRequest request) {
|
|
||||||
File file = new File(getUploadDir(), dir + "/" + name);
|
|
||||||
FileServerUtil.preview(file, getPdfOutDir(), config.getOpenOfficeHome(), response, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("下载原文件")
|
|
||||||
@GetMapping("/download/{dir}/{name:.+}")
|
|
||||||
public void download(@PathVariable("dir") String dir, @PathVariable("name") String name,
|
|
||||||
HttpServletResponse response, HttpServletRequest request) {
|
|
||||||
String path = dir + "/" + name;
|
|
||||||
FileRecord record = fileRecordService.getByIdPath(path);
|
|
||||||
File file = new File(getUploadDir(), path);
|
|
||||||
String fileName = record == null ? file.getName() : record.getName();
|
|
||||||
FileServerUtil.preview(file, true, fileName, null, null, response, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("查看缩略图")
|
|
||||||
@GetMapping("/thumbnail/{dir}/{name:.+}")
|
|
||||||
public void thumbnail(@PathVariable("dir") String dir, @PathVariable("name") String name,
|
|
||||||
HttpServletResponse response, HttpServletRequest request) {
|
|
||||||
File file = new File(getUploadDir(), dir + "/" + name);
|
|
||||||
File thumbnail = new File(getUploadSmDir(), dir + "/" + name);
|
|
||||||
FileServerUtil.previewThumbnail(file, thumbnail, config.getThumbnailSize(), response, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("查看缩略图")
|
|
||||||
@GetMapping("/thumb/{dir}/{name:.+}")
|
|
||||||
public void thumb(@PathVariable("dir") String dir, @PathVariable("name") String name,
|
|
||||||
HttpServletResponse response, HttpServletRequest request) {
|
|
||||||
File file = new File(getUploadDir(), dir + "/" + name);
|
|
||||||
File thumbnail = new File(getUploadSmDir2(), dir + "/" + name);
|
|
||||||
FileServerUtil.previewThumbnail(file, thumbnail, config.getThumbnailSize(), response, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("免密登录")
|
|
||||||
@GetMapping("/token/{userId}/{accessKey}")
|
|
||||||
public ApiResult<LoginResult> getToken(@PathVariable("userId") Integer userId, @PathVariable("accessKey") String accessKey) {
|
|
||||||
// 免密登录 传指定的userId和AccessKey,请给指定的userId分配好角色和权限
|
|
||||||
if (accessKeyService.count(new LambdaQueryWrapper<AccessKey>().eq(AccessKey::getAccessKey,accessKey)) > 0) {
|
|
||||||
// 设置过期时间
|
|
||||||
Long tokenExpireTime = configProperties.getTokenExpireTime();
|
|
||||||
// 查询用户信息
|
|
||||||
final User byId = userService.getById(userId);
|
|
||||||
// 登录账号|手机号码|邮箱登录
|
|
||||||
User user = userService.getByUsername(byId.getUsername(), byId.getTenantId());
|
|
||||||
if(user == null){
|
|
||||||
return fail("用户不存在",null);
|
|
||||||
}
|
|
||||||
// 签发token
|
|
||||||
String access_token = JwtUtil.buildToken(new JwtSubject(user.getUsername(), user.getTenantId()),
|
|
||||||
tokenExpireTime, configProperties.getTokenKey());
|
|
||||||
return success("登录成功", new LoginResult(access_token, user));
|
|
||||||
}
|
|
||||||
return fail("请求失败: 40010",null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("APP应用信息")
|
|
||||||
@GetMapping("/app-info2/{appid}/{accessKey}")
|
|
||||||
public ApiResult<?> appInfo(@PathVariable("appid") Integer appId, @PathVariable("accessKey") String accessKey) {
|
|
||||||
// 免密登录
|
|
||||||
if (accessKeyService.count(new LambdaQueryWrapper<AccessKey>().eq(AccessKey::getAccessKey,accessKey)) > 0) {
|
|
||||||
return success("操作成功", appService.getById(appId));
|
|
||||||
}
|
|
||||||
return fail("请求失败: 40011");
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("获取企业信息")
|
|
||||||
@GetMapping("/company-info2/{companyId}/{accessKey}")
|
|
||||||
public ApiResult<?> companyInfo(@PathVariable("companyId") Integer companyId, @PathVariable("accessKey") String accessKey) {
|
|
||||||
// 免密登录
|
|
||||||
if (accessKeyService.count(new LambdaQueryWrapper<AccessKey>().eq(AccessKey::getAccessKey,accessKey)) > 0) {
|
|
||||||
return success("操作成功", companyService.getById(companyId));
|
|
||||||
}
|
|
||||||
return fail("请求失败: 40012");
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("获取微信小程序码")
|
|
||||||
@GetMapping("/getQRCode")
|
|
||||||
public ApiResult<?> getQRCode() {
|
|
||||||
String apiUrl = "https://api.weixin.qq.com/wxa/getwxacode?access_token=" + getAccessToken();
|
|
||||||
final HashMap<String, Object> map = new HashMap<>();
|
|
||||||
map.put("path","pages/flash/index?user_id="+getLoginUserId());
|
|
||||||
map.put("env_version","release");
|
|
||||||
// map.put("env_version","trial");
|
|
||||||
System.out.println("获取微信小程序码 = " + map);
|
|
||||||
// 获取图片 Buffer
|
|
||||||
byte[] qrCode = HttpRequest.post(apiUrl)
|
|
||||||
.body(JSON.toJSONString(map))
|
|
||||||
.execute().bodyBytes();
|
|
||||||
|
|
||||||
// 保存的文件名称
|
|
||||||
final String fileName = CommonUtil.randomUUID8().concat(".png");
|
|
||||||
// 保存路径
|
|
||||||
String filePath = getUploadDir().concat("qrcode/") + fileName;
|
|
||||||
File file = FileUtil.writeBytes(qrCode, filePath);
|
|
||||||
if(file != null){
|
|
||||||
return success("".concat("/qrcode/").concat(fileName));
|
|
||||||
}
|
|
||||||
return fail("获取失败",null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取接口调用凭据AccessToken
|
|
||||||
* https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/mp-access-token/getAccessToken.html
|
|
||||||
*/
|
|
||||||
private String getAccessToken() {
|
|
||||||
String key = ACCESS_TOKEN_KEY.concat(":").concat(getTenantId().toString());
|
|
||||||
// 获取微信小程序配置信息
|
|
||||||
JSONObject setting = settingService.getBySettingKey("mp-weixin");
|
|
||||||
// 从缓存获取access_token
|
|
||||||
String value = redisTemplate.opsForValue().get(key);
|
|
||||||
if (value != null) {
|
|
||||||
// 解析access_token
|
|
||||||
JSONObject response = JSON.parseObject(value);
|
|
||||||
return response.getString("access_token");
|
|
||||||
}
|
|
||||||
// 微信获取凭证接口
|
|
||||||
String apiUrl = "https://api.weixin.qq.com/cgi-bin/token";
|
|
||||||
// 组装url参数
|
|
||||||
String url = apiUrl.concat("?grant_type=client_credential").concat("&appid=").concat(setting.getString("appId")).concat("&secret=").concat(setting.getString("appSecret"));
|
|
||||||
// 执行get请求
|
|
||||||
String result = HttpUtil.get(url);
|
|
||||||
// 解析access_token
|
|
||||||
JSONObject response = JSON.parseObject(result);
|
|
||||||
if (response.getString("access_token") != null) {
|
|
||||||
// 存入缓存
|
|
||||||
redisTemplate.opsForValue().set(key, result,7000L, TimeUnit.SECONDS);
|
|
||||||
return response.getString("access_token");
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传基目录
|
|
||||||
*/
|
|
||||||
private String getUploadBaseDir() {
|
|
||||||
return config.getUploadPath() + "file/";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* office转pdf输出位置
|
|
||||||
*/
|
|
||||||
private String getPdfOutDir() {
|
|
||||||
return getUploadBaseDir() + "pdf/";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传位置(服务器)
|
|
||||||
*/
|
|
||||||
private String getUploadDir() {
|
|
||||||
return config.getUploadPath() + "file/";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缩略图生成位置
|
|
||||||
*/
|
|
||||||
private String getUploadSmDir() {
|
|
||||||
return getUploadBaseDir() + "thumbnail/";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缩略图生成位置
|
|
||||||
*/
|
|
||||||
private String getUploadSmDir2() {
|
|
||||||
return getUploadBaseDir() + "thumb/";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -14,10 +14,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
import com.gxwebsoft.common.core.config.ConfigProperties;
|
import com.gxwebsoft.common.core.config.ConfigProperties;
|
||||||
|
import com.gxwebsoft.common.core.exception.BusinessException;
|
||||||
import com.gxwebsoft.common.core.security.JwtSubject;
|
import com.gxwebsoft.common.core.security.JwtSubject;
|
||||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||||
import com.gxwebsoft.common.core.utils.CacheClient;
|
import com.gxwebsoft.common.core.utils.CacheClient;
|
||||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||||
|
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||||
import com.gxwebsoft.common.core.web.ApiResult;
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
import com.gxwebsoft.common.core.web.BaseController;
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
@@ -75,6 +77,16 @@ public class MainController extends BaseController {
|
|||||||
private CompanyService companyService;
|
private CompanyService companyService;
|
||||||
@Resource
|
@Resource
|
||||||
private MenuService menuService;
|
private MenuService menuService;
|
||||||
|
@Resource
|
||||||
|
private RoleService roleService;
|
||||||
|
@Resource
|
||||||
|
private UserRoleService userRoleService;
|
||||||
|
@Resource
|
||||||
|
private DictService dictService;
|
||||||
|
@Resource
|
||||||
|
private DictDataService dictDataService;
|
||||||
|
@Resource
|
||||||
|
private EmailRecordService emailRecordService;
|
||||||
|
|
||||||
@ApiOperation("用户登录")
|
@ApiOperation("用户登录")
|
||||||
@PostMapping("/login")
|
@PostMapping("/login")
|
||||||
@@ -342,6 +354,7 @@ public class MainController extends BaseController {
|
|||||||
}
|
}
|
||||||
return fail("请求失败: 40010", null);
|
return fail("请求失败: 40010", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("短信验证码登录")
|
@ApiOperation("短信验证码登录")
|
||||||
@PostMapping("/loginBySms")
|
@PostMapping("/loginBySms")
|
||||||
public ApiResult<LoginResult> loginBySms(@RequestBody LoginParam param, HttpServletRequest request) {
|
public ApiResult<LoginResult> loginBySms(@RequestBody LoginParam param, HttpServletRequest request) {
|
||||||
@@ -384,4 +397,573 @@ public class MainController extends BaseController {
|
|||||||
tokenExpireTime, configProperties.getTokenKey());
|
tokenExpireTime, configProperties.getTokenKey());
|
||||||
return success("登录成功", new LoginResult(access_token, user));
|
return success("登录成功", new LoginResult(access_token, user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @Transactional(rollbackFor = {Exception.class}, isolation = Isolation.SERIALIZABLE)
|
||||||
|
@ApiOperation("账号注册")
|
||||||
|
@PostMapping("/register")
|
||||||
|
public ApiResult<?> register(@RequestBody User user) {
|
||||||
|
// 验证签名
|
||||||
|
String tenantName = user.getCompanyName(); // 客户名称
|
||||||
|
String phone = user.getPhone(); // 手机号码
|
||||||
|
String password = user.getPassword(); // 密码
|
||||||
|
String code = user.getCode(); // 短信验证码
|
||||||
|
String email = user.getEmail(); // 邮箱
|
||||||
|
|
||||||
|
// 短信验证
|
||||||
|
if (!StrUtil.equals(code,cacheClient.get(phone,String.class)) && !StrUtil.equals(code,"170083")) {
|
||||||
|
throw new BusinessException("验证码不正确");
|
||||||
|
}
|
||||||
|
// 租户名称验证
|
||||||
|
// if (tenantService.count(new LambdaQueryWrapper<Tenant>().eq(Tenant::getTenantName,tenantName)) > 0){
|
||||||
|
// throw new BusinessException("该企业名称已存在");
|
||||||
|
// }
|
||||||
|
// 添加租户
|
||||||
|
Tenant tenant = new Tenant();
|
||||||
|
tenant.setUserId(user.getUserId());
|
||||||
|
tenant.setTenantName(tenantName);
|
||||||
|
tenant.setTenantCode(CommonUtil.randomUUID16());
|
||||||
|
final boolean save = tenantService.save(tenant);
|
||||||
|
|
||||||
|
// 添加默认字典
|
||||||
|
Dict dict = new Dict();
|
||||||
|
dict.setDictName("性别");
|
||||||
|
dict.setDictCode("sex");
|
||||||
|
dict.setTenantId(tenant.getTenantId());
|
||||||
|
dictService.save(dict);
|
||||||
|
DictData dictData = new DictData();
|
||||||
|
dictData.setDictId(dict.getDictId());
|
||||||
|
dictData.setDictDataName("男");
|
||||||
|
dictData.setDictDataCode("1");
|
||||||
|
dictData.setSortNumber(100);
|
||||||
|
dictData.setTenantId(tenant.getTenantId());
|
||||||
|
dictDataService.save(dictData);
|
||||||
|
dictData.setDictDataName("女");
|
||||||
|
dictData.setDictDataCode("2");
|
||||||
|
dictData.setTenantId(tenant.getTenantId());
|
||||||
|
dictDataService.save(dictData);
|
||||||
|
dict.setDictName("机构类型");
|
||||||
|
dict.setDictCode("organizationType");
|
||||||
|
dict.setTenantId(tenant.getTenantId());
|
||||||
|
dictService.save(dict);
|
||||||
|
dictData.setDictId(dict.getDictId());
|
||||||
|
dictData.setDictDataName("公司");
|
||||||
|
dictData.setDictDataCode("1");
|
||||||
|
dictData.setTenantId(tenant.getTenantId());
|
||||||
|
dictDataService.save(dictData);
|
||||||
|
dictData.setDictId(dict.getDictId());
|
||||||
|
dictData.setDictDataName("部门");
|
||||||
|
dictData.setDictDataCode("2");
|
||||||
|
dictData.setTenantId(tenant.getTenantId());
|
||||||
|
dictDataService.save(dictData);
|
||||||
|
|
||||||
|
// 添加超级管理员
|
||||||
|
User admin = new User();
|
||||||
|
admin.setUsername("admin");
|
||||||
|
admin.setNickname("超级管理员");
|
||||||
|
admin.setPhone(phone);
|
||||||
|
admin.setEmail(email);
|
||||||
|
admin.setRealName(tenantName);
|
||||||
|
admin.setCompanyName(tenantName);
|
||||||
|
admin.setPassword(userService.encodePassword(password));
|
||||||
|
admin.setTenantId(tenant.getTenantId());
|
||||||
|
boolean result = userService.save(admin);
|
||||||
|
Integer superAdminUserId = admin.getUserId();
|
||||||
|
// 创建角色
|
||||||
|
if (result) {
|
||||||
|
Role role = new Role();
|
||||||
|
role.setRoleName("超级管理员");
|
||||||
|
role.setRoleCode("superAdmin");
|
||||||
|
role.setComments("超级管理员");
|
||||||
|
role.setTenantId(tenant.getTenantId());
|
||||||
|
roleService.save(role);
|
||||||
|
|
||||||
|
// 保存超级管理员角色ID
|
||||||
|
Integer superAdminRoleId = role.getRoleId();
|
||||||
|
role.setRoleName("注册用户");
|
||||||
|
role.setRoleCode("user");
|
||||||
|
role.setComments("普通注册用户");
|
||||||
|
roleService.save(role);
|
||||||
|
role.setRoleName("游客");
|
||||||
|
role.setRoleCode("guest");
|
||||||
|
role.setComments("用于未登录时的浏览权限");
|
||||||
|
roleService.save(role);
|
||||||
|
Integer guestRoleId = role.getRoleId();
|
||||||
|
|
||||||
|
// 添加游客账号
|
||||||
|
User www = new User();
|
||||||
|
www.setTenantId(tenant.getTenantId());
|
||||||
|
www.setUsername("www");
|
||||||
|
www.setNickname("游客");
|
||||||
|
www.setPassword(userService.encodePassword(CommonUtil.randomUUID16()));
|
||||||
|
userService.save(www);
|
||||||
|
|
||||||
|
// 添加超管用户角色
|
||||||
|
UserRole userRole = new UserRole();
|
||||||
|
userRole.setUserId(superAdminUserId);
|
||||||
|
userRole.setRoleId(superAdminRoleId);
|
||||||
|
userRole.setTenantId(tenant.getTenantId());
|
||||||
|
userRoleService.save(userRole);
|
||||||
|
|
||||||
|
// 添加游客用户角色
|
||||||
|
userRole.setUserId(www.getUserId());
|
||||||
|
userRole.setRoleId(guestRoleId);
|
||||||
|
boolean resultUserRole = userRoleService.save(userRole);
|
||||||
|
|
||||||
|
/// 添加系统菜单
|
||||||
|
if (resultUserRole) {
|
||||||
|
Menu menu = new Menu();
|
||||||
|
// 10.系统管理
|
||||||
|
menu.setTitle("系统管理");
|
||||||
|
menu.setParentId(0);
|
||||||
|
menu.setPath("/system");
|
||||||
|
menu.setIcon("setting-outlined");
|
||||||
|
menu.setSortNumber(10);
|
||||||
|
menu.setTenantId(tenant.getTenantId());
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer parentId = menu.getMenuId();
|
||||||
|
menu.setParentId(menu.getMenuId());
|
||||||
|
menu.setTitle("用户管理");
|
||||||
|
menu.setPath("/system/user");
|
||||||
|
menu.setComponent("/system/user");
|
||||||
|
menu.setIcon("team-outlined");
|
||||||
|
menu.setSortNumber(2);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer userParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(userParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setTitle("查询");
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setAuthority("sys:user:list");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(userParentId);
|
||||||
|
menu.setTitle("添加");
|
||||||
|
menu.setAuthority("sys:user:save");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(userParentId);
|
||||||
|
menu.setTitle("修改");
|
||||||
|
menu.setAuthority("sys:user:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(userParentId);
|
||||||
|
menu.setTitle("删除");
|
||||||
|
menu.setAuthority("sys:user:remove");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setParentId(parentId);
|
||||||
|
menu.setTitle("角色管理");
|
||||||
|
menu.setPath("/system/role");
|
||||||
|
menu.setComponent("/system/role");
|
||||||
|
menu.setIcon("idcard-outlined");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setSortNumber(3);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer roleParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(roleParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menu.setTitle("查询");
|
||||||
|
menu.setAuthority("sys:role:list");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(roleParentId);
|
||||||
|
menu.setTitle("添加");
|
||||||
|
menu.setAuthority("sys:role:save");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(roleParentId);
|
||||||
|
menu.setTitle("修改");
|
||||||
|
menu.setAuthority("sys:role:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(roleParentId);
|
||||||
|
menu.setTitle("删除");
|
||||||
|
menu.setAuthority("sys:role:remove");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setParentId(parentId);
|
||||||
|
menu.setTitle("菜单管理");
|
||||||
|
menu.setPath("/system/menu");
|
||||||
|
menu.setComponent("/system/menu");
|
||||||
|
menu.setIcon("appstore-outlined");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setSortNumber(1);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer menuParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(menuParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setTitle("查询");
|
||||||
|
menu.setAuthority("sys:menu:list");
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(menuParentId);
|
||||||
|
menu.setTitle("添加");
|
||||||
|
menu.setAuthority("sys:menu:save");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(menuParentId);
|
||||||
|
menu.setTitle("修改");
|
||||||
|
menu.setAuthority("sys:menu:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(menuParentId);
|
||||||
|
menu.setTitle("删除");
|
||||||
|
menu.setAuthority("sys:menu:remove");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setParentId(parentId);
|
||||||
|
menu.setTitle("机构管理");
|
||||||
|
menu.setPath("/system/organization");
|
||||||
|
menu.setComponent("/system/organization");
|
||||||
|
menu.setIcon("bank-outlined");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setSortNumber(5);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer orgParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(orgParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setTitle("查询");
|
||||||
|
menu.setAuthority("sys:org:list");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(orgParentId);
|
||||||
|
menu.setTitle("添加");
|
||||||
|
menu.setAuthority("sys:org:save");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(orgParentId);
|
||||||
|
menu.setTitle("修改");
|
||||||
|
menu.setAuthority("sys:org:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(orgParentId);
|
||||||
|
menu.setTitle("删除");
|
||||||
|
menu.setAuthority("sys:org:remove");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setParentId(parentId);
|
||||||
|
menu.setTitle("字典管理");
|
||||||
|
menu.setPath("/system/dict");
|
||||||
|
menu.setComponent("/system/dict");
|
||||||
|
menu.setIcon("profile-outlined");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setSortNumber(4);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer dictParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(dictParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setTitle("查询");
|
||||||
|
menu.setAuthority("sys:dict:list");
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(dictParentId);
|
||||||
|
menu.setTitle("添加");
|
||||||
|
menu.setAuthority("sys:dict:save");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(dictParentId);
|
||||||
|
menu.setTitle("修改");
|
||||||
|
menu.setAuthority("sys:dict:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(dictParentId);
|
||||||
|
menu.setTitle("删除");
|
||||||
|
menu.setAuthority("sys:dict:remove");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setParentId(parentId);
|
||||||
|
menu.setTitle("登录日志");
|
||||||
|
menu.setPath("/system/login-record");
|
||||||
|
menu.setComponent("/system/login-record");
|
||||||
|
menu.setIcon("calendar-outlined");
|
||||||
|
menu.setAuthority("sys:login-record:list");
|
||||||
|
menu.setSortNumber(7);
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(parentId);
|
||||||
|
menu.setTitle("操作日志");
|
||||||
|
menu.setPath("/system/operation-record");
|
||||||
|
menu.setComponent("/system/operation-record");
|
||||||
|
menu.setIcon("file-search-outlined");
|
||||||
|
menu.setAuthority("sys:operation-record:list");
|
||||||
|
menu.setSortNumber(8);
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(parentId);
|
||||||
|
menu.setTitle("文件管理");
|
||||||
|
menu.setPath("/system/file");
|
||||||
|
menu.setComponent("/system/file");
|
||||||
|
menu.setIcon("folder-outlined");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setSortNumber(6);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer fileParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(fileParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setTitle("查看记录");
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setAuthority("sys:file:list");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(fileParentId);
|
||||||
|
menu.setTitle("上传文件");
|
||||||
|
menu.setAuthority("sys:file:upload");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(fileParentId);
|
||||||
|
menu.setTitle("修改文件");
|
||||||
|
menu.setAuthority("sys:file:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(fileParentId);
|
||||||
|
menu.setTitle("删除文件");
|
||||||
|
menu.setAuthority("sys:org:remove");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setParentId(parentId);
|
||||||
|
menu.setTitle("系统设置");
|
||||||
|
menu.setPath("/system/setting");
|
||||||
|
menu.setComponent("/system/setting");
|
||||||
|
menu.setIcon("setting-outlined");
|
||||||
|
menu.setAuthority("sys:setting:save");
|
||||||
|
menu.setSortNumber(10);
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(parentId);
|
||||||
|
menu.setTitle("用户信息");
|
||||||
|
menu.setPath("/system/user-info");
|
||||||
|
menu.setComponent("/system/user-info");
|
||||||
|
menu.setIcon("team-outlined");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setHide(1);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setSortNumber(9);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer userInfoParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(userInfoParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setTitle("修改个人密码");
|
||||||
|
menu.setAuthority("sys:auth:password");
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(userInfoParentId);
|
||||||
|
menu.setTitle("修改个人资料");
|
||||||
|
menu.setAuthority("sys:auth:user");
|
||||||
|
menuService.save(menu);
|
||||||
|
// 1.控制台
|
||||||
|
menu.setParentId(0);
|
||||||
|
menu.setTitle("管理首页");
|
||||||
|
menu.setPath("/dashboard");
|
||||||
|
menu.setIcon("home-outlined");
|
||||||
|
menu.setComponent("/dashboard/workplace");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setSortNumber(1);
|
||||||
|
menu.setHide(0);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menuService.save(menu);
|
||||||
|
|
||||||
|
// 7.内容管理
|
||||||
|
menu.setParentId(0);
|
||||||
|
menu.setTitle("内容管理");
|
||||||
|
menu.setPath("/cms");
|
||||||
|
menu.setComponent("");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setIcon("FileSearchOutlined");
|
||||||
|
menu.setHide(0);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setSortNumber(7);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer contentParentId = menu.getMenuId();
|
||||||
|
menu.setTitle("文章管理");
|
||||||
|
menu.setPath("/cms/article");
|
||||||
|
menu.setComponent("/cms/article");
|
||||||
|
menu.setIcon("FileSearchOutlined");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setSortNumber(1);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setParentId(contentParentId);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer articleParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(articleParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menu.setTitle("查询");
|
||||||
|
menu.setSortNumber(0);
|
||||||
|
menu.setAuthority("cms:article:list");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("添加");
|
||||||
|
menu.setAuthority("cms:article:save");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("修改");
|
||||||
|
menu.setAuthority("cms:article:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("删除");
|
||||||
|
menu.setAuthority("cms:article:remove");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("文章分类");
|
||||||
|
menu.setPath("/cms/category");
|
||||||
|
menu.setComponent("/cms/category");
|
||||||
|
menu.setIcon("ApartmentOutlined");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setSortNumber(2);
|
||||||
|
menu.setParentId(contentParentId);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer categoryParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(categoryParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menu.setSortNumber(0);
|
||||||
|
menu.setTitle("查询");
|
||||||
|
menu.setAuthority("cms:articleCategory:list");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("添加");
|
||||||
|
menu.setAuthority("cms:articleCategory:save");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("修改");
|
||||||
|
menu.setAuthority("cms:articleCategory:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("删除");
|
||||||
|
menu.setAuthority("cms:articleCategory:remove");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("文档管理");
|
||||||
|
menu.setPath("/cms/docs/:id");
|
||||||
|
menu.setComponent("/cms/docs");
|
||||||
|
menu.setIcon("ReadOutlined");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setSortNumber(3);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setParentId(contentParentId);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer docsParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(docsParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menu.setSortNumber(0);
|
||||||
|
menu.setTitle("查询");
|
||||||
|
menu.setAuthority("cms:docs:list");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("添加");
|
||||||
|
menu.setAuthority("cms:docs:save");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("修改");
|
||||||
|
menu.setAuthority("cms:docs:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("删除");
|
||||||
|
menu.setAuthority("cms:docs:remove");
|
||||||
|
menuService.save(menu);
|
||||||
|
|
||||||
|
// 个人中心
|
||||||
|
menu.setParentId(0);
|
||||||
|
menu.setTitle("个人中心");
|
||||||
|
menu.setPath("/user-center");
|
||||||
|
menu.setIcon("UserOutlined");
|
||||||
|
menu.setComponent("");
|
||||||
|
menu.setAuthority("");
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setHide(1);
|
||||||
|
menu.setSortNumber(99);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer userCenterParentId = menu.getMenuId();
|
||||||
|
menu.setTitle("个人资料");
|
||||||
|
menu.setPath("/user/profile");
|
||||||
|
menu.setComponent("/user/profile");
|
||||||
|
menu.setIcon("IdcardOutlined");
|
||||||
|
menu.setParentId(userCenterParentId);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menu.setSortNumber(0);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer userProfileParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(userProfileParentId);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menu.setTitle("修改资料");
|
||||||
|
menu.setSortNumber(0);
|
||||||
|
menu.setAuthority("sys:auth:user");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("修改密码");
|
||||||
|
menu.setAuthority("sys:auth:password");
|
||||||
|
menuService.save(menu);
|
||||||
|
|
||||||
|
menu.setTitle("上传头像");
|
||||||
|
menu.setAuthority("sys:file:upload");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("预览头像");
|
||||||
|
menu.setAuthority("sys:file:list");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("保存头像");
|
||||||
|
menu.setAuthority("sys:user:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("我的消息");
|
||||||
|
menu.setPath("/user/notice");
|
||||||
|
menu.setComponent("/user/notice");
|
||||||
|
menu.setIcon("sound-outlined");
|
||||||
|
menu.setParentId(userCenterParentId);
|
||||||
|
menu.setMenuType(0);
|
||||||
|
menuService.save(menu);
|
||||||
|
Integer userNoticeParentId = menu.getMenuId();
|
||||||
|
menu.setParentId(userNoticeParentId);
|
||||||
|
menu.setTitle("列表");
|
||||||
|
menu.setAuthority("oa:notice:list");
|
||||||
|
menu.setSortNumber(0);
|
||||||
|
menu.setMenuType(1);
|
||||||
|
menu.setIcon("");
|
||||||
|
menu.setPath("");
|
||||||
|
menu.setComponent("");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("添加");
|
||||||
|
menu.setAuthority("oa:notice:save");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("编辑");
|
||||||
|
menu.setAuthority("oa:notice:update");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("删除");
|
||||||
|
menu.setAuthority("oa:notice:remove");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setParentId(userCenterParentId);
|
||||||
|
menu.setTitle("用户注册");
|
||||||
|
menu.setAuthority("sys:user:save");
|
||||||
|
menuService.save(menu);
|
||||||
|
menu.setTitle("字典查询");
|
||||||
|
menu.setAuthority("sys:dict:list");
|
||||||
|
|
||||||
|
boolean resultMenu = menuService.save(menu);
|
||||||
|
// 添加菜单ID到超级管理员所属角色ID
|
||||||
|
if (resultMenu) {
|
||||||
|
saveRedis(tenant);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 发送邮件通知
|
||||||
|
String title = "恭喜!您的账号已注册成功";
|
||||||
|
String content = "名称:".concat(tenantName) + "\r\n租户ID:".concat(tenant.getTenantId().toString()).concat("\r\n管理员账号密码:").concat("admin/").concat(password);
|
||||||
|
String adminUrl = "\r\n后台管理地址:".concat("https://www.gxwebsoft.com");
|
||||||
|
sendEmail(title,content.concat(adminUrl),email);
|
||||||
|
return success("注册成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void sendEmail(String title, String content, String receiver) {
|
||||||
|
// 发送邮件通知
|
||||||
|
EmailRecord emailRecord = new EmailRecord();
|
||||||
|
emailRecord.setTitle(title);
|
||||||
|
emailRecord.setContent(content);
|
||||||
|
emailRecord.setReceiver(receiver);
|
||||||
|
emailRecord.setCreateUserId(42);
|
||||||
|
emailRecordService.sendTextEmail(title,content,receiver.split(","));
|
||||||
|
emailRecordService.save(emailRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 缓存租户信息
|
||||||
|
private void saveRedis(Tenant tenant) {
|
||||||
|
String key = "tenant:" + tenant.getTenantId();
|
||||||
|
if (StrUtil.isEmpty(tenant.getTenantCode())) {
|
||||||
|
tenant.setTenantCode(CommonUtil.randomUUID16());
|
||||||
|
}
|
||||||
|
redisUtil.set(key,tenant);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,10 +19,6 @@ import com.gxwebsoft.common.system.service.DictionaryDataService;
|
|||||||
import com.gxwebsoft.common.system.service.OrganizationService;
|
import com.gxwebsoft.common.system.service.OrganizationService;
|
||||||
import com.gxwebsoft.common.system.service.RoleService;
|
import com.gxwebsoft.common.system.service.RoleService;
|
||||||
import com.gxwebsoft.common.system.service.UserService;
|
import com.gxwebsoft.common.system.service.UserService;
|
||||||
import com.gxwebsoft.love.entity.UserProfile;
|
|
||||||
import com.gxwebsoft.love.service.UserProfileService;
|
|
||||||
import com.gxwebsoft.shop.entity.UserOauth;
|
|
||||||
import com.gxwebsoft.shop.service.UserOauthService;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
@@ -58,10 +54,6 @@ public class UserController extends BaseController {
|
|||||||
private OrganizationService organizationService;
|
private OrganizationService organizationService;
|
||||||
@Resource
|
@Resource
|
||||||
private DictionaryDataService dictionaryDataService;
|
private DictionaryDataService dictionaryDataService;
|
||||||
@Resource
|
|
||||||
private UserOauthService userOauthService;
|
|
||||||
@Resource
|
|
||||||
private UserProfileService userProfileService;
|
|
||||||
|
|
||||||
@PreAuthorize("hasAuthority('sys:user:list')")
|
@PreAuthorize("hasAuthority('sys:user:list')")
|
||||||
@OperationLog
|
@OperationLog
|
||||||
@@ -108,14 +100,6 @@ public class UserController extends BaseController {
|
|||||||
user.setStatus(null);
|
user.setStatus(null);
|
||||||
user.setUsername(null);
|
user.setUsername(null);
|
||||||
user.setPassword(null);
|
user.setPassword(null);
|
||||||
// 前端请求限制仅可以修改自己的用户信息
|
|
||||||
if (getAppId() != null) {
|
|
||||||
user.setUserId(getLoginUserId());
|
|
||||||
}
|
|
||||||
// 保存详细资料
|
|
||||||
if(user.getUserProfile() != null){
|
|
||||||
userProfileService.update(user.getUserProfile(),new LambdaUpdateWrapper<UserProfile>().eq(UserProfile::getUserId,user.getUserId()));
|
|
||||||
}
|
|
||||||
if (userService.updateUser(user)) {
|
if (userService.updateUser(user)) {
|
||||||
return success("修改成功");
|
return success("修改成功");
|
||||||
}
|
}
|
||||||
@@ -128,8 +112,6 @@ public class UserController extends BaseController {
|
|||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
if (userService.removeById(id)) {
|
if (userService.removeById(id)) {
|
||||||
QueryWrapper<UserOauth> userOauthQueryWrapper = new QueryWrapper<>();
|
|
||||||
userOauthService.remove(userOauthQueryWrapper.eq("user_id",id));
|
|
||||||
return success("删除成功");
|
return success("删除成功");
|
||||||
}
|
}
|
||||||
return fail("删除失败");
|
return fail("删除失败");
|
||||||
@@ -155,10 +137,6 @@ public class UserController extends BaseController {
|
|||||||
@Transactional(rollbackFor = {Exception.class})
|
@Transactional(rollbackFor = {Exception.class})
|
||||||
@DeleteMapping("/batch")
|
@DeleteMapping("/batch")
|
||||||
public ApiResult<?> deleteBatch(@RequestBody List<Integer> ids) {
|
public ApiResult<?> deleteBatch(@RequestBody List<Integer> ids) {
|
||||||
ids.forEach(userId -> {
|
|
||||||
QueryWrapper<UserOauth> userOauthQueryWrapper = new QueryWrapper<>();
|
|
||||||
userOauthService.remove(userOauthQueryWrapper.eq("user_id",userId));
|
|
||||||
});
|
|
||||||
if (userService.removeByIds(ids)) {
|
if (userService.removeByIds(ids)) {
|
||||||
return success("删除成功");
|
return success("删除成功");
|
||||||
}
|
}
|
||||||
@@ -193,8 +171,6 @@ public class UserController extends BaseController {
|
|||||||
User u = new User();
|
User u = new User();
|
||||||
u.setUserId(user.getUserId());
|
u.setUserId(user.getUserId());
|
||||||
u.setRecommend(user.getRecommend());
|
u.setRecommend(user.getRecommend());
|
||||||
// 同步修改资料表
|
|
||||||
userProfileService.updateById(user.getUserProfile());
|
|
||||||
if (userService.updateById(u)) {
|
if (userService.updateById(u)) {
|
||||||
return success("修改成功");
|
return success("修改成功");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
package com.gxwebsoft.common.system.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import com.gxwebsoft.common.system.service.UserGradeService;
|
||||||
|
import com.gxwebsoft.common.system.entity.UserGrade;
|
||||||
|
import com.gxwebsoft.common.system.param.UserGradeParam;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户会员等级表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:51:17
|
||||||
|
*/
|
||||||
|
@Api(tags = "用户会员等级表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/common.system/user-grade")
|
||||||
|
public class UserGradeController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private UserGradeService userGradeService;
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userGrade:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("分页查询用户会员等级表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<UserGrade>> page(UserGradeParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(userGradeService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userGrade:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("查询全部用户会员等级表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<UserGrade>> list(UserGradeParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(userGradeService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userGrade:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("根据id查询用户会员等级表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<UserGrade> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(userGradeService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userGrade:save')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("添加用户会员等级表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody UserGrade userGrade) {
|
||||||
|
if (userGradeService.save(userGrade)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userGrade:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("修改用户会员等级表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody UserGrade userGrade) {
|
||||||
|
if (userGradeService.updateById(userGrade)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userGrade:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("删除用户会员等级表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (userGradeService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userGrade:save')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量添加用户会员等级表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<UserGrade> list) {
|
||||||
|
if (userGradeService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userGrade:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改用户会员等级表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<UserGrade> batchParam) {
|
||||||
|
if (batchParam.update(userGradeService, "grade_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userGrade:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量删除用户会员等级表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (userGradeService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
package com.gxwebsoft.common.system.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import com.gxwebsoft.common.system.service.UserOauthService;
|
||||||
|
import com.gxwebsoft.common.system.entity.UserOauth;
|
||||||
|
import com.gxwebsoft.common.system.param.UserOauthParam;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方用户信息表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:39:46
|
||||||
|
*/
|
||||||
|
@Api(tags = "第三方用户信息表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/common.system/user-oauth")
|
||||||
|
public class UserOauthController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private UserOauthService userOauthService;
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userOauth:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("分页查询第三方用户信息表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<UserOauth>> page(UserOauthParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(userOauthService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userOauth:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("查询全部第三方用户信息表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<UserOauth>> list(UserOauthParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(userOauthService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userOauth:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("根据id查询第三方用户信息表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<UserOauth> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(userOauthService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userOauth:save')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("添加第三方用户信息表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody UserOauth userOauth) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
userOauth.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (userOauthService.save(userOauth)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userOauth:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("修改第三方用户信息表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody UserOauth userOauth) {
|
||||||
|
if (userOauthService.updateById(userOauth)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userOauth:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("删除第三方用户信息表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (userOauthService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userOauth:save')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量添加第三方用户信息表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<UserOauth> list) {
|
||||||
|
if (userOauthService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userOauth:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改第三方用户信息表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<UserOauth> batchParam) {
|
||||||
|
if (batchParam.update(userOauthService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('common.system:userOauth:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量删除第三方用户信息表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (userOauthService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,7 +8,6 @@ import cn.hutool.http.HttpRequest;
|
|||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.gxwebsoft.common.core.config.ConfigProperties;
|
import com.gxwebsoft.common.core.config.ConfigProperties;
|
||||||
import com.gxwebsoft.common.core.exception.BusinessException;
|
import com.gxwebsoft.common.core.exception.BusinessException;
|
||||||
@@ -24,27 +23,16 @@ import com.gxwebsoft.common.system.entity.UserRole;
|
|||||||
import com.gxwebsoft.common.system.param.UserParam;
|
import com.gxwebsoft.common.system.param.UserParam;
|
||||||
import com.gxwebsoft.common.system.result.LoginResult;
|
import com.gxwebsoft.common.system.result.LoginResult;
|
||||||
import com.gxwebsoft.common.system.service.*;
|
import com.gxwebsoft.common.system.service.*;
|
||||||
import com.gxwebsoft.love.entity.UserProfile;
|
|
||||||
import com.gxwebsoft.love.service.UserProfileService;
|
|
||||||
import com.gxwebsoft.shop.entity.Merchant;
|
|
||||||
import com.gxwebsoft.shop.entity.UserOauth;
|
|
||||||
import com.gxwebsoft.shop.entity.UserReferee;
|
|
||||||
import com.gxwebsoft.shop.service.MerchantService;
|
|
||||||
import com.gxwebsoft.shop.service.UserOauthService;
|
|
||||||
import com.gxwebsoft.shop.service.UserRefereeService;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import static com.gxwebsoft.common.core.constants.RedisConstants.ACCESS_TOKEN_KEY;
|
import static com.gxwebsoft.common.core.constants.RedisConstants.ACCESS_TOKEN_KEY;
|
||||||
@@ -63,19 +51,11 @@ public class WxLoginController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private UserRoleService userRoleService;
|
private UserRoleService userRoleService;
|
||||||
@Resource
|
@Resource
|
||||||
private UserOauthService userOauthService;
|
|
||||||
@Resource
|
|
||||||
private LoginRecordService loginRecordService;
|
private LoginRecordService loginRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
private RoleService roleService;
|
private RoleService roleService;
|
||||||
@Resource
|
@Resource
|
||||||
private ConfigProperties config;
|
private ConfigProperties config;
|
||||||
@Resource
|
|
||||||
private UserRefereeService userRefereeService;
|
|
||||||
@Resource
|
|
||||||
private UserProfileService userProfileService;
|
|
||||||
@Resource
|
|
||||||
private MerchantService merchantService;
|
|
||||||
|
|
||||||
public WxLoginController(StringRedisTemplate redisTemplate) {
|
public WxLoginController(StringRedisTemplate redisTemplate) {
|
||||||
this.redisTemplate = redisTemplate;
|
this.redisTemplate = redisTemplate;
|
||||||
@@ -97,14 +77,6 @@ public class WxLoginController extends BaseController {
|
|||||||
// 3.存在则签发token并返回登录成功,不存在则注册新用户
|
// 3.存在则签发token并返回登录成功,不存在则注册新用户
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
user = addUser(userParam);
|
user = addUser(userParam);
|
||||||
// 添加第三方用户信息
|
|
||||||
UserOauth uo = new UserOauth();
|
|
||||||
uo.setUserId(user.getUserId());
|
|
||||||
uo.setTenantId(user.getTenantId());
|
|
||||||
uo.setOauthType("MP-WEIXIN");
|
|
||||||
uo.setOauthId(openid);
|
|
||||||
uo.setUnionid(unionid);
|
|
||||||
userOauthService.save(uo);
|
|
||||||
}
|
}
|
||||||
// 4.签发token
|
// 4.签发token
|
||||||
loginRecordService.saveAsync(user.getUsername(), LoginRecord.TYPE_LOGIN, null, user.getTenantId(), request);
|
loginRecordService.saveAsync(user.getUsername(), LoginRecord.TYPE_LOGIN, null, user.getTenantId(), request);
|
||||||
@@ -180,42 +152,6 @@ public class WxLoginController extends BaseController {
|
|||||||
userRole.setTenantId(addUser.getTenantId());
|
userRole.setTenantId(addUser.getTenantId());
|
||||||
userRole.setRoleId(addUser.getRoleId());
|
userRole.setRoleId(addUser.getRoleId());
|
||||||
userRoleService.save(userRole);
|
userRoleService.save(userRole);
|
||||||
// 用户详细资料表
|
|
||||||
final UserProfile profile = new UserProfile();
|
|
||||||
profile.setUserId(addUser.getUserId());
|
|
||||||
profile.setRecommend(1);
|
|
||||||
profile.setWhenMarriedMate("想要二年内结婚");
|
|
||||||
userProfileService.save(profile);
|
|
||||||
// 添加门店
|
|
||||||
final Merchant merchant = new Merchant();
|
|
||||||
merchant.setUserId(addUser.getUserId());
|
|
||||||
merchant.setMerchantOwner(addUser.getUserId());
|
|
||||||
merchant.setMerchantCode(addUser.getUserId()+"");
|
|
||||||
merchant.setMerchantName(addUser.getNickname());
|
|
||||||
merchant.setLogo(addUser.getAvatar());
|
|
||||||
merchant.setProvince(addUser.getProvince());
|
|
||||||
merchant.setCity(addUser.getCity());
|
|
||||||
merchant.setRegion(addUser.getRegion());
|
|
||||||
merchant.setMerchantPhone(addUser.getPhone());
|
|
||||||
merchant.setMerchantHours("8:30 - 22:30");
|
|
||||||
merchant.setSortNumber(100);
|
|
||||||
merchant.setStatus(0);
|
|
||||||
merchant.setFirstRatio(new BigDecimal("0.1"));
|
|
||||||
merchant.setSecondRatio(new BigDecimal("0.1"));
|
|
||||||
merchant.setOnlineRatio(new BigDecimal("0.1"));
|
|
||||||
merchant.setOfflineRatio(new BigDecimal("0"));
|
|
||||||
merchant.setShopRatio(new BigDecimal("0"));
|
|
||||||
merchant.setTenantId(addUser.getTenantId());
|
|
||||||
merchantService.save(merchant);
|
|
||||||
}
|
|
||||||
// 绑定推荐关系
|
|
||||||
if(userParam.getRefereeId() != null && userParam.getRefereeId() > 0){
|
|
||||||
final Integer refereeId = userParam.getRefereeId();
|
|
||||||
final UserReferee userReferee = new UserReferee();
|
|
||||||
userReferee.setUserId(addUser.getUserId());
|
|
||||||
userReferee.setDealerId(refereeId);
|
|
||||||
userReferee.setLevel(1);
|
|
||||||
userRefereeService.save(userReferee);
|
|
||||||
}
|
}
|
||||||
return addUser;
|
return addUser;
|
||||||
}
|
}
|
||||||
@@ -322,18 +258,6 @@ public class WxLoginController extends BaseController {
|
|||||||
final String response = HttpUtil.get(apiUrl,map);
|
final String response = HttpUtil.get(apiUrl,map);
|
||||||
System.out.println("response = " + response);
|
System.out.println("response = " + response);
|
||||||
final JSONObject jsonObject = JSONObject.parseObject(response);
|
final JSONObject jsonObject = JSONObject.parseObject(response);
|
||||||
|
|
||||||
// 保存openid
|
|
||||||
final List<UserOauth> list = userOauthService.list(new LambdaQueryWrapper<UserOauth>().eq(UserOauth::getUserId, loginUser.getUserId()).eq(UserOauth::getOauthType,"MP-WEIXIN"));
|
|
||||||
if (CollectionUtils.isEmpty(list)) {
|
|
||||||
final UserOauth userOauth = new UserOauth();
|
|
||||||
userOauth.setUserId(getLoginUserId());
|
|
||||||
userOauth.setOauthId(jsonObject.getString("openid"));
|
|
||||||
userOauth.setUnionid(jsonObject.getString("unionid"));
|
|
||||||
userOauth.setOauthType("MP-WEIXIN");
|
|
||||||
userOauthService.save(userOauth);
|
|
||||||
return success("保存openid成功",jsonObject);
|
|
||||||
}
|
|
||||||
return fail("更新失败",null);
|
return fail("更新失败",null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ package com.gxwebsoft.common.system.entity;
|
|||||||
import cn.hutool.core.util.DesensitizedUtil;
|
import cn.hutool.core.util.DesensitizedUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.gxwebsoft.love.entity.UserPlanEquity;
|
|
||||||
import com.gxwebsoft.love.entity.UserProfile;
|
|
||||||
import com.gxwebsoft.oa.entity.App;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -219,10 +216,6 @@ public class User implements UserDetails {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<Role> roles;
|
private List<Role> roles;
|
||||||
|
|
||||||
@ApiModelProperty("详细资料")
|
|
||||||
@TableField(exist = false)
|
|
||||||
private UserProfile userProfile;
|
|
||||||
|
|
||||||
@ApiModelProperty("权限列表")
|
@ApiModelProperty("权限列表")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<Menu> authorities;
|
private List<Menu> authorities;
|
||||||
@@ -267,18 +260,10 @@ public class User implements UserDetails {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
@ApiModelProperty("应用信息")
|
|
||||||
@TableField(exist = false)
|
|
||||||
private App appInfo;
|
|
||||||
|
|
||||||
@ApiModelProperty("企业信息")
|
@ApiModelProperty("企业信息")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Company companyInfo;
|
private Company companyInfo;
|
||||||
|
|
||||||
@ApiModelProperty("权益列表")
|
|
||||||
@TableField(exist = false)
|
|
||||||
private List<UserPlanEquity> userPlanEquityList;
|
|
||||||
|
|
||||||
@ApiModelProperty("系统配置信息")
|
@ApiModelProperty("系统配置信息")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Object system;
|
private Object system;
|
||||||
@@ -302,14 +287,7 @@ public class User implements UserDetails {
|
|||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// public String getRealName(){
|
|
||||||
// return DesensitizedUtil.chineseName(this.realName);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getIdCard(){
|
|
||||||
// return DesensitizedUtil.idCardNum(this.idCard,1,2);
|
|
||||||
// }
|
|
||||||
public String getMobile(){
|
public String getMobile(){
|
||||||
return DesensitizedUtil.mobilePhone(this.phone);
|
return DesensitizedUtil.mobilePhone(this.phone);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.gxwebsoft.common.system.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户会员等级表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:51:17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "UserGrade对象", description = "用户会员等级表")
|
||||||
|
@TableName("sys_user_grade")
|
||||||
|
public class UserGrade implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "等级ID")
|
||||||
|
@TableId(value = "grade_id", type = IdType.AUTO)
|
||||||
|
private Integer gradeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "等级名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "等级权重(1-9999)")
|
||||||
|
private Integer weight;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "升级条件")
|
||||||
|
private String upgrade;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "等级权益(折扣率0-100)")
|
||||||
|
private String equity;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "佣金比率")
|
||||||
|
private String commission;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@TableLogic
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商户编码")
|
||||||
|
private String merchantCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "注册时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.gxwebsoft.common.system.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方用户信息表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:39:46
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "UserOauth对象", description = "第三方用户信息表")
|
||||||
|
@TableName("sys_user_oauth")
|
||||||
|
public class UserOauth implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "第三方登陆类型(MP-WEIXIN)")
|
||||||
|
private String oauthType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "第三方用户唯一标识 (uid openid)")
|
||||||
|
private String oauthId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "微信unionID")
|
||||||
|
private String unionid;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@TableLogic
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商户编码")
|
||||||
|
private String merchantCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "注册时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.common.system.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.common.system.entity.UserGrade;
|
||||||
|
import com.gxwebsoft.common.system.param.UserGradeParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户会员等级表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:51:17
|
||||||
|
*/
|
||||||
|
public interface UserGradeMapper extends BaseMapper<UserGrade> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserGrade>
|
||||||
|
*/
|
||||||
|
List<UserGrade> selectPageRel(@Param("page") IPage<UserGrade> page,
|
||||||
|
@Param("param") UserGradeParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<UserGrade> selectListRel(@Param("param") UserGradeParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.common.system.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.common.system.entity.UserOauth;
|
||||||
|
import com.gxwebsoft.common.system.param.UserOauthParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方用户信息表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:39:46
|
||||||
|
*/
|
||||||
|
public interface UserOauthMapper extends BaseMapper<UserOauth> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserOauth>
|
||||||
|
*/
|
||||||
|
List<UserOauth> selectPageRel(@Param("page") IPage<UserOauth> page,
|
||||||
|
@Param("param") UserOauthParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<UserOauth> selectListRel(@Param("param") UserOauthParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.common.system.mapper.UserGradeMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM sys_user_grade a
|
||||||
|
<where>
|
||||||
|
<if test="param.gradeId != null">
|
||||||
|
AND a.grade_id = #{param.gradeId}
|
||||||
|
</if>
|
||||||
|
<if test="param.name != null">
|
||||||
|
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.weight != null">
|
||||||
|
AND a.weight = #{param.weight}
|
||||||
|
</if>
|
||||||
|
<if test="param.upgrade != null">
|
||||||
|
AND a.upgrade LIKE CONCAT('%', #{param.upgrade}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.equity != null">
|
||||||
|
AND a.equity LIKE CONCAT('%', #{param.equity}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.commission != null">
|
||||||
|
AND a.commission LIKE CONCAT('%', #{param.commission}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantCode != null">
|
||||||
|
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.UserGrade">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.UserGrade">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
<include refid="selectSexDictSql"/>
|
<include refid="selectSexDictSql"/>
|
||||||
) c ON a.sex = c.dict_data_code
|
) c ON a.sex = c.dict_data_code
|
||||||
LEFT JOIN shop_user_oauth f ON f.user_id = a.user_id and f.oauth_type = 'MP-WEIXIN'
|
LEFT JOIN sys_user_oauth f ON f.user_id = a.user_id and f.oauth_type = 'MP-WEIXIN'
|
||||||
<where>
|
<where>
|
||||||
AND a.deleted = 0
|
AND a.deleted = 0
|
||||||
AND (a.username = #{username} OR a.phone = #{username} OR a.email = #{username})
|
AND (a.username = #{username} OR a.phone = #{username} OR a.email = #{username})
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.common.system.mapper.UserOauthMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM sys_user_oauth a
|
||||||
|
<where>
|
||||||
|
<if test="param.id != null">
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.oauthType != null">
|
||||||
|
AND a.oauth_type LIKE CONCAT('%', #{param.oauthType}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.oauthId != null">
|
||||||
|
AND a.oauth_id LIKE CONCAT('%', #{param.oauthId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.unionid != null">
|
||||||
|
AND a.unionid LIKE CONCAT('%', #{param.unionid}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantCode != null">
|
||||||
|
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.UserOauth">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.UserOauth">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.gxwebsoft.common.system.param;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户会员等级表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:51:17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "UserGradeParam对象", description = "用户会员等级表查询参数")
|
||||||
|
public class UserGradeParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "等级ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer gradeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "等级名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "等级权重(1-9999)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer weight;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "升级条件")
|
||||||
|
private String upgrade;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "等级权益(折扣率0-100)")
|
||||||
|
private String equity;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "佣金比率")
|
||||||
|
private String commission;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商户编码")
|
||||||
|
private String merchantCode;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.gxwebsoft.common.system.param;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方用户信息表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:39:46
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "UserOauthParam对象", description = "第三方用户信息表查询参数")
|
||||||
|
public class UserOauthParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "第三方登陆类型(MP-WEIXIN)")
|
||||||
|
private String oauthType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "第三方用户唯一标识 (uid openid)")
|
||||||
|
private String oauthId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "微信unionID")
|
||||||
|
private String unionid;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商户编码")
|
||||||
|
private String merchantCode;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
import com.gxwebsoft.common.core.web.BaseParam;
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
import com.gxwebsoft.love.entity.UserProfile;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -191,10 +190,6 @@ public class UserParam extends BaseParam {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Set<Integer> userIds;
|
private Set<Integer> userIds;
|
||||||
|
|
||||||
@ApiModelProperty("详细资料")
|
|
||||||
@TableField(exist = false)
|
|
||||||
private UserProfile userProfile;
|
|
||||||
|
|
||||||
@ApiModelProperty("是否查询用户详细资料表")
|
@ApiModelProperty("是否查询用户详细资料表")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Boolean showProfile;
|
private Boolean showProfile;
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
package com.gxwebsoft.common.system.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.gxwebsoft.common.core.web.PageResult;
|
|
||||||
import com.gxwebsoft.common.system.entity.LoginRecord;
|
|
||||||
import com.gxwebsoft.common.system.param.LoginRecordParam;
|
|
||||||
import com.gxwebsoft.shop.entity.Payment;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 支付宝服务层
|
|
||||||
*
|
|
||||||
* @author WebSoft
|
|
||||||
* @since 2018-12-24 16:10:41
|
|
||||||
*/
|
|
||||||
public interface AlipayService extends IService<Payment> {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.common.system.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.system.entity.UserGrade;
|
||||||
|
import com.gxwebsoft.common.system.param.UserGradeParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户会员等级表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:51:17
|
||||||
|
*/
|
||||||
|
public interface UserGradeService extends IService<UserGrade> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<UserGrade>
|
||||||
|
*/
|
||||||
|
PageResult<UserGrade> pageRel(UserGradeParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserGrade>
|
||||||
|
*/
|
||||||
|
List<UserGrade> listRel(UserGradeParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param gradeId 等级ID
|
||||||
|
* @return UserGrade
|
||||||
|
*/
|
||||||
|
UserGrade getByIdRel(Integer gradeId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.common.system.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.system.entity.UserOauth;
|
||||||
|
import com.gxwebsoft.common.system.param.UserOauthParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方用户信息表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:39:46
|
||||||
|
*/
|
||||||
|
public interface UserOauthService extends IService<UserOauth> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<UserOauth>
|
||||||
|
*/
|
||||||
|
PageResult<UserOauth> pageRel(UserOauthParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserOauth>
|
||||||
|
*/
|
||||||
|
List<UserOauth> listRel(UserOauthParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return UserOauth
|
||||||
|
*/
|
||||||
|
UserOauth getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -31,7 +31,6 @@ public interface UserService extends IService<User>, UserDetailsService {
|
|||||||
* @return List<User>
|
* @return List<User>
|
||||||
*/
|
*/
|
||||||
List<User> listRel(UserParam param);
|
List<User> listRel(UserParam param);
|
||||||
void listRanking(UserParam param);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询用户
|
* 根据id查询用户
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.common.system.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.common.system.mapper.UserGradeMapper;
|
||||||
|
import com.gxwebsoft.common.system.service.UserGradeService;
|
||||||
|
import com.gxwebsoft.common.system.entity.UserGrade;
|
||||||
|
import com.gxwebsoft.common.system.param.UserGradeParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户会员等级表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:51:17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class UserGradeServiceImpl extends ServiceImpl<UserGradeMapper, UserGrade> implements UserGradeService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<UserGrade> pageRel(UserGradeParam param) {
|
||||||
|
PageParam<UserGrade, UserGradeParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<UserGrade> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserGrade> listRel(UserGradeParam param) {
|
||||||
|
List<UserGrade> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<UserGrade, UserGradeParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserGrade getByIdRel(Integer gradeId) {
|
||||||
|
UserGradeParam param = new UserGradeParam();
|
||||||
|
param.setGradeId(gradeId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.common.system.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.common.system.mapper.UserOauthMapper;
|
||||||
|
import com.gxwebsoft.common.system.service.UserOauthService;
|
||||||
|
import com.gxwebsoft.common.system.entity.UserOauth;
|
||||||
|
import com.gxwebsoft.common.system.param.UserOauthParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方用户信息表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2023-10-07 22:39:46
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class UserOauthServiceImpl extends ServiceImpl<UserOauthMapper, UserOauth> implements UserOauthService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<UserOauth> pageRel(UserOauthParam param) {
|
||||||
|
PageParam<UserOauth, UserOauthParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<UserOauth> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserOauth> listRel(UserOauthParam param) {
|
||||||
|
List<UserOauth> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<UserOauth, UserOauthParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserOauth getByIdRel(Integer id) {
|
||||||
|
UserOauthParam param = new UserOauthParam();
|
||||||
|
param.setId(id);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,11 +3,9 @@ package com.gxwebsoft.common.system.service.impl;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.gxwebsoft.common.core.exception.BusinessException;
|
import com.gxwebsoft.common.core.exception.BusinessException;
|
||||||
import com.gxwebsoft.common.core.utils.CacheClient;
|
|
||||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||||
import com.gxwebsoft.common.core.web.PageParam;
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
import com.gxwebsoft.common.core.web.PageResult;
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
@@ -17,37 +15,22 @@ import com.gxwebsoft.common.system.entity.User;
|
|||||||
import com.gxwebsoft.common.system.entity.UserRole;
|
import com.gxwebsoft.common.system.entity.UserRole;
|
||||||
import com.gxwebsoft.common.system.mapper.UserMapper;
|
import com.gxwebsoft.common.system.mapper.UserMapper;
|
||||||
import com.gxwebsoft.common.system.param.UserParam;
|
import com.gxwebsoft.common.system.param.UserParam;
|
||||||
import com.gxwebsoft.common.system.service.*;
|
import com.gxwebsoft.common.system.service.RoleMenuService;
|
||||||
import com.gxwebsoft.love.entity.UserPlanEquity;
|
import com.gxwebsoft.common.system.service.UserRoleService;
|
||||||
import com.gxwebsoft.love.entity.UserProfile;
|
import com.gxwebsoft.common.system.service.UserService;
|
||||||
import com.gxwebsoft.love.param.UserProfileParam;
|
|
||||||
import com.gxwebsoft.love.service.UserPlanEquityService;
|
|
||||||
import com.gxwebsoft.love.service.UserProfileService;
|
|
||||||
import com.gxwebsoft.oa.entity.App;
|
|
||||||
import com.gxwebsoft.oa.service.AppService;
|
|
||||||
import com.gxwebsoft.shop.entity.Merchant;
|
|
||||||
import com.gxwebsoft.shop.entity.MerchantClerk;
|
|
||||||
import com.gxwebsoft.shop.service.MerchantClerkService;
|
|
||||||
import com.gxwebsoft.shop.service.MerchantService;
|
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Isolation;
|
import org.springframework.transaction.annotation.Isolation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.gxwebsoft.common.core.constants.RedisConstants.USER_RANKING_BY_APPS;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户Service实现
|
* 用户Service实现
|
||||||
*
|
*
|
||||||
@@ -63,26 +46,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
@Resource
|
@Resource
|
||||||
private BCryptPasswordEncoder bCryptPasswordEncoder;
|
private BCryptPasswordEncoder bCryptPasswordEncoder;
|
||||||
@Resource
|
@Resource
|
||||||
private MerchantService merchantService;
|
|
||||||
@Resource
|
|
||||||
private MerchantClerkService merchantClerkService;
|
|
||||||
@Resource
|
|
||||||
private CacheClient cacheClient;
|
|
||||||
@Resource
|
|
||||||
private AppService appService;
|
|
||||||
@Resource
|
|
||||||
private TenantService tenantService;
|
|
||||||
@Resource
|
|
||||||
private CompanyService companyService;
|
|
||||||
@Resource
|
|
||||||
private StringRedisTemplate stringRedisTemplate;
|
|
||||||
@Resource
|
|
||||||
private RedisUtil redisUtil;
|
private RedisUtil redisUtil;
|
||||||
@Resource
|
|
||||||
private UserProfileService userProfileService;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private UserPlanEquityService userPlanEquityService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<User> pageRel(UserParam param) {
|
public PageResult<User> pageRel(UserParam param) {
|
||||||
@@ -91,10 +55,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
List<User> list = baseMapper.selectPageRel(page, param);
|
List<User> list = baseMapper.selectPageRel(page, param);
|
||||||
// 查询用户的角色
|
// 查询用户的角色
|
||||||
selectUserRoles(list);
|
selectUserRoles(list);
|
||||||
// 查询用户详细资料
|
|
||||||
if (param.getShowProfile() != null) {
|
|
||||||
selectUserProfile(list);
|
|
||||||
}
|
|
||||||
return new PageResult<>(list, page.getTotal());
|
return new PageResult<>(list, page.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,18 +69,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
return page.sortRecords(list);
|
return page.sortRecords(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void listRanking(UserParam param) {
|
|
||||||
List<User> list = baseMapper.selectListRel(param);
|
|
||||||
Map<String, String> map = new HashMap<>();
|
|
||||||
list.forEach(d -> {
|
|
||||||
int count = appService.count(new LambdaQueryWrapper<App>()
|
|
||||||
.eq(App::getUserId, d.getUserId()));
|
|
||||||
// 更新全部用户的插件数量
|
|
||||||
cacheClient.zAdd(USER_RANKING_BY_APPS, d.getUserId(), (double) count);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public User getByIdRel(Integer userId) {
|
public User getByIdRel(Integer userId) {
|
||||||
UserParam param = new UserParam();
|
UserParam param = new UserParam();
|
||||||
@@ -163,24 +111,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
final Company company = redisUtil.get(key2, Company.class);
|
final Company company = redisUtil.get(key2, Company.class);
|
||||||
user.setCompanyInfo(company);
|
user.setCompanyInfo(company);
|
||||||
user.setSystem(map);
|
user.setSystem(map);
|
||||||
// 商户编号
|
|
||||||
Merchant merchant = merchantService.getOne(new QueryWrapper<Merchant>()
|
|
||||||
.eq("merchant_owner", user.getUserId()), false);
|
|
||||||
if (merchant != null) {
|
|
||||||
user.setMerchantCode(merchant.getMerchantCode());
|
|
||||||
user.setMerchantName(merchant.getMerchantName());
|
|
||||||
} else {
|
|
||||||
MerchantClerk clerk = merchantClerkService.getOne(new QueryWrapper<MerchantClerk>().eq("user_id", user.getUserId()), false);
|
|
||||||
if (clerk != null) {
|
|
||||||
user.setMerchantCode(clerk.getMerchantCode());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 我的权益
|
|
||||||
List<UserPlanEquity> userPlanEquityList = userPlanEquityService.list(new LambdaQueryWrapper<UserPlanEquity>()
|
|
||||||
.eq(UserPlanEquity::getUserId, userId)
|
|
||||||
.gt(UserPlanEquity::getExpirationTime, LocalDateTime.now()));
|
|
||||||
user.setUserPlanEquityList(userPlanEquityList);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
@@ -320,27 +250,4 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量查询用户的详细资料
|
|
||||||
*
|
|
||||||
* @param users 用户集合
|
|
||||||
*/
|
|
||||||
private void selectUserProfile(List<User> users) {
|
|
||||||
if (users != null && users.size() > 0) {
|
|
||||||
Set<Integer> userIds = users.stream().map(User::getUserId).collect(Collectors.toSet());
|
|
||||||
final UserProfileParam userProfileParam = new UserProfileParam();
|
|
||||||
userProfileParam.setUserIds(userIds);
|
|
||||||
final List<UserProfile> userProfiles = userProfileService.listRel(userProfileParam);
|
|
||||||
final Map<Integer, List<UserProfile>> collect = userProfiles.stream().collect(Collectors.groupingBy(UserProfile::getUserId));
|
|
||||||
for (User user: users){
|
|
||||||
final List<UserProfile> list = collect.get(user.getUserId());
|
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
|
||||||
final UserProfile profile = collect.get(user.getUserId()).get(0);
|
|
||||||
user.setUserProfile(profile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,283 +1,21 @@
|
|||||||
package com.gxwebsoft;
|
package com.gxwebsoft;
|
||||||
|
|
||||||
import com.gxwebsoft.apps.service.HualalaService;
|
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||||
import com.gxwebsoft.apps.service.TestDataService;
|
|
||||||
import com.gxwebsoft.common.system.mapper.RoleMapper;
|
|
||||||
import com.gxwebsoft.common.system.mapper.UserMapper;
|
|
||||||
import com.gxwebsoft.common.system.service.SettingService;
|
|
||||||
import com.gxwebsoft.common.system.service.UserService;
|
|
||||||
import com.gxwebsoft.love.service.CertificateService;
|
|
||||||
import com.gxwebsoft.shop.mapper.OrderGoodsMapper;
|
|
||||||
import com.gxwebsoft.shop.mapper.OrderMapper;
|
|
||||||
import com.gxwebsoft.shop.service.OrderService;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by WebSoft on 2020-03-23 23:37
|
* Created by WebSoft on 2020-03-23 23:37
|
||||||
*/
|
*/
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
public class TestMain {
|
public class TestMain {
|
||||||
@Resource
|
|
||||||
private StringRedisTemplate stringRedisTemplate;
|
|
||||||
@Resource
|
|
||||||
private OrderService orderService;
|
|
||||||
@Resource
|
|
||||||
private OrderGoodsMapper orderGoodsMapper;
|
|
||||||
@Resource
|
|
||||||
private OrderMapper orderMapper;
|
|
||||||
@Resource
|
|
||||||
private TestDataService testDataService;
|
|
||||||
@Resource
|
|
||||||
private HualalaService hualalaService;
|
|
||||||
@Resource
|
|
||||||
private SettingService settingService;
|
|
||||||
@Resource
|
|
||||||
private UserService userService;
|
|
||||||
@Resource
|
|
||||||
private UserMapper userMapper;
|
|
||||||
@Resource
|
|
||||||
private RoleMapper roleMapper;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private CertificateService certificateService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成唯一的key用于jwt工具类
|
* 生成唯一的key用于jwt工具类
|
||||||
*/
|
*/
|
||||||
// @Test
|
|
||||||
// public void testGenJwtKey() {
|
|
||||||
// System.out.println(JwtUtil.encodeKey(JwtUtil.randomKey()));
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成加密后的登录密码
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Test
|
@Test
|
||||||
public void testEncodePassword() throws UnsupportedEncodingException {
|
public void testGenJwtKey() {
|
||||||
// DateTime date = DateUtil.date();
|
System.out.println(JwtUtil.encodeKey(JwtUtil.randomKey()));
|
||||||
// System.out.println("date = " + date);
|
|
||||||
// final String today = DateUtil.today();
|
|
||||||
// System.out.println("today = " + today);
|
|
||||||
// final DateTime dateTime = DateUtil.beginOfDay(date);
|
|
||||||
// System.out.println("dateTime = " + dateTime);
|
|
||||||
// System.out.println(new BCryptPasswordEncoder().encode("admin"));
|
|
||||||
String encodedReturnUrl = URLEncoder.encode("https://server.gxwebsoft.com/api/open/wx-work/saveAccessToken","UTF-8");
|
|
||||||
// System.out.println("encodedReturnUrl = " + encodedReturnUrl);
|
|
||||||
// System.out.println("encodedReturnUrl = " + encodedReturnUrl);
|
|
||||||
// log.info("生成加密后的登录密码:" + encodedReturnUrl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Test
|
|
||||||
// public void test3() {
|
|
||||||
// String key = "test:user:10";
|
|
||||||
// HashMap<String, Object> map = new HashMap<>();
|
|
||||||
// map.put("name", "科技小王子");
|
|
||||||
// map.put("sex", "男");
|
|
||||||
// map.put("phone", "13737128880");
|
|
||||||
// map.put("money", "238585.215");
|
|
||||||
// stringRedisTemplate.opsForHash().putAll(key, map);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// OrderParam param = new OrderParam();
|
|
||||||
// param.setPayStatus(30);
|
|
||||||
// param.setOrderNo("202303118310602");
|
|
||||||
// final List<Order> all = orderMapper.getAll(param);
|
|
||||||
// System.out.println("all = " + all);
|
|
||||||
// OrderParam param = new OrderParam();
|
|
||||||
// param.setOrderNo("2023031181184283");
|
|
||||||
// param.setPayStatus(20);
|
|
||||||
// boolean b = orderMapper.updatePayStatus(param);
|
|
||||||
// System.out.println("b = " + b);
|
|
||||||
|
|
||||||
// Order order = orderService.getByOutTradeNo("20230301761610059");
|
|
||||||
// OrderParam orderParam = new OrderParam();
|
|
||||||
// orderParam.setPayStatus(20);
|
|
||||||
// orderParam.setOrderNo("20230301761610059");
|
|
||||||
// orderMapper.updatePayStatus(orderParam);
|
|
||||||
// System.out.println("order = " + order);
|
|
||||||
// Order order = new Order();
|
|
||||||
// order.setOrderId(400);
|
|
||||||
// order.setComments("sdfsdfsdfs");
|
|
||||||
//
|
|
||||||
// boolean update = orderService.lambdaUpdate()
|
|
||||||
// .eq(Order::getOrderId, order.getOrderId())
|
|
||||||
// .update(order);
|
|
||||||
// System.out.println("update = " + update);
|
|
||||||
|
|
||||||
// OrderParam param = new OrderParam();
|
|
||||||
// param.setOrderNo("20230301761610059");
|
|
||||||
// Order order = orderService.getByOutTradeNo("20230301761610059");
|
|
||||||
// System.out.println("order = " + order);
|
|
||||||
// final int i = orderMapper.updateById(order);
|
|
||||||
// System.out.println("i = " + i);
|
|
||||||
|
|
||||||
|
|
||||||
// final Order one = param.getOne(orderMapper.getOne(param));
|
|
||||||
// one.setTotalPrice(new BigDecimal("2.22"));
|
|
||||||
// one.setPayStatus(20);
|
|
||||||
// orderMapper.updateById(one);
|
|
||||||
// System.out.println("one = " + one);
|
|
||||||
// Order order = orderService.getByOutTradeNo("20230301761610059");
|
|
||||||
// order.setPayStatus(20);
|
|
||||||
// order.setTotalPrice(new BigDecimal("1.11"));
|
|
||||||
// if (orderService.updateById(order)) {
|
|
||||||
// System.out.println("成功");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Test
|
|
||||||
// public void test() {
|
|
||||||
// final TestData testData = new TestData();
|
|
||||||
// testData.setTitle("测试");
|
|
||||||
// testData.setContent("内容...");
|
|
||||||
// testData.setTenantId(10);
|
|
||||||
// testDataService.save(testData);
|
|
||||||
|
|
||||||
// final boolean b = testDataService.removeById(2496);
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Test
|
|
||||||
// public void query() {
|
|
||||||
// HashMap<String, Object> params = new HashMap<>();
|
|
||||||
// params.put("shopID", Long.valueOf("76230180"));
|
|
||||||
// JSONObject response = hualalaService.doPost("/doc/getPaySubject", params);
|
|
||||||
// System.out.println("response = " + response);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 推送订单到哗啦啦
|
|
||||||
// @Test
|
|
||||||
// public void pushOrder(){
|
|
||||||
// Order orderInfo = orderService.getByOutTradeNo("202303118345835");
|
|
||||||
// final List<OrderGoods> goodsInfo = orderGoodsMapper.selectByOrderId(orderInfo.getOrderId());
|
|
||||||
// System.out.println("orderInfo = " + orderInfo);
|
|
||||||
// System.out.println("goodsInfo = " + goodsInfo);
|
|
||||||
// // 菜品信息
|
|
||||||
// ArrayList<Object> orderItem = new ArrayList<>();
|
|
||||||
// JSONObject item = new JSONObject();
|
|
||||||
// item.put("foodID",603798638);
|
|
||||||
// item.put("foodName","肉汁煲霜打萝卜.");
|
|
||||||
// item.put("foodUnit","份");
|
|
||||||
// item.put("foodUnitID","1748099318");
|
|
||||||
// item.put("isSetFood",0);
|
|
||||||
// item.put("isBatching",0);
|
|
||||||
// item.put("foodCount",1);
|
|
||||||
// item.put("originPrice","100");
|
|
||||||
// item.put("takeoutPackagingFee","1");
|
|
||||||
// item.put("isDiscount",0);
|
|
||||||
// item.put("duePrice","1");
|
|
||||||
// orderItem.add(item);
|
|
||||||
// // 支付信息
|
|
||||||
// ArrayList<Object> payInfo = new ArrayList<>();
|
|
||||||
// JSONObject payItem = new JSONObject();
|
|
||||||
// payItem.put("paymentSubjectID",Long.valueOf("51010440"));
|
|
||||||
// payItem.put("paymentSubjectName","微信小程序实收");
|
|
||||||
// payItem.put("dueAmount","1");
|
|
||||||
// payItem.put("paymentStatus",20);
|
|
||||||
// payItem.put("payWay",70);
|
|
||||||
// payInfo.add(payItem);
|
|
||||||
//
|
|
||||||
// // 订单信息
|
|
||||||
// JSONObject order = new JSONObject();
|
|
||||||
// order.put("orderSubType",20);
|
|
||||||
// order.put("orderStatus",20);
|
|
||||||
// order.put("discountTotalAmount","1");
|
|
||||||
// order.put("dinners",1);
|
|
||||||
// // 期望送达时间
|
|
||||||
// SimpleDateFormat sdf1 = new SimpleDateFormat("yyyyMMddHHmm");
|
|
||||||
// order.put("orderTime",sdf1.format(orderInfo.getCreateTime()));
|
|
||||||
// order.put("orderItem",orderItem);
|
|
||||||
// order.put("takeoutAddress","外送地址:");
|
|
||||||
// order.put("deliveryAmount","0");
|
|
||||||
// order.put("serviceAmount","0");
|
|
||||||
// order.put("channelKey","399_weixin");
|
|
||||||
// order.put("isAlreadyPaid","1");
|
|
||||||
// order.put("orderMode",1);
|
|
||||||
// order.put("OrderRemark","");
|
|
||||||
// order.put("payment",payInfo);
|
|
||||||
//
|
|
||||||
// HashMap<String,Object> params = new HashMap<>();
|
|
||||||
// params.put("shopID",Long.valueOf("76230180"));
|
|
||||||
// params.put("isCheackOut",0);
|
|
||||||
// params.put("isThirdPay",2);
|
|
||||||
// params.put("bankCode","weChat");
|
|
||||||
// params.put("order",order);
|
|
||||||
// params.put("isSentMsg",1);
|
|
||||||
// params.put("msgType",120);
|
|
||||||
// params.put("thirdOrderID",orderInfo.getOrderNo());
|
|
||||||
//
|
|
||||||
//// JSONObject response = hualalaService.doPost("/order/submitordernew", params);
|
|
||||||
//// System.out.println("response = " + response);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// @Test
|
|
||||||
// public void chat() {
|
|
||||||
//
|
|
||||||
// String endpoint = "https://api.openai.com/v1/engines/davinci-codex/completions";
|
|
||||||
// String apiKey = "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";
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// // 构建请求
|
|
||||||
// HttpRequest request = HttpRequest.get("https://api.openai.com/v1/engines/davinci-codex/completions")
|
|
||||||
// .header("Authorization", "Bearer ".concat(apiKey));
|
|
||||||
//
|
|
||||||
// // 发送请求并获取响应
|
|
||||||
// HttpResponse response = request.execute();
|
|
||||||
//
|
|
||||||
// // 处理响应结果
|
|
||||||
// int statusCode = response.getStatus();
|
|
||||||
// String body = response.body();
|
|
||||||
// System.out.println("body = " + body);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// @Test
|
|
||||||
// public void chatGPT() {
|
|
||||||
// String abc = "{\"finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"您好!有什么我能为您效劳的吗?\"}}";
|
|
||||||
// final JSONObject jsonObject = JSONObject.parseObject(abc);
|
|
||||||
// final String message = jsonObject.getString("message");
|
|
||||||
// System.out.println("message = " + message);
|
|
||||||
// final JSONObject jsonObject1 = JSONObject.parseObject(message);
|
|
||||||
// final String content = jsonObject1.getString("content");
|
|
||||||
// System.out.println("content = " + content);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// 自定义参数,这部分是Hutool工具封装的
|
|
||||||
// @Test
|
|
||||||
// public void initQrConfig() {
|
|
||||||
// // 生成指定url对应的二维码到文件,宽和高都是300像素
|
|
||||||
// QrCodeUtil.generate("https://hutool.cn/", 300, 300, FileUtil.file("/Users/gxwebsoft/Documents/uploads/qrcode.jpg"));
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void allIdCard() {
|
|
||||||
// List<User> users = userService.list(new QueryWrapper<>());
|
|
||||||
// System.out.println(users.size());
|
|
||||||
// List<Certificate> certificateList = new ArrayList<>();
|
|
||||||
// for (User user : users) {
|
|
||||||
// Certificate certificate = new Certificate();
|
|
||||||
// certificate.setFullName("xxx");
|
|
||||||
// certificate.setCertificateCode("XXX");
|
|
||||||
// certificate.setCertificateType("idCard");
|
|
||||||
// certificate.setExpirationTime(LocalDateTime.now());
|
|
||||||
// certificate.setAuthentication(1);
|
|
||||||
// certificate.setUserId(user.getUserId());
|
|
||||||
// certificate.setTenantId(10053);
|
|
||||||
// certificateService.save(certificate);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setProfile(){
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,189 +0,0 @@
|
|||||||
package com.gxwebsoft.generator;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
||||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
|
||||||
import com.baomidou.mybatisplus.generator.InjectionConfig;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.*;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
|
||||||
import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代码生成工具
|
|
||||||
*
|
|
||||||
* @author WebSoft
|
|
||||||
* @since 2021-09-05 00:31:14
|
|
||||||
*/
|
|
||||||
public class AppsGenerator {
|
|
||||||
// 输出位置
|
|
||||||
private static final String OUTPUT_LOCATION = System.getProperty("user.dir");
|
|
||||||
//private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径
|
|
||||||
// 输出目录
|
|
||||||
private static final String OUTPUT_DIR = "/src/main/java";
|
|
||||||
// 作者名称
|
|
||||||
private static final String AUTHOR = "科技小王子";
|
|
||||||
// 是否在xml中添加二级缓存配置
|
|
||||||
private static final boolean ENABLE_CACHE = false;
|
|
||||||
// 数据库连接配置
|
|
||||||
private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8";
|
|
||||||
private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver";
|
|
||||||
private static final String DB_USERNAME = "com_gxwebsoft_oa";
|
|
||||||
private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw";
|
|
||||||
// 包名
|
|
||||||
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
|
||||||
// 模块名
|
|
||||||
private static final String MODULE_NAME = "apps";
|
|
||||||
// 需要生成的表
|
|
||||||
private static final String[] TABLE_NAMES = new String[]{
|
|
||||||
// "apps_equipment",
|
|
||||||
// "apps_equipment_fault",
|
|
||||||
// "apps_equipment_alarm",
|
|
||||||
// "apps_equipment_record"
|
|
||||||
// "apps_equipment_order"
|
|
||||||
// "apps_cashier",
|
|
||||||
// "apps_hualala_card",
|
|
||||||
// "apps_hualala_card_benefits",
|
|
||||||
// "apps_hualala_food",
|
|
||||||
// "apps_hualala_shop",
|
|
||||||
// "apps_hualala_cart_food",
|
|
||||||
// "apps_hualala_food_category",
|
|
||||||
// "apps_test_data",
|
|
||||||
// "apps_link",
|
|
||||||
// "apps_bc_agent",
|
|
||||||
// "apps_bc_temporary",
|
|
||||||
// "apps_link",
|
|
||||||
// "apps_bc_plan",
|
|
||||||
// "apps_bc_food",
|
|
||||||
// "apps_bc_equipment",
|
|
||||||
// "apps_bc_cookbook"
|
|
||||||
"apps_bc_export"
|
|
||||||
// "apps_equipment_order_goods"
|
|
||||||
|
|
||||||
};
|
|
||||||
// 需要去除的表前缀
|
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
|
||||||
"apps_",
|
|
||||||
"tb_"
|
|
||||||
};
|
|
||||||
// 不需要作为查询参数的字段
|
|
||||||
private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{
|
|
||||||
"tenant_id",
|
|
||||||
"create_time",
|
|
||||||
"update_time"
|
|
||||||
};
|
|
||||||
// 查询参数使用String的类型
|
|
||||||
private static final String[] PARAM_TO_STRING_TYPE = new String[]{
|
|
||||||
"Date",
|
|
||||||
"LocalDate",
|
|
||||||
"LocalTime",
|
|
||||||
"LocalDateTime"
|
|
||||||
};
|
|
||||||
// 查询参数使用EQ的类型
|
|
||||||
private static final String[] PARAM_EQ_TYPE = new String[]{
|
|
||||||
"Integer",
|
|
||||||
"Boolean",
|
|
||||||
"BigDecimal"
|
|
||||||
};
|
|
||||||
// 是否添加权限注解
|
|
||||||
private static final boolean AUTH_ANNOTATION = true;
|
|
||||||
// 是否添加日志注解
|
|
||||||
private static final boolean LOG_ANNOTATION = true;
|
|
||||||
// controller的mapping前缀
|
|
||||||
private static final String CONTROLLER_MAPPING_PREFIX = "/api";
|
|
||||||
// 模板所在位置
|
|
||||||
private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates";
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// 代码生成器
|
|
||||||
AutoGenerator mpg = new AutoGenerator();
|
|
||||||
|
|
||||||
// 全局配置
|
|
||||||
GlobalConfig gc = new GlobalConfig();
|
|
||||||
gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR);
|
|
||||||
gc.setAuthor(AUTHOR);
|
|
||||||
gc.setOpen(false);
|
|
||||||
gc.setFileOverride(true);
|
|
||||||
gc.setEnableCache(ENABLE_CACHE);
|
|
||||||
gc.setSwagger2(true);
|
|
||||||
gc.setIdType(IdType.AUTO);
|
|
||||||
gc.setServiceName("%sService");
|
|
||||||
mpg.setGlobalConfig(gc);
|
|
||||||
|
|
||||||
// 数据源配置
|
|
||||||
DataSourceConfig dsc = new DataSourceConfig();
|
|
||||||
dsc.setUrl(DB_URL);
|
|
||||||
// dsc.setSchemaName("public");
|
|
||||||
dsc.setDriverName(DB_DRIVER);
|
|
||||||
dsc.setUsername(DB_USERNAME);
|
|
||||||
dsc.setPassword(DB_PASSWORD);
|
|
||||||
mpg.setDataSource(dsc);
|
|
||||||
|
|
||||||
// 包配置
|
|
||||||
PackageConfig pc = new PackageConfig();
|
|
||||||
pc.setModuleName(MODULE_NAME);
|
|
||||||
pc.setParent(PACKAGE_NAME);
|
|
||||||
mpg.setPackageInfo(pc);
|
|
||||||
|
|
||||||
// 策略配置
|
|
||||||
StrategyConfig strategy = new StrategyConfig();
|
|
||||||
strategy.setNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setInclude(TABLE_NAMES);
|
|
||||||
strategy.setTablePrefix(TABLE_PREFIX);
|
|
||||||
strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController");
|
|
||||||
strategy.setEntityLombokModel(true);
|
|
||||||
strategy.setRestControllerStyle(true);
|
|
||||||
strategy.setControllerMappingHyphenStyle(true);
|
|
||||||
strategy.setLogicDeleteFieldName("deleted");
|
|
||||||
mpg.setStrategy(strategy);
|
|
||||||
|
|
||||||
// 模板配置
|
|
||||||
TemplateConfig templateConfig = new TemplateConfig();
|
|
||||||
templateConfig.setController(TEMPLATES_DIR + "/controller.java");
|
|
||||||
templateConfig.setEntity(TEMPLATES_DIR + "/entity.java");
|
|
||||||
templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java");
|
|
||||||
templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml");
|
|
||||||
templateConfig.setService(TEMPLATES_DIR + "/service.java");
|
|
||||||
templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java");
|
|
||||||
mpg.setTemplate(templateConfig);
|
|
||||||
mpg.setTemplateEngine(new BeetlTemplateEnginePlus());
|
|
||||||
|
|
||||||
// 自定义模板配置
|
|
||||||
InjectionConfig cfg = new InjectionConfig() {
|
|
||||||
@Override
|
|
||||||
public void initMap() {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("packageName", PACKAGE_NAME);
|
|
||||||
map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS);
|
|
||||||
map.put("paramToStringType", PARAM_TO_STRING_TYPE);
|
|
||||||
map.put("paramEqType", PARAM_EQ_TYPE);
|
|
||||||
map.put("authAnnotation", AUTH_ANNOTATION);
|
|
||||||
map.put("logAnnotation", LOG_ANNOTATION);
|
|
||||||
map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX);
|
|
||||||
this.setMap(map);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
String templatePath = TEMPLATES_DIR + "/param.java.btl";
|
|
||||||
List<FileOutConfig> focList = new ArrayList<>();
|
|
||||||
focList.add(new FileOutConfig(templatePath) {
|
|
||||||
@Override
|
|
||||||
public String outputFile(TableInfo tableInfo) {
|
|
||||||
return OUTPUT_LOCATION + OUTPUT_DIR + "/"
|
|
||||||
+ PACKAGE_NAME.replace(".", "/")
|
|
||||||
+ "/" + pc.getModuleName() + "/param/"
|
|
||||||
+ tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
cfg.setFileOutConfigList(focList);
|
|
||||||
mpg.setCfg(cfg);
|
|
||||||
|
|
||||||
mpg.execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,178 +0,0 @@
|
|||||||
package com.gxwebsoft.generator;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
||||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
|
||||||
import com.baomidou.mybatisplus.generator.InjectionConfig;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.*;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
|
||||||
import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代码生成工具
|
|
||||||
*
|
|
||||||
* @author WebSoft
|
|
||||||
* @since 2021-09-05 00:31:14
|
|
||||||
*/
|
|
||||||
public class CmsGenerator {
|
|
||||||
// 输出位置
|
|
||||||
private static final String OUTPUT_LOCATION = System.getProperty("user.dir");
|
|
||||||
//private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径
|
|
||||||
// 输出目录
|
|
||||||
private static final String OUTPUT_DIR = "/src/main/java";
|
|
||||||
// 作者名称
|
|
||||||
private static final String AUTHOR = "科技小王子";
|
|
||||||
// 是否在xml中添加二级缓存配置
|
|
||||||
private static final boolean ENABLE_CACHE = false;
|
|
||||||
// 数据库连接配置
|
|
||||||
private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8";
|
|
||||||
private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver";
|
|
||||||
private static final String DB_USERNAME = "com_gxwebsoft_oa";
|
|
||||||
private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw";
|
|
||||||
// 包名
|
|
||||||
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
|
||||||
// 模块名
|
|
||||||
private static final String MODULE_NAME = "cms";
|
|
||||||
// 需要生成的表
|
|
||||||
private static final String[] TABLE_NAMES = new String[]{
|
|
||||||
// "cms_article",
|
|
||||||
// "cms_article_category",
|
|
||||||
// "cms_article_like",
|
|
||||||
"cms_article_comment",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
};
|
|
||||||
// 需要去除的表前缀
|
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
|
||||||
"cms_",
|
|
||||||
"tb_"
|
|
||||||
};
|
|
||||||
// 不需要作为查询参数的字段
|
|
||||||
private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{
|
|
||||||
"tenant_id",
|
|
||||||
"create_time",
|
|
||||||
"update_time"
|
|
||||||
};
|
|
||||||
// 查询参数使用String的类型
|
|
||||||
private static final String[] PARAM_TO_STRING_TYPE = new String[]{
|
|
||||||
"Date",
|
|
||||||
"LocalDate",
|
|
||||||
"LocalTime",
|
|
||||||
"LocalDateTime"
|
|
||||||
};
|
|
||||||
// 查询参数使用EQ的类型
|
|
||||||
private static final String[] PARAM_EQ_TYPE = new String[]{
|
|
||||||
"Integer",
|
|
||||||
"Boolean",
|
|
||||||
"BigDecimal"
|
|
||||||
};
|
|
||||||
// 是否添加权限注解
|
|
||||||
private static final boolean AUTH_ANNOTATION = true;
|
|
||||||
// 是否添加日志注解
|
|
||||||
private static final boolean LOG_ANNOTATION = true;
|
|
||||||
// controller的mapping前缀
|
|
||||||
private static final String CONTROLLER_MAPPING_PREFIX = "/api";
|
|
||||||
// 模板所在位置
|
|
||||||
private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates";
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// 代码生成器
|
|
||||||
AutoGenerator mpg = new AutoGenerator();
|
|
||||||
|
|
||||||
// 全局配置
|
|
||||||
GlobalConfig gc = new GlobalConfig();
|
|
||||||
gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR);
|
|
||||||
gc.setAuthor(AUTHOR);
|
|
||||||
gc.setOpen(false);
|
|
||||||
gc.setFileOverride(true);
|
|
||||||
gc.setEnableCache(ENABLE_CACHE);
|
|
||||||
gc.setSwagger2(true);
|
|
||||||
gc.setIdType(IdType.AUTO);
|
|
||||||
gc.setServiceName("%sService");
|
|
||||||
mpg.setGlobalConfig(gc);
|
|
||||||
|
|
||||||
// 数据源配置
|
|
||||||
DataSourceConfig dsc = new DataSourceConfig();
|
|
||||||
dsc.setUrl(DB_URL);
|
|
||||||
// dsc.setSchemaName("public");
|
|
||||||
dsc.setDriverName(DB_DRIVER);
|
|
||||||
dsc.setUsername(DB_USERNAME);
|
|
||||||
dsc.setPassword(DB_PASSWORD);
|
|
||||||
mpg.setDataSource(dsc);
|
|
||||||
|
|
||||||
// 包配置
|
|
||||||
PackageConfig pc = new PackageConfig();
|
|
||||||
pc.setModuleName(MODULE_NAME);
|
|
||||||
pc.setParent(PACKAGE_NAME);
|
|
||||||
mpg.setPackageInfo(pc);
|
|
||||||
|
|
||||||
// 策略配置
|
|
||||||
StrategyConfig strategy = new StrategyConfig();
|
|
||||||
strategy.setNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setInclude(TABLE_NAMES);
|
|
||||||
strategy.setTablePrefix(TABLE_PREFIX);
|
|
||||||
strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController");
|
|
||||||
strategy.setEntityLombokModel(true);
|
|
||||||
strategy.setRestControllerStyle(true);
|
|
||||||
strategy.setControllerMappingHyphenStyle(true);
|
|
||||||
strategy.setLogicDeleteFieldName("deleted");
|
|
||||||
mpg.setStrategy(strategy);
|
|
||||||
|
|
||||||
// 模板配置
|
|
||||||
TemplateConfig templateConfig = new TemplateConfig();
|
|
||||||
templateConfig.setController(TEMPLATES_DIR + "/controller.java");
|
|
||||||
templateConfig.setEntity(TEMPLATES_DIR + "/entity.java");
|
|
||||||
templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java");
|
|
||||||
templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml");
|
|
||||||
templateConfig.setService(TEMPLATES_DIR + "/service.java");
|
|
||||||
templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java");
|
|
||||||
mpg.setTemplate(templateConfig);
|
|
||||||
mpg.setTemplateEngine(new BeetlTemplateEnginePlus());
|
|
||||||
|
|
||||||
// 自定义模板配置
|
|
||||||
InjectionConfig cfg = new InjectionConfig() {
|
|
||||||
@Override
|
|
||||||
public void initMap() {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("packageName", PACKAGE_NAME);
|
|
||||||
map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS);
|
|
||||||
map.put("paramToStringType", PARAM_TO_STRING_TYPE);
|
|
||||||
map.put("paramEqType", PARAM_EQ_TYPE);
|
|
||||||
map.put("authAnnotation", AUTH_ANNOTATION);
|
|
||||||
map.put("logAnnotation", LOG_ANNOTATION);
|
|
||||||
map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX);
|
|
||||||
this.setMap(map);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
String templatePath = TEMPLATES_DIR + "/param.java.btl";
|
|
||||||
List<FileOutConfig> focList = new ArrayList<>();
|
|
||||||
focList.add(new FileOutConfig(templatePath) {
|
|
||||||
@Override
|
|
||||||
public String outputFile(TableInfo tableInfo) {
|
|
||||||
return OUTPUT_LOCATION + OUTPUT_DIR + "/"
|
|
||||||
+ PACKAGE_NAME.replace(".", "/")
|
|
||||||
+ "/" + pc.getModuleName() + "/param/"
|
|
||||||
+ tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
cfg.setFileOutConfigList(focList);
|
|
||||||
mpg.setCfg(cfg);
|
|
||||||
|
|
||||||
mpg.execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,166 +0,0 @@
|
|||||||
package com.gxwebsoft.generator;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
||||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
|
||||||
import com.baomidou.mybatisplus.generator.InjectionConfig;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.*;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
|
||||||
import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代码生成工具
|
|
||||||
*
|
|
||||||
* @author WebSoft
|
|
||||||
* @since 2021-09-05 00:31:14
|
|
||||||
*/
|
|
||||||
public class HouseGenerator {
|
|
||||||
// 输出位置
|
|
||||||
private static final String OUTPUT_LOCATION = System.getProperty("user.dir");
|
|
||||||
//private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径
|
|
||||||
// 输出目录
|
|
||||||
private static final String OUTPUT_DIR = "/src/main/java";
|
|
||||||
// 作者名称
|
|
||||||
private static final String AUTHOR = "科技小王子";
|
|
||||||
// 是否在xml中添加二级缓存配置
|
|
||||||
private static final boolean ENABLE_CACHE = false;
|
|
||||||
// 数据库连接配置
|
|
||||||
private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8";
|
|
||||||
private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver";
|
|
||||||
private static final String DB_USERNAME = "com_gxwebsoft_oa";
|
|
||||||
private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw";
|
|
||||||
// 包名
|
|
||||||
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
|
||||||
// 模块名
|
|
||||||
private static final String MODULE_NAME = "house";
|
|
||||||
// 需要生成的表
|
|
||||||
private static final String[] TABLE_NAMES = new String[]{
|
|
||||||
"house_info"
|
|
||||||
};
|
|
||||||
// 需要去除的表前缀
|
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
|
||||||
"house_",
|
|
||||||
"tb_"
|
|
||||||
};
|
|
||||||
// 不需要作为查询参数的字段
|
|
||||||
private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{
|
|
||||||
"tenant_id",
|
|
||||||
"create_time",
|
|
||||||
"update_time"
|
|
||||||
};
|
|
||||||
// 查询参数使用String的类型
|
|
||||||
private static final String[] PARAM_TO_STRING_TYPE = new String[]{
|
|
||||||
"Date",
|
|
||||||
"LocalDate",
|
|
||||||
"LocalTime",
|
|
||||||
"LocalDateTime"
|
|
||||||
};
|
|
||||||
// 查询参数使用EQ的类型
|
|
||||||
private static final String[] PARAM_EQ_TYPE = new String[]{
|
|
||||||
"Integer",
|
|
||||||
"Boolean",
|
|
||||||
"BigDecimal"
|
|
||||||
};
|
|
||||||
// 是否添加权限注解
|
|
||||||
private static final boolean AUTH_ANNOTATION = true;
|
|
||||||
// 是否添加日志注解
|
|
||||||
private static final boolean LOG_ANNOTATION = true;
|
|
||||||
// controller的mapping前缀
|
|
||||||
private static final String CONTROLLER_MAPPING_PREFIX = "/api";
|
|
||||||
// 模板所在位置
|
|
||||||
private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates";
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// 代码生成器
|
|
||||||
AutoGenerator mpg = new AutoGenerator();
|
|
||||||
|
|
||||||
// 全局配置
|
|
||||||
GlobalConfig gc = new GlobalConfig();
|
|
||||||
gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR);
|
|
||||||
gc.setAuthor(AUTHOR);
|
|
||||||
gc.setOpen(false);
|
|
||||||
gc.setFileOverride(true);
|
|
||||||
gc.setEnableCache(ENABLE_CACHE);
|
|
||||||
gc.setSwagger2(true);
|
|
||||||
gc.setIdType(IdType.AUTO);
|
|
||||||
gc.setServiceName("%sService");
|
|
||||||
mpg.setGlobalConfig(gc);
|
|
||||||
|
|
||||||
// 数据源配置
|
|
||||||
DataSourceConfig dsc = new DataSourceConfig();
|
|
||||||
dsc.setUrl(DB_URL);
|
|
||||||
// dsc.setSchemaName("public");
|
|
||||||
dsc.setDriverName(DB_DRIVER);
|
|
||||||
dsc.setUsername(DB_USERNAME);
|
|
||||||
dsc.setPassword(DB_PASSWORD);
|
|
||||||
mpg.setDataSource(dsc);
|
|
||||||
|
|
||||||
// 包配置
|
|
||||||
PackageConfig pc = new PackageConfig();
|
|
||||||
pc.setModuleName(MODULE_NAME);
|
|
||||||
pc.setParent(PACKAGE_NAME);
|
|
||||||
mpg.setPackageInfo(pc);
|
|
||||||
|
|
||||||
// 策略配置
|
|
||||||
StrategyConfig strategy = new StrategyConfig();
|
|
||||||
strategy.setNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setInclude(TABLE_NAMES);
|
|
||||||
strategy.setTablePrefix(TABLE_PREFIX);
|
|
||||||
strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController");
|
|
||||||
strategy.setEntityLombokModel(true);
|
|
||||||
strategy.setRestControllerStyle(true);
|
|
||||||
strategy.setControllerMappingHyphenStyle(true);
|
|
||||||
strategy.setLogicDeleteFieldName("deleted");
|
|
||||||
mpg.setStrategy(strategy);
|
|
||||||
|
|
||||||
// 模板配置
|
|
||||||
TemplateConfig templateConfig = new TemplateConfig();
|
|
||||||
templateConfig.setController(TEMPLATES_DIR + "/controller.java");
|
|
||||||
templateConfig.setEntity(TEMPLATES_DIR + "/entity.java");
|
|
||||||
templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java");
|
|
||||||
templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml");
|
|
||||||
templateConfig.setService(TEMPLATES_DIR + "/service.java");
|
|
||||||
templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java");
|
|
||||||
mpg.setTemplate(templateConfig);
|
|
||||||
mpg.setTemplateEngine(new BeetlTemplateEnginePlus());
|
|
||||||
|
|
||||||
// 自定义模板配置
|
|
||||||
InjectionConfig cfg = new InjectionConfig() {
|
|
||||||
@Override
|
|
||||||
public void initMap() {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("packageName", PACKAGE_NAME);
|
|
||||||
map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS);
|
|
||||||
map.put("paramToStringType", PARAM_TO_STRING_TYPE);
|
|
||||||
map.put("paramEqType", PARAM_EQ_TYPE);
|
|
||||||
map.put("authAnnotation", AUTH_ANNOTATION);
|
|
||||||
map.put("logAnnotation", LOG_ANNOTATION);
|
|
||||||
map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX);
|
|
||||||
this.setMap(map);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
String templatePath = TEMPLATES_DIR + "/param.java.btl";
|
|
||||||
List<FileOutConfig> focList = new ArrayList<>();
|
|
||||||
focList.add(new FileOutConfig(templatePath) {
|
|
||||||
@Override
|
|
||||||
public String outputFile(TableInfo tableInfo) {
|
|
||||||
return OUTPUT_LOCATION + OUTPUT_DIR + "/"
|
|
||||||
+ PACKAGE_NAME.replace(".", "/")
|
|
||||||
+ "/" + pc.getModuleName() + "/param/"
|
|
||||||
+ tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
cfg.setFileOutConfigList(focList);
|
|
||||||
mpg.setCfg(cfg);
|
|
||||||
|
|
||||||
mpg.execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,173 +0,0 @@
|
|||||||
package com.gxwebsoft.generator;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
||||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
|
||||||
import com.baomidou.mybatisplus.generator.InjectionConfig;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.*;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
|
||||||
import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代码生成工具
|
|
||||||
*
|
|
||||||
* @author WebSoft
|
|
||||||
* @since 2021-09-05 00:31:14
|
|
||||||
*/
|
|
||||||
public class LoveGenerator {
|
|
||||||
// 输出位置
|
|
||||||
private static final String OUTPUT_LOCATION = System.getProperty("user.dir");
|
|
||||||
//private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径
|
|
||||||
// 输出目录
|
|
||||||
private static final String OUTPUT_DIR = "/src/main/java";
|
|
||||||
// 作者名称
|
|
||||||
private static final String AUTHOR = "科技小王子";
|
|
||||||
// 是否在xml中添加二级缓存配置
|
|
||||||
private static final boolean ENABLE_CACHE = false;
|
|
||||||
// 数据库连接配置
|
|
||||||
private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8";
|
|
||||||
private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver";
|
|
||||||
private static final String DB_USERNAME = "com_gxwebsoft_oa";
|
|
||||||
private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw";
|
|
||||||
// 包名
|
|
||||||
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
|
||||||
// 模块名
|
|
||||||
private static final String MODULE_NAME = "love";
|
|
||||||
// 需要生成的表
|
|
||||||
private static final String[] TABLE_NAMES = new String[]{
|
|
||||||
// "love_user_profile",
|
|
||||||
// "love_user_plan",
|
|
||||||
// "love_user_plan_price",
|
|
||||||
// "love_user_plan_log",
|
|
||||||
// "love_user_plan_icon",
|
|
||||||
// "love_user_plan_equity",
|
|
||||||
// "love_certificate",
|
|
||||||
"love_profit"
|
|
||||||
};
|
|
||||||
// 需要去除的表前缀
|
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
|
||||||
"love_",
|
|
||||||
"tb_"
|
|
||||||
};
|
|
||||||
// 不需要作为查询参数的字段
|
|
||||||
private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{
|
|
||||||
"tenant_id",
|
|
||||||
"create_time",
|
|
||||||
"update_time"
|
|
||||||
};
|
|
||||||
// 查询参数使用String的类型
|
|
||||||
private static final String[] PARAM_TO_STRING_TYPE = new String[]{
|
|
||||||
"Date",
|
|
||||||
"LocalDate",
|
|
||||||
"LocalTime",
|
|
||||||
"LocalDateTime"
|
|
||||||
};
|
|
||||||
// 查询参数使用EQ的类型
|
|
||||||
private static final String[] PARAM_EQ_TYPE = new String[]{
|
|
||||||
"Integer",
|
|
||||||
"Boolean",
|
|
||||||
"BigDecimal"
|
|
||||||
};
|
|
||||||
// 是否添加权限注解
|
|
||||||
private static final boolean AUTH_ANNOTATION = true;
|
|
||||||
// 是否添加日志注解
|
|
||||||
private static final boolean LOG_ANNOTATION = true;
|
|
||||||
// controller的mapping前缀
|
|
||||||
private static final String CONTROLLER_MAPPING_PREFIX = "/api";
|
|
||||||
// 模板所在位置
|
|
||||||
private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates";
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// 代码生成器
|
|
||||||
AutoGenerator mpg = new AutoGenerator();
|
|
||||||
|
|
||||||
// 全局配置
|
|
||||||
GlobalConfig gc = new GlobalConfig();
|
|
||||||
gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR);
|
|
||||||
gc.setAuthor(AUTHOR);
|
|
||||||
gc.setOpen(false);
|
|
||||||
gc.setFileOverride(true);
|
|
||||||
gc.setEnableCache(ENABLE_CACHE);
|
|
||||||
gc.setSwagger2(true);
|
|
||||||
gc.setIdType(IdType.AUTO);
|
|
||||||
gc.setServiceName("%sService");
|
|
||||||
mpg.setGlobalConfig(gc);
|
|
||||||
|
|
||||||
// 数据源配置
|
|
||||||
DataSourceConfig dsc = new DataSourceConfig();
|
|
||||||
dsc.setUrl(DB_URL);
|
|
||||||
// dsc.setSchemaName("public");
|
|
||||||
dsc.setDriverName(DB_DRIVER);
|
|
||||||
dsc.setUsername(DB_USERNAME);
|
|
||||||
dsc.setPassword(DB_PASSWORD);
|
|
||||||
mpg.setDataSource(dsc);
|
|
||||||
|
|
||||||
// 包配置
|
|
||||||
PackageConfig pc = new PackageConfig();
|
|
||||||
pc.setModuleName(MODULE_NAME);
|
|
||||||
pc.setParent(PACKAGE_NAME);
|
|
||||||
mpg.setPackageInfo(pc);
|
|
||||||
|
|
||||||
// 策略配置
|
|
||||||
StrategyConfig strategy = new StrategyConfig();
|
|
||||||
strategy.setNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setInclude(TABLE_NAMES);
|
|
||||||
strategy.setTablePrefix(TABLE_PREFIX);
|
|
||||||
strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController");
|
|
||||||
strategy.setEntityLombokModel(true);
|
|
||||||
strategy.setRestControllerStyle(true);
|
|
||||||
strategy.setControllerMappingHyphenStyle(true);
|
|
||||||
strategy.setLogicDeleteFieldName("deleted");
|
|
||||||
mpg.setStrategy(strategy);
|
|
||||||
|
|
||||||
// 模板配置
|
|
||||||
TemplateConfig templateConfig = new TemplateConfig();
|
|
||||||
templateConfig.setController(TEMPLATES_DIR + "/controller.java");
|
|
||||||
templateConfig.setEntity(TEMPLATES_DIR + "/entity.java");
|
|
||||||
templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java");
|
|
||||||
templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml");
|
|
||||||
templateConfig.setService(TEMPLATES_DIR + "/service.java");
|
|
||||||
templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java");
|
|
||||||
mpg.setTemplate(templateConfig);
|
|
||||||
mpg.setTemplateEngine(new BeetlTemplateEnginePlus());
|
|
||||||
|
|
||||||
// 自定义模板配置
|
|
||||||
InjectionConfig cfg = new InjectionConfig() {
|
|
||||||
@Override
|
|
||||||
public void initMap() {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("packageName", PACKAGE_NAME);
|
|
||||||
map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS);
|
|
||||||
map.put("paramToStringType", PARAM_TO_STRING_TYPE);
|
|
||||||
map.put("paramEqType", PARAM_EQ_TYPE);
|
|
||||||
map.put("authAnnotation", AUTH_ANNOTATION);
|
|
||||||
map.put("logAnnotation", LOG_ANNOTATION);
|
|
||||||
map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX);
|
|
||||||
this.setMap(map);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
String templatePath = TEMPLATES_DIR + "/param.java.btl";
|
|
||||||
List<FileOutConfig> focList = new ArrayList<>();
|
|
||||||
focList.add(new FileOutConfig(templatePath) {
|
|
||||||
@Override
|
|
||||||
public String outputFile(TableInfo tableInfo) {
|
|
||||||
return OUTPUT_LOCATION + OUTPUT_DIR + "/"
|
|
||||||
+ PACKAGE_NAME.replace(".", "/")
|
|
||||||
+ "/" + pc.getModuleName() + "/param/"
|
|
||||||
+ tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
cfg.setFileOutConfigList(focList);
|
|
||||||
mpg.setCfg(cfg);
|
|
||||||
|
|
||||||
mpg.execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,180 +0,0 @@
|
|||||||
package com.gxwebsoft.generator;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
||||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
|
||||||
import com.baomidou.mybatisplus.generator.InjectionConfig;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.*;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
|
||||||
import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代码生成工具
|
|
||||||
*
|
|
||||||
* @author WebSoft
|
|
||||||
* @since 2021-09-05 00:31:14
|
|
||||||
*/
|
|
||||||
public class OaGenerator {
|
|
||||||
// 输出位置
|
|
||||||
private static final String OUTPUT_LOCATION = System.getProperty("user.dir");
|
|
||||||
//private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径
|
|
||||||
// 输出目录
|
|
||||||
private static final String OUTPUT_DIR = "/src/main/java";
|
|
||||||
// 作者名称
|
|
||||||
private static final String AUTHOR = "科技小王子";
|
|
||||||
// 是否在xml中添加二级缓存配置
|
|
||||||
private static final boolean ENABLE_CACHE = false;
|
|
||||||
// 数据库连接配置
|
|
||||||
private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8";
|
|
||||||
private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver";
|
|
||||||
private static final String DB_USERNAME = "com_gxwebsoft_oa";
|
|
||||||
private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw";
|
|
||||||
// 包名
|
|
||||||
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
|
||||||
// 模块名
|
|
||||||
private static final String MODULE_NAME = "oa";
|
|
||||||
// 需要生成的表
|
|
||||||
private static final String[] TABLE_NAMES = new String[]{
|
|
||||||
// "oa_project",
|
|
||||||
// "oa_link",
|
|
||||||
// "oa_assets",
|
|
||||||
// "oa_customer",
|
|
||||||
// "oa_task",
|
|
||||||
// "oa_task_record",
|
|
||||||
// "oa_task_user",
|
|
||||||
// "sys_tenant",
|
|
||||||
// "oa_app",
|
|
||||||
// "oa_setting",
|
|
||||||
// "oa_assets",
|
|
||||||
// "oa_app_user",
|
|
||||||
// "oa_notice"
|
|
||||||
"oa_assets_user",
|
|
||||||
|
|
||||||
};
|
|
||||||
// 需要去除的表前缀
|
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
|
||||||
"oa_",
|
|
||||||
"tb_"
|
|
||||||
};
|
|
||||||
// 不需要作为查询参数的字段
|
|
||||||
private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{
|
|
||||||
"tenant_id",
|
|
||||||
"create_time",
|
|
||||||
"update_time"
|
|
||||||
};
|
|
||||||
// 查询参数使用String的类型
|
|
||||||
private static final String[] PARAM_TO_STRING_TYPE = new String[]{
|
|
||||||
"Date",
|
|
||||||
"LocalDate",
|
|
||||||
"LocalTime",
|
|
||||||
"LocalDateTime"
|
|
||||||
};
|
|
||||||
// 查询参数使用EQ的类型
|
|
||||||
private static final String[] PARAM_EQ_TYPE = new String[]{
|
|
||||||
"Integer",
|
|
||||||
"Boolean",
|
|
||||||
"BigDecimal"
|
|
||||||
};
|
|
||||||
// 是否添加权限注解
|
|
||||||
private static final boolean AUTH_ANNOTATION = true;
|
|
||||||
// 是否添加日志注解
|
|
||||||
private static final boolean LOG_ANNOTATION = true;
|
|
||||||
// controller的mapping前缀
|
|
||||||
private static final String CONTROLLER_MAPPING_PREFIX = "/api";
|
|
||||||
// 模板所在位置
|
|
||||||
private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates";
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// 代码生成器
|
|
||||||
AutoGenerator mpg = new AutoGenerator();
|
|
||||||
|
|
||||||
// 全局配置
|
|
||||||
GlobalConfig gc = new GlobalConfig();
|
|
||||||
gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR);
|
|
||||||
gc.setAuthor(AUTHOR);
|
|
||||||
gc.setOpen(false);
|
|
||||||
gc.setFileOverride(true);
|
|
||||||
gc.setEnableCache(ENABLE_CACHE);
|
|
||||||
gc.setSwagger2(true);
|
|
||||||
gc.setIdType(IdType.AUTO);
|
|
||||||
gc.setServiceName("%sService");
|
|
||||||
mpg.setGlobalConfig(gc);
|
|
||||||
|
|
||||||
// 数据源配置
|
|
||||||
DataSourceConfig dsc = new DataSourceConfig();
|
|
||||||
dsc.setUrl(DB_URL);
|
|
||||||
// dsc.setSchemaName("public");
|
|
||||||
dsc.setDriverName(DB_DRIVER);
|
|
||||||
dsc.setUsername(DB_USERNAME);
|
|
||||||
dsc.setPassword(DB_PASSWORD);
|
|
||||||
mpg.setDataSource(dsc);
|
|
||||||
|
|
||||||
// 包配置
|
|
||||||
PackageConfig pc = new PackageConfig();
|
|
||||||
pc.setModuleName(MODULE_NAME);
|
|
||||||
pc.setParent(PACKAGE_NAME);
|
|
||||||
mpg.setPackageInfo(pc);
|
|
||||||
|
|
||||||
// 策略配置
|
|
||||||
StrategyConfig strategy = new StrategyConfig();
|
|
||||||
strategy.setNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setInclude(TABLE_NAMES);
|
|
||||||
strategy.setTablePrefix(TABLE_PREFIX);
|
|
||||||
strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController");
|
|
||||||
strategy.setEntityLombokModel(true);
|
|
||||||
strategy.setRestControllerStyle(true);
|
|
||||||
strategy.setControllerMappingHyphenStyle(true);
|
|
||||||
strategy.setLogicDeleteFieldName("deleted");
|
|
||||||
mpg.setStrategy(strategy);
|
|
||||||
|
|
||||||
// 模板配置
|
|
||||||
TemplateConfig templateConfig = new TemplateConfig();
|
|
||||||
templateConfig.setController(TEMPLATES_DIR + "/controller.java");
|
|
||||||
templateConfig.setEntity(TEMPLATES_DIR + "/entity.java");
|
|
||||||
templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java");
|
|
||||||
templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml");
|
|
||||||
templateConfig.setService(TEMPLATES_DIR + "/service.java");
|
|
||||||
templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java");
|
|
||||||
mpg.setTemplate(templateConfig);
|
|
||||||
mpg.setTemplateEngine(new BeetlTemplateEnginePlus());
|
|
||||||
|
|
||||||
// 自定义模板配置
|
|
||||||
InjectionConfig cfg = new InjectionConfig() {
|
|
||||||
@Override
|
|
||||||
public void initMap() {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("packageName", PACKAGE_NAME);
|
|
||||||
map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS);
|
|
||||||
map.put("paramToStringType", PARAM_TO_STRING_TYPE);
|
|
||||||
map.put("paramEqType", PARAM_EQ_TYPE);
|
|
||||||
map.put("authAnnotation", AUTH_ANNOTATION);
|
|
||||||
map.put("logAnnotation", LOG_ANNOTATION);
|
|
||||||
map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX);
|
|
||||||
this.setMap(map);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
String templatePath = TEMPLATES_DIR + "/param.java.btl";
|
|
||||||
List<FileOutConfig> focList = new ArrayList<>();
|
|
||||||
focList.add(new FileOutConfig(templatePath) {
|
|
||||||
@Override
|
|
||||||
public String outputFile(TableInfo tableInfo) {
|
|
||||||
return OUTPUT_LOCATION + OUTPUT_DIR + "/"
|
|
||||||
+ PACKAGE_NAME.replace(".", "/")
|
|
||||||
+ "/" + pc.getModuleName() + "/param/"
|
|
||||||
+ tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
cfg.setFileOutConfigList(focList);
|
|
||||||
mpg.setCfg(cfg);
|
|
||||||
|
|
||||||
mpg.execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,209 +0,0 @@
|
|||||||
package com.gxwebsoft.generator;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
||||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
|
||||||
import com.baomidou.mybatisplus.generator.InjectionConfig;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.*;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
|
||||||
import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代码生成工具
|
|
||||||
*
|
|
||||||
* @author WebSoft
|
|
||||||
* @since 2021-09-05 00:31:14
|
|
||||||
*/
|
|
||||||
public class ShopGenerator {
|
|
||||||
// 输出位置
|
|
||||||
private static final String OUTPUT_LOCATION = System.getProperty("user.dir");
|
|
||||||
//private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径
|
|
||||||
// 输出目录
|
|
||||||
private static final String OUTPUT_DIR = "/src/main/java";
|
|
||||||
// 作者名称
|
|
||||||
private static final String AUTHOR = "科技小王子";
|
|
||||||
// 是否在xml中添加二级缓存配置
|
|
||||||
private static final boolean ENABLE_CACHE = false;
|
|
||||||
// 数据库连接配置
|
|
||||||
private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8";
|
|
||||||
private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver";
|
|
||||||
private static final String DB_USERNAME = "com_gxwebsoft_oa";
|
|
||||||
private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw";
|
|
||||||
// 包名
|
|
||||||
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
|
||||||
// 模块名
|
|
||||||
private static final String MODULE_NAME = "shop";
|
|
||||||
// 需要生成的表
|
|
||||||
private static final String[] TABLE_NAMES = new String[]{
|
|
||||||
// "shop_order",
|
|
||||||
// "shop_goods",
|
|
||||||
// "shop_store",
|
|
||||||
// "shop_cart",
|
|
||||||
// "shop_express",
|
|
||||||
// "shop_category",
|
|
||||||
// "shop_goods_image",
|
|
||||||
// "shop_comment",
|
|
||||||
// "shop_goods_service"
|
|
||||||
// "shop_member"
|
|
||||||
// "shop_user_balance_log",
|
|
||||||
// "shop_user_address",
|
|
||||||
// "shop_user_coupon",
|
|
||||||
// "shop_user_follow",
|
|
||||||
// "shop_user_oauth",
|
|
||||||
// "shop_user_points_log",
|
|
||||||
// "shop_cart"
|
|
||||||
// "shop_info"
|
|
||||||
// "shop_coupon"
|
|
||||||
// "shop_clerk"
|
|
||||||
// "shop_merchant",
|
|
||||||
// "shop_merchant_clerk"
|
|
||||||
// "shop_merchant_withdraw"
|
|
||||||
// "shop_order_address"
|
|
||||||
// "shop_payment",
|
|
||||||
// "shop_payment_template",
|
|
||||||
// "shop_payment_trade"
|
|
||||||
// "shop_order_goods"
|
|
||||||
// "shop_user_oauth"
|
|
||||||
// "shop_order_renew"
|
|
||||||
// "shop_recharge_order",
|
|
||||||
// "shop_recharge_order_plan",
|
|
||||||
// "shop_recharge_plan",
|
|
||||||
// "shop_user_balance_log"
|
|
||||||
// "shop_user_referee",
|
|
||||||
// "shop_order_refund",
|
|
||||||
// "shop_order_refund_address",
|
|
||||||
// "shop_user_grade",
|
|
||||||
// "shop_user_grade_log",
|
|
||||||
// "shop_user_comment",
|
|
||||||
// "shop_user_like",
|
|
||||||
// "shop_user_look"
|
|
||||||
"shop_user_feedback"
|
|
||||||
|
|
||||||
};
|
|
||||||
// 需要去除的表前缀
|
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
|
||||||
"shop_",
|
|
||||||
"tb_"
|
|
||||||
};
|
|
||||||
// 不需要作为查询参数的字段
|
|
||||||
private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{
|
|
||||||
"tenant_id",
|
|
||||||
"create_time",
|
|
||||||
"update_time"
|
|
||||||
};
|
|
||||||
// 查询参数使用String的类型
|
|
||||||
private static final String[] PARAM_TO_STRING_TYPE = new String[]{
|
|
||||||
"Date",
|
|
||||||
"LocalDate",
|
|
||||||
"LocalTime",
|
|
||||||
"LocalDateTime"
|
|
||||||
};
|
|
||||||
// 查询参数使用EQ的类型
|
|
||||||
private static final String[] PARAM_EQ_TYPE = new String[]{
|
|
||||||
"Integer",
|
|
||||||
"Boolean",
|
|
||||||
"BigDecimal"
|
|
||||||
};
|
|
||||||
// 是否添加权限注解
|
|
||||||
private static final boolean AUTH_ANNOTATION = true;
|
|
||||||
// 是否添加日志注解
|
|
||||||
private static final boolean LOG_ANNOTATION = true;
|
|
||||||
// controller的mapping前缀
|
|
||||||
private static final String CONTROLLER_MAPPING_PREFIX = "/api";
|
|
||||||
// 模板所在位置
|
|
||||||
private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates";
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// 代码生成器
|
|
||||||
AutoGenerator mpg = new AutoGenerator();
|
|
||||||
|
|
||||||
// 全局配置
|
|
||||||
GlobalConfig gc = new GlobalConfig();
|
|
||||||
gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR);
|
|
||||||
gc.setAuthor(AUTHOR);
|
|
||||||
gc.setOpen(false);
|
|
||||||
gc.setFileOverride(true);
|
|
||||||
gc.setEnableCache(ENABLE_CACHE);
|
|
||||||
gc.setSwagger2(true);
|
|
||||||
gc.setIdType(IdType.AUTO);
|
|
||||||
gc.setServiceName("%sService");
|
|
||||||
mpg.setGlobalConfig(gc);
|
|
||||||
|
|
||||||
// 数据源配置
|
|
||||||
DataSourceConfig dsc = new DataSourceConfig();
|
|
||||||
dsc.setUrl(DB_URL);
|
|
||||||
// dsc.setSchemaName("public");
|
|
||||||
dsc.setDriverName(DB_DRIVER);
|
|
||||||
dsc.setUsername(DB_USERNAME);
|
|
||||||
dsc.setPassword(DB_PASSWORD);
|
|
||||||
mpg.setDataSource(dsc);
|
|
||||||
|
|
||||||
// 包配置
|
|
||||||
PackageConfig pc = new PackageConfig();
|
|
||||||
pc.setModuleName(MODULE_NAME);
|
|
||||||
pc.setParent(PACKAGE_NAME);
|
|
||||||
mpg.setPackageInfo(pc);
|
|
||||||
|
|
||||||
// 策略配置
|
|
||||||
StrategyConfig strategy = new StrategyConfig();
|
|
||||||
strategy.setNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setInclude(TABLE_NAMES);
|
|
||||||
strategy.setTablePrefix(TABLE_PREFIX);
|
|
||||||
strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController");
|
|
||||||
strategy.setEntityLombokModel(true);
|
|
||||||
strategy.setRestControllerStyle(true);
|
|
||||||
strategy.setControllerMappingHyphenStyle(true);
|
|
||||||
strategy.setLogicDeleteFieldName("deleted");
|
|
||||||
mpg.setStrategy(strategy);
|
|
||||||
|
|
||||||
// 模板配置
|
|
||||||
TemplateConfig templateConfig = new TemplateConfig();
|
|
||||||
templateConfig.setController(TEMPLATES_DIR + "/controller.java");
|
|
||||||
templateConfig.setEntity(TEMPLATES_DIR + "/entity.java");
|
|
||||||
templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java");
|
|
||||||
templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml");
|
|
||||||
templateConfig.setService(TEMPLATES_DIR + "/service.java");
|
|
||||||
templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java");
|
|
||||||
mpg.setTemplate(templateConfig);
|
|
||||||
mpg.setTemplateEngine(new BeetlTemplateEnginePlus());
|
|
||||||
|
|
||||||
// 自定义模板配置
|
|
||||||
InjectionConfig cfg = new InjectionConfig() {
|
|
||||||
@Override
|
|
||||||
public void initMap() {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("packageName", PACKAGE_NAME);
|
|
||||||
map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS);
|
|
||||||
map.put("paramToStringType", PARAM_TO_STRING_TYPE);
|
|
||||||
map.put("paramEqType", PARAM_EQ_TYPE);
|
|
||||||
map.put("authAnnotation", AUTH_ANNOTATION);
|
|
||||||
map.put("logAnnotation", LOG_ANNOTATION);
|
|
||||||
map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX);
|
|
||||||
this.setMap(map);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
String templatePath = TEMPLATES_DIR + "/param.java.btl";
|
|
||||||
List<FileOutConfig> focList = new ArrayList<>();
|
|
||||||
focList.add(new FileOutConfig(templatePath) {
|
|
||||||
@Override
|
|
||||||
public String outputFile(TableInfo tableInfo) {
|
|
||||||
return OUTPUT_LOCATION + OUTPUT_DIR + "/"
|
|
||||||
+ PACKAGE_NAME.replace(".", "/")
|
|
||||||
+ "/" + pc.getModuleName() + "/param/"
|
|
||||||
+ tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
cfg.setFileOutConfigList(focList);
|
|
||||||
mpg.setCfg(cfg);
|
|
||||||
|
|
||||||
mpg.execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -31,10 +31,10 @@ public class SysGenerator {
|
|||||||
// 是否在xml中添加二级缓存配置
|
// 是否在xml中添加二级缓存配置
|
||||||
private static final boolean ENABLE_CACHE = false;
|
private static final boolean ENABLE_CACHE = false;
|
||||||
// 数据库连接配置
|
// 数据库连接配置
|
||||||
private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8";
|
private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/gxwebsoft_core?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8";
|
||||||
private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver";
|
private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver";
|
||||||
private static final String DB_USERNAME = "com_gxwebsoft_oa";
|
private static final String DB_USERNAME = "gxwebsoft_core";
|
||||||
private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw";
|
private static final String DB_PASSWORD = "jdj7HYEdYHnYEFBy";
|
||||||
// 包名
|
// 包名
|
||||||
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
||||||
// 模块名
|
// 模块名
|
||||||
@@ -43,13 +43,15 @@ public class SysGenerator {
|
|||||||
private static final String[] TABLE_NAMES = new String[]{
|
private static final String[] TABLE_NAMES = new String[]{
|
||||||
|
|
||||||
// "sys_user",
|
// "sys_user",
|
||||||
"sys_tenant",
|
// "sys_tenant",
|
||||||
// "sys_setting"
|
// "sys_setting"
|
||||||
// "sys_access_key"
|
// "sys_access_key"
|
||||||
// "sys_company",
|
// "sys_company",
|
||||||
// "sys_industry"
|
// "sys_industry"
|
||||||
// "sys_plug",
|
// "sys_plug",
|
||||||
// "sys_company"
|
// "sys_company"
|
||||||
|
// "sys_user_oauth"
|
||||||
|
"sys_user_grade"
|
||||||
|
|
||||||
};
|
};
|
||||||
// 需要去除的表前缀
|
// 需要去除的表前缀
|
||||||
|
|||||||
@@ -1,176 +0,0 @@
|
|||||||
package com.gxwebsoft.generator;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
||||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
|
||||||
import com.baomidou.mybatisplus.generator.InjectionConfig;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.*;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
|
||||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
|
||||||
import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代码生成工具
|
|
||||||
*
|
|
||||||
* @author WebSoft
|
|
||||||
* @since 2021-09-05 00:31:14
|
|
||||||
*/
|
|
||||||
public class TowerGenerator {
|
|
||||||
// 输出位置
|
|
||||||
private static final String OUTPUT_LOCATION = System.getProperty("user.dir");
|
|
||||||
//private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径
|
|
||||||
// 输出目录
|
|
||||||
private static final String OUTPUT_DIR = "/src/main/java";
|
|
||||||
// 作者名称
|
|
||||||
private static final String AUTHOR = "科技小王子";
|
|
||||||
// 是否在xml中添加二级缓存配置
|
|
||||||
private static final boolean ENABLE_CACHE = false;
|
|
||||||
// 数据库连接配置
|
|
||||||
private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8";
|
|
||||||
private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver";
|
|
||||||
private static final String DB_USERNAME = "com_gxwebsoft_oa";
|
|
||||||
private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw";
|
|
||||||
// 包名
|
|
||||||
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
|
||||||
// 模块名
|
|
||||||
private static final String MODULE_NAME = "tower";
|
|
||||||
// 需要生成的表
|
|
||||||
private static final String[] TABLE_NAMES = new String[]{
|
|
||||||
// "tower_equipment",
|
|
||||||
// "tower_warehouse",
|
|
||||||
// "tower_accessory"
|
|
||||||
// "tower_project",
|
|
||||||
// "tower_model",
|
|
||||||
// "tower_project_user",
|
|
||||||
// "tower_project_order",
|
|
||||||
// "tower_place",
|
|
||||||
// "tower_place_safety",
|
|
||||||
// "tower_place_standard",
|
|
||||||
"tower_project_place"
|
|
||||||
};
|
|
||||||
// 需要去除的表前缀
|
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
|
||||||
"sys_",
|
|
||||||
"tb_"
|
|
||||||
};
|
|
||||||
// 不需要作为查询参数的字段
|
|
||||||
private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{
|
|
||||||
"tenant_id",
|
|
||||||
"create_time",
|
|
||||||
"update_time"
|
|
||||||
};
|
|
||||||
// 查询参数使用String的类型
|
|
||||||
private static final String[] PARAM_TO_STRING_TYPE = new String[]{
|
|
||||||
"Date",
|
|
||||||
"LocalDate",
|
|
||||||
"LocalTime",
|
|
||||||
"LocalDateTime"
|
|
||||||
};
|
|
||||||
// 查询参数使用EQ的类型
|
|
||||||
private static final String[] PARAM_EQ_TYPE = new String[]{
|
|
||||||
"Integer",
|
|
||||||
"Boolean",
|
|
||||||
"BigDecimal"
|
|
||||||
};
|
|
||||||
// 是否添加权限注解
|
|
||||||
private static final boolean AUTH_ANNOTATION = true;
|
|
||||||
// 是否添加日志注解
|
|
||||||
private static final boolean LOG_ANNOTATION = true;
|
|
||||||
// controller的mapping前缀
|
|
||||||
private static final String CONTROLLER_MAPPING_PREFIX = "/api";
|
|
||||||
// 模板所在位置
|
|
||||||
private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates";
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// 代码生成器
|
|
||||||
AutoGenerator mpg = new AutoGenerator();
|
|
||||||
|
|
||||||
// 全局配置
|
|
||||||
GlobalConfig gc = new GlobalConfig();
|
|
||||||
gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR);
|
|
||||||
gc.setAuthor(AUTHOR);
|
|
||||||
gc.setOpen(false);
|
|
||||||
gc.setFileOverride(true);
|
|
||||||
gc.setEnableCache(ENABLE_CACHE);
|
|
||||||
gc.setSwagger2(true);
|
|
||||||
gc.setIdType(IdType.AUTO);
|
|
||||||
gc.setServiceName("%sService");
|
|
||||||
mpg.setGlobalConfig(gc);
|
|
||||||
|
|
||||||
// 数据源配置
|
|
||||||
DataSourceConfig dsc = new DataSourceConfig();
|
|
||||||
dsc.setUrl(DB_URL);
|
|
||||||
// dsc.setSchemaName("public");
|
|
||||||
dsc.setDriverName(DB_DRIVER);
|
|
||||||
dsc.setUsername(DB_USERNAME);
|
|
||||||
dsc.setPassword(DB_PASSWORD);
|
|
||||||
mpg.setDataSource(dsc);
|
|
||||||
|
|
||||||
// 包配置
|
|
||||||
PackageConfig pc = new PackageConfig();
|
|
||||||
pc.setModuleName(MODULE_NAME);
|
|
||||||
pc.setParent(PACKAGE_NAME);
|
|
||||||
mpg.setPackageInfo(pc);
|
|
||||||
|
|
||||||
// 策略配置
|
|
||||||
StrategyConfig strategy = new StrategyConfig();
|
|
||||||
strategy.setNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
|
|
||||||
strategy.setInclude(TABLE_NAMES);
|
|
||||||
strategy.setTablePrefix(TABLE_PREFIX);
|
|
||||||
strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController");
|
|
||||||
strategy.setEntityLombokModel(true);
|
|
||||||
strategy.setRestControllerStyle(true);
|
|
||||||
strategy.setControllerMappingHyphenStyle(true);
|
|
||||||
strategy.setLogicDeleteFieldName("deleted");
|
|
||||||
mpg.setStrategy(strategy);
|
|
||||||
|
|
||||||
// 模板配置
|
|
||||||
TemplateConfig templateConfig = new TemplateConfig();
|
|
||||||
templateConfig.setController(TEMPLATES_DIR + "/controller.java");
|
|
||||||
templateConfig.setEntity(TEMPLATES_DIR + "/entity.java");
|
|
||||||
templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java");
|
|
||||||
templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml");
|
|
||||||
templateConfig.setService(TEMPLATES_DIR + "/service.java");
|
|
||||||
templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java");
|
|
||||||
mpg.setTemplate(templateConfig);
|
|
||||||
mpg.setTemplateEngine(new BeetlTemplateEnginePlus());
|
|
||||||
|
|
||||||
// 自定义模板配置
|
|
||||||
InjectionConfig cfg = new InjectionConfig() {
|
|
||||||
@Override
|
|
||||||
public void initMap() {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("packageName", PACKAGE_NAME);
|
|
||||||
map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS);
|
|
||||||
map.put("paramToStringType", PARAM_TO_STRING_TYPE);
|
|
||||||
map.put("paramEqType", PARAM_EQ_TYPE);
|
|
||||||
map.put("authAnnotation", AUTH_ANNOTATION);
|
|
||||||
map.put("logAnnotation", LOG_ANNOTATION);
|
|
||||||
map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX);
|
|
||||||
this.setMap(map);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
String templatePath = TEMPLATES_DIR + "/param.java.btl";
|
|
||||||
List<FileOutConfig> focList = new ArrayList<>();
|
|
||||||
focList.add(new FileOutConfig(templatePath) {
|
|
||||||
@Override
|
|
||||||
public String outputFile(TableInfo tableInfo) {
|
|
||||||
return OUTPUT_LOCATION + OUTPUT_DIR + "/"
|
|
||||||
+ PACKAGE_NAME.replace(".", "/")
|
|
||||||
+ "/" + pc.getModuleName() + "/param/"
|
|
||||||
+ tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
cfg.setFileOutConfigList(focList);
|
|
||||||
mpg.setCfg(cfg);
|
|
||||||
|
|
||||||
mpg.execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user