diff --git a/logs/springboot-logback-error.log b/logs/springboot-logback-error.log new file mode 100644 index 0000000..ca01d1a --- /dev/null +++ b/logs/springboot-logback-error.log @@ -0,0 +1,508 @@ +2024-04-28 10:00:25,410 [main] ERROR com.alibaba.druid.pool.DruidDataSource:927 - init datasource error, url: jdbc:mysql://139.224.253.21:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) + at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:897) + at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:822) + at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:447) + at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:237) + at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) + at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1644) + at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1710) + at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:923) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1904) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1846) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760) + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1500) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1395) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) + at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) + at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:392) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:211) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:174) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:169) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:154) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:86) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:253) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:227) + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5132) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) + at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) + at java.util.concurrent.FutureTask.run(FutureTask.java) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) + at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) + at java.util.concurrent.FutureTask.run(FutureTask.java) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:456) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:105) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:86) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:416) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:180) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) + at com.subsidy.MeishuApplication.main(MeishuApplication.java:22) +Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure + +The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. + at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) + at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) + at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) + at java.lang.reflect.Constructor.newInstance(Constructor.java:423) + at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) + at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) + at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) + at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) + at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91) + at com.mysql.cj.NativeSession.connect(NativeSession.java:150) + at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:841) + ... 127 common frames omitted +Caused by: java.net.ConnectException: Connection timed out: connect + at java.net.DualStackPlainSocketImpl.connect0(Native Method) + at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) + at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) + at java.net.Socket.connect(Socket.java:589) + at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155) + at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65) + ... 129 common frames omitted +2024-04-28 10:00:25,418 [main] ERROR com.alibaba.druid.pool.DruidDataSource:969 - {dataSource-1} init error +java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) + at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:897) + at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:822) + at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:447) + at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:237) + at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) + at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1644) + at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1710) + at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:923) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1904) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1846) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760) + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1500) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1395) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) + at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) + at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:392) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:211) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:174) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:169) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:154) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:86) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:253) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:227) + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5132) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) + at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) + at java.util.concurrent.FutureTask.run(FutureTask.java) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) + at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) + at java.util.concurrent.FutureTask.run(FutureTask.java) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:456) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:105) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:86) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:416) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:180) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) + at com.subsidy.MeishuApplication.main(MeishuApplication.java:22) +Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure + +The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. + at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) + at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) + at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) + at java.lang.reflect.Constructor.newInstance(Constructor.java:423) + at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) + at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) + at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) + at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) + at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91) + at com.mysql.cj.NativeSession.connect(NativeSession.java:150) + at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:841) + ... 127 common frames omitted +Caused by: java.net.ConnectException: Connection timed out: connect + at java.net.DualStackPlainSocketImpl.connect0(Native Method) + at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) + at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) + at java.net.Socket.connect(Socket.java:589) + at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155) + at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65) + ... 129 common frames omitted +2024-04-28 10:00:25,422 [main] ERROR org.springframework.boot.web.embedded.tomcat.TomcatStarter:61 - Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'webConfig': Unsatisfied dependency expressed through field 'authenticationInterceptor'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationInterceptor': Unsatisfied dependency expressed through field 'administerMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'administerMapper' defined in file [D:\code\subsidy-intership\target\classes\com\subsidy\mapper\AdministerMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. +2024-04-28 10:00:25,458 [main] ERROR org.springframework.boot.SpringApplication:822 - Application run failed +org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) + at com.subsidy.MeishuApplication.main(MeishuApplication.java:22) +Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:124) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:86) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:416) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:180) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) + ... 8 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webConfig': Unsatisfied dependency expressed through field 'authenticationInterceptor'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationInterceptor': Unsatisfied dependency expressed through field 'administerMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'administerMapper' defined in file [D:\code\subsidy-intership\target\classes\com\subsidy\mapper\AdministerMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) + at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:392) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:211) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:174) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:169) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:154) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:86) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:253) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:227) + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5132) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) + at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) + at java.util.concurrent.FutureTask.run(FutureTask.java) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) + at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) + at java.util.concurrent.FutureTask.run(FutureTask.java) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:456) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:105) + ... 13 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationInterceptor': Unsatisfied dependency expressed through field 'administerMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'administerMapper' defined in file [D:\code\subsidy-intership\target\classes\com\subsidy\mapper\AdministerMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) + at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) + ... 65 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'administerMapper' defined in file [D:\code\subsidy-intership\target\classes\com\subsidy\mapper\AdministerMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1515) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1395) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) + ... 78 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769) + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1500) + ... 89 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760) + ... 102 common frames omitted +Caused by: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) + at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) + at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:897) + at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:822) + at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:447) + at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:237) + at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) + at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1644) + at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1710) + at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:923) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1904) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1846) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774) + ... 113 common frames omitted +Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure + +The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. + at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) + at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) + at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) + at java.lang.reflect.Constructor.newInstance(Constructor.java:423) + at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) + at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) + at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) + at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) + at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91) + at com.mysql.cj.NativeSession.connect(NativeSession.java:150) + at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:841) + ... 127 common frames omitted +Caused by: java.net.ConnectException: Connection timed out: connect + at java.net.DualStackPlainSocketImpl.connect0(Native Method) + at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) + at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) + at java.net.Socket.connect(Socket.java:589) + at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155) + at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65) + ... 129 common frames omitted diff --git a/logs/springboot-logback-info.log b/logs/springboot-logback-info.log new file mode 100644 index 0000000..5aa62bb --- /dev/null +++ b/logs/springboot-logback-info.log @@ -0,0 +1,51 @@ +2024-07-23 13:57:02,964 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:244 - Multiple Spring Data modules found, entering strict repository configuration mode! +2024-07-23 13:57:02,972 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:126 - Bootstrapping Spring Data repositories in DEFAULT mode. +2024-07-23 13:57:03,011 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:182 - Finished Spring Data repository scanning in 24ms. Found 0 repository interfaces. +2024-07-23 13:57:03,347 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$8be5f5a8] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2024-07-23 13:57:03,432 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'redisConfig' of type [com.subsidy.common.configure.RedisConfig$$EnhancerBySpringCGLIB$$8bae00af] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2024-07-23 13:57:03,775 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:90 - Tomcat initialized with port(s): 23507 (http) +2024-07-23 13:57:03,788 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Initializing ProtocolHandler ["http-nio-23507"] +2024-07-23 13:57:03,794 [main] INFO org.apache.catalina.core.StandardService:173 - Starting service [Tomcat] +2024-07-23 13:57:03,794 [main] INFO org.apache.catalina.core.StandardEngine:173 - Starting Servlet engine: [Apache Tomcat/9.0.22] +2024-07-23 13:57:03,800 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - Loaded APR based Apache Tomcat Native library [1.2.37] using APR version [1.7.4]. +2024-07-23 13:57:03,801 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. +2024-07-23 13:57:03,801 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] +2024-07-23 13:57:03,812 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - OpenSSL successfully initialized [OpenSSL 1.1.1u 30 May 2023] +2024-07-23 13:57:03,918 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring embedded WebApplicationContext +2024-07-23 13:57:03,919 [main] INFO org.springframework.web.context.ContextLoader:284 - Root WebApplicationContext: initialization completed in 1842 ms +2024-07-23 13:57:04,015 [main] INFO com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure:56 - Init DruidDataSource +2024-07-23 13:57:05,131 [main] INFO com.alibaba.druid.pool.DruidDataSource:994 - {dataSource-1} inited +2024-07-23 13:57:05,829 [main] INFO org.quartz.impl.StdSchedulerFactory:1208 - Using default implementation for ThreadExecutor +2024-07-23 13:57:05,838 [main] INFO org.quartz.core.SchedulerSignalerImpl:61 - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl +2024-07-23 13:57:05,838 [main] INFO org.quartz.core.QuartzScheduler:229 - Quartz Scheduler v.2.3.1 created. +2024-07-23 13:57:05,842 [main] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:672 - Using db table-based data access locking (synchronization). +2024-07-23 13:57:05,843 [main] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:145 - JobStoreCMT initialized. +2024-07-23 13:57:05,844 [main] INFO org.quartz.core.QuartzScheduler:294 - Scheduler meta-data: Quartz Scheduler (v2.3.1) 'schedulerFactoryBean' with instanceId 'NON_CLUSTERED' + Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally. + NOT STARTED. + Currently in standby mode. + Number of jobs executed: 0 + Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads. + Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is not clustered. + +2024-07-23 13:57:05,844 [main] INFO org.quartz.impl.StdSchedulerFactory:1362 - Quartz scheduler 'schedulerFactoryBean' initialized from an externally provided properties instance. +2024-07-23 13:57:05,844 [main] INFO org.quartz.impl.StdSchedulerFactory:1366 - Quartz scheduler version: 2.3.1 +2024-07-23 13:57:05,845 [main] INFO org.quartz.core.QuartzScheduler:2293 - JobFactory set to: com.subsidy.common.configure.JobFactory@2c668c2a +2024-07-23 13:57:06,480 [main] INFO springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping:69 - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)] +2024-07-23 13:57:06,663 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:171 - Initializing ExecutorService 'applicationTaskExecutor' +2024-07-23 13:57:07,209 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler:171 - Initializing ExecutorService 'taskScheduler' +2024-07-23 13:57:07,267 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:160 - Context refreshed +2024-07-23 13:57:07,284 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:163 - Found 1 custom documentation plugin(s) +2024-07-23 13:57:07,456 [main] INFO springfox.documentation.spring.web.scanners.ApiListingReferenceScanner:41 - Scanning for api listing references +2024-07-23 13:57:07,586 [main] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:731 - Will start Quartz Scheduler [schedulerFactoryBean] in 1 seconds +2024-07-23 13:57:07,596 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Starting ProtocolHandler ["http-nio-23507"] +2024-07-23 13:57:07,615 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:202 - Tomcat started on port(s): 23507 (http) with context path '' +2024-07-23 13:57:08,600 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:747 - Starting Quartz Scheduler now, after delay of 1 seconds +2024-07-23 13:58:55,730 [Thread-15] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler:208 - Shutting down ExecutorService 'taskScheduler' +2024-07-23 13:58:55,735 [Thread-15] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:208 - Shutting down ExecutorService 'applicationTaskExecutor' +2024-07-23 13:58:55,749 [Thread-15] INFO org.quartz.core.QuartzScheduler:666 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED shutting down. +2024-07-23 13:58:55,749 [Thread-15] INFO org.quartz.core.QuartzScheduler:585 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED paused. +2024-07-23 13:58:55,749 [Thread-15] INFO org.quartz.core.QuartzScheduler:740 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED shutdown complete. +2024-07-23 13:58:55,749 [Thread-15] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:844 - Shutting down Quartz Scheduler +2024-07-23 13:58:55,750 [Thread-15] INFO com.alibaba.druid.pool.DruidDataSource:2029 - {dataSource-1} closing ... +2024-07-23 13:58:55,751 [Thread-15] INFO com.alibaba.druid.pool.DruidDataSource:2101 - {dataSource-1} closed diff --git a/logs/springboot-logback/error/2023-05-08-0.log.gz b/logs/springboot-logback/error/2023-05-08-0.log.gz new file mode 100644 index 0000000..25b6794 Binary files /dev/null and b/logs/springboot-logback/error/2023-05-08-0.log.gz differ diff --git a/logs/springboot-logback/error/2023-05-09-0.log.gz b/logs/springboot-logback/error/2023-05-09-0.log.gz new file mode 100644 index 0000000..68fc4a1 Binary files /dev/null and b/logs/springboot-logback/error/2023-05-09-0.log.gz differ diff --git a/logs/springboot-logback/error/2023-05-10-0.log.gz b/logs/springboot-logback/error/2023-05-10-0.log.gz new file mode 100644 index 0000000..426b7c3 Binary files /dev/null and b/logs/springboot-logback/error/2023-05-10-0.log.gz differ diff --git a/logs/springboot-logback/error/2023-05-11-0.log.gz b/logs/springboot-logback/error/2023-05-11-0.log.gz new file mode 100644 index 0000000..2345ed3 Binary files /dev/null and b/logs/springboot-logback/error/2023-05-11-0.log.gz differ diff --git a/logs/springboot-logback/error/2023-05-19-0.log.gz b/logs/springboot-logback/error/2023-05-19-0.log.gz new file mode 100644 index 0000000..5482935 Binary files /dev/null and b/logs/springboot-logback/error/2023-05-19-0.log.gz differ diff --git a/logs/springboot-logback/error/2023-05-23-0.log.gz b/logs/springboot-logback/error/2023-05-23-0.log.gz new file mode 100644 index 0000000..396eea2 Binary files /dev/null and b/logs/springboot-logback/error/2023-05-23-0.log.gz differ diff --git a/logs/springboot-logback/error/2023-06-06-0.log.gz b/logs/springboot-logback/error/2023-06-06-0.log.gz new file mode 100644 index 0000000..bb7a467 Binary files /dev/null and b/logs/springboot-logback/error/2023-06-06-0.log.gz differ diff --git a/logs/springboot-logback/error/2023-09-13-0.log.gz b/logs/springboot-logback/error/2023-09-13-0.log.gz new file mode 100644 index 0000000..06eee89 Binary files /dev/null and b/logs/springboot-logback/error/2023-09-13-0.log.gz differ diff --git a/logs/springboot-logback/error/2023-11-02-0.log.gz b/logs/springboot-logback/error/2023-11-02-0.log.gz new file mode 100644 index 0000000..7c52400 Binary files /dev/null and b/logs/springboot-logback/error/2023-11-02-0.log.gz differ diff --git a/logs/springboot-logback/error/2024-01-10-0.log.gz b/logs/springboot-logback/error/2024-01-10-0.log.gz new file mode 100644 index 0000000..ff3700a Binary files /dev/null and b/logs/springboot-logback/error/2024-01-10-0.log.gz differ diff --git a/logs/springboot-logback/error/2024-01-17-0.log.gz b/logs/springboot-logback/error/2024-01-17-0.log.gz new file mode 100644 index 0000000..e914e1d Binary files /dev/null and b/logs/springboot-logback/error/2024-01-17-0.log.gz differ diff --git a/logs/springboot-logback/error/2024-01-22-0.log.gz b/logs/springboot-logback/error/2024-01-22-0.log.gz new file mode 100644 index 0000000..4895b61 Binary files /dev/null and b/logs/springboot-logback/error/2024-01-22-0.log.gz differ diff --git a/logs/springboot-logback/error/2024-02-27-0.log.gz b/logs/springboot-logback/error/2024-02-27-0.log.gz new file mode 100644 index 0000000..6d98e16 Binary files /dev/null and b/logs/springboot-logback/error/2024-02-27-0.log.gz differ diff --git a/logs/springboot-logback/error/2024-03-01-0.log.gz b/logs/springboot-logback/error/2024-03-01-0.log.gz new file mode 100644 index 0000000..fd134e6 Binary files /dev/null and b/logs/springboot-logback/error/2024-03-01-0.log.gz differ diff --git a/logs/springboot-logback/error/2024-03-04-0.log.gz b/logs/springboot-logback/error/2024-03-04-0.log.gz new file mode 100644 index 0000000..82c84e0 Binary files /dev/null and b/logs/springboot-logback/error/2024-03-04-0.log.gz differ diff --git a/logs/springboot-logback/error/2024-04-23-0.log.gz b/logs/springboot-logback/error/2024-04-23-0.log.gz new file mode 100644 index 0000000..1b2b300 Binary files /dev/null and b/logs/springboot-logback/error/2024-04-23-0.log.gz differ diff --git a/logs/springboot-logback/info/2023-07-10-0.log.gz b/logs/springboot-logback/info/2023-07-10-0.log.gz new file mode 100644 index 0000000..bcd4a09 Binary files /dev/null and b/logs/springboot-logback/info/2023-07-10-0.log.gz differ diff --git a/logs/springboot-logback/info/2023-07-21-0.log.gz b/logs/springboot-logback/info/2023-07-21-0.log.gz new file mode 100644 index 0000000..3397340 Binary files /dev/null and b/logs/springboot-logback/info/2023-07-21-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-04-19-0.log.gz b/logs/springboot-logback/info/2024-04-19-0.log.gz new file mode 100644 index 0000000..e0928d7 Binary files /dev/null and b/logs/springboot-logback/info/2024-04-19-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-04-22-0.log.gz b/logs/springboot-logback/info/2024-04-22-0.log.gz new file mode 100644 index 0000000..e9a3c00 Binary files /dev/null and b/logs/springboot-logback/info/2024-04-22-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-04-23-0.log.gz b/logs/springboot-logback/info/2024-04-23-0.log.gz new file mode 100644 index 0000000..d543d0c Binary files /dev/null and b/logs/springboot-logback/info/2024-04-23-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-04-24-0.log.gz b/logs/springboot-logback/info/2024-04-24-0.log.gz new file mode 100644 index 0000000..88627c7 Binary files /dev/null and b/logs/springboot-logback/info/2024-04-24-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-04-25-0.log.gz b/logs/springboot-logback/info/2024-04-25-0.log.gz new file mode 100644 index 0000000..75c717b Binary files /dev/null and b/logs/springboot-logback/info/2024-04-25-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-04-26-0.log.gz b/logs/springboot-logback/info/2024-04-26-0.log.gz new file mode 100644 index 0000000..c75a8ab Binary files /dev/null and b/logs/springboot-logback/info/2024-04-26-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-04-28-0.log.gz b/logs/springboot-logback/info/2024-04-28-0.log.gz new file mode 100644 index 0000000..35c85a0 Binary files /dev/null and b/logs/springboot-logback/info/2024-04-28-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-05-06-0.log.gz b/logs/springboot-logback/info/2024-05-06-0.log.gz new file mode 100644 index 0000000..8053ddb Binary files /dev/null and b/logs/springboot-logback/info/2024-05-06-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-05-07-0.log.gz b/logs/springboot-logback/info/2024-05-07-0.log.gz new file mode 100644 index 0000000..5bae533 Binary files /dev/null and b/logs/springboot-logback/info/2024-05-07-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-05-08-0.log.gz b/logs/springboot-logback/info/2024-05-08-0.log.gz new file mode 100644 index 0000000..d2f02a8 Binary files /dev/null and b/logs/springboot-logback/info/2024-05-08-0.log.gz differ diff --git a/mvnw b/mvnw new file mode 100644 index 0000000..a16b543 --- /dev/null +++ b/mvnw @@ -0,0 +1,310 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..c8d4337 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,182 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + +FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..cb41eb0 --- /dev/null +++ b/pom.xml @@ -0,0 +1,296 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.7.RELEASE + + + com.subsidy + subsidy + 0.0.1 + subsidy + Demo project for Spring Boot + + + UTF-8 + UTF-8 + 1.8 + 3.3.0 + 3.3.2 + 2.9.2 + 1.2.58 + 2.0.0 + 3.13 + 1.1.0 + 4.4.6 + 3.9 + 1.1.22 + 5.2.0 + 5.4.1 + 3.10.3 + 3.3.0 + 3.2.2 + + + + + org.springframework.boot + spring-boot-starter + + + + org.freemarker + freemarker + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-aop + + + + com.belerweb + pinyin4j + 2.5.1 + + + + + com.tencentcloudapi + tencentcloud-sdk-java + 3.1.322 + + + + com.qcloud + vod_api + 2.1.2 + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + mysql + mysql-connector-java + runtime + + + + com.alibaba + druid-spring-boot-starter + ${druid.version} + + + + org.springframework.boot + spring-boot-starter-jdbc + + + + org.projectlombok + lombok + + + + + com.baomidou + mybatis-plus-boot-starter + ${mybatis-plus.version} + + + + com.baomidou + mybatis-plus-generator + ${generator.version} + + + + com.alibaba + fastjson + ${fastjson.version} + + + + io.springfox + springfox-swagger2 + ${swagger2.version} + + + + io.springfox + springfox-swagger-ui + ${swagger2.version} + + + + + + + + + + org.apache.poi + poi-ooxml + ${poi-ooxml.version} + + + + com.aliyun + aliyun-java-sdk-dysmsapi + ${dysmsapi.version} + + + com.aliyun + aliyun-java-sdk-core + ${sdk-core.version} + + + org.apache.commons + commons-lang3 + ${lang3.version} + + + + com.itextpdf + itext-asian + ${itext-asian.version} + + + + com.itextpdf + itextpdf + ${itextpdf.version} + + + + com.auth0 + java-jwt + ${java-jwt.version} + + + + net.sf.json-lib + json-lib + 2.4 + jdk15 + + + + org.scilab.forge + jlatexmath + 1.0.7 + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + org.springframework.boot + spring-boot-starter-quartz + + + + redis.clients + jedis + ${jedis.version} + + + + commons-collections + commons-collections + ${collections.version} + + + + + org.springframework.boot + spring-boot-starter-websocket + + + + org.java-websocket + Java-WebSocket + 1.5.1 + + + + cn.hutool + hutool-all + 5.5.2 + + + + org.springframework.boot + spring-boot-starter-cache + + + + net.sf.ehcache + ehcache + + + + net.polyv + polyv-java-live-sdk + 2.0.4 + + + + + com.aliyun.oss + aliyun-sdk-oss + 3.15.0 + + + + com.squareup.okhttp3 + okhttp + 3.10.0 + + + com.squareup.okio + okio + 1.13.0 + + + + com.google.code.gson + gson + 2.8.6 + + + + + subsidy-interShip + + + org.springframework.boot + spring-boot-maven-plugin + 2.2.6.RELEASE + + + + org.projectlombok + lombok + + + + + + + + diff --git a/src/main/java/com/subsidy/MeishuApplication.java b/src/main/java/com/subsidy/MeishuApplication.java new file mode 100644 index 0000000..b984c32 --- /dev/null +++ b/src/main/java/com/subsidy/MeishuApplication.java @@ -0,0 +1,40 @@ +package com.subsidy; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.transaction.annotation.EnableTransactionManagement; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@SpringBootApplication +@MapperScan(basePackages = {"com.subsidy.mapper"}) +@EnableScheduling +//@EnableCaching +@EnableAsync +@EnableTransactionManagement +public class MeishuApplication { + + public static void main(String[] args) { + SpringApplication.run(MeishuApplication.class, args); + } + + //@Bean + //public ServletRegistrationBean druidStatViewServlet() { + // //先配置管理后台的servLet,访问的入口为/druid/ + // ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean( + // new StatViewServlet(), "/druid/*"); + // // IP白名单 (没有配置或者为空,则允许所有访问) + // servletRegistrationBean.addInitParameter("allow", "127.0.0.1"); + // // IP黑名单 (存在共同时,deny优先于allow) + // servletRegistrationBean.addInitParameter("deny", ""); + // servletRegistrationBean.addInitParameter("loginUsername", "admin"); + // servletRegistrationBean.addInitParameter("loginPassword", "yhkl1234"); + // servletRegistrationBean.addInitParameter("resetEnable", "false"); + // return servletRegistrationBean; + //} + +} diff --git a/src/main/java/com/subsidy/common/RedisPrefixConstant.java b/src/main/java/com/subsidy/common/RedisPrefixConstant.java new file mode 100644 index 0000000..88a9271 --- /dev/null +++ b/src/main/java/com/subsidy/common/RedisPrefixConstant.java @@ -0,0 +1,35 @@ +package com.subsidy.common; + +public class RedisPrefixConstant { + + /** + * subsidyAdminister_accountName:AdministerDO 老师账号密码 + */ + public static final String SUBSIDY_ADMINISTER_PREFIX = "subsidyAdminister:"; + + /** + * subsidyMember_companyId_accountName:MemberDO 学员账号密码 + */ + public static final String SUBSIDY_COMPANY_MEMBER_PREFIX = "subsidyMember:"; + + ///** + // *subsidy_memberLogin_memberId_userName_companyName_now : 学员端审计记录 + // */ + //public static final String SUBSIDY_MEMBER_LOGIN_PREFIX = "subsidy:memberLogin:"; + + /** + * subsidySmsCode_telephone:code 手机验证码 + */ + public static final String SUBSIDY_TELEPHONE_PREFIX = "subsidySmsCode:"; + + /** + * subsidySettings:companyId:ClassHourDictDO 公司操作设置 + */ + public static final String SUBSIDY_SETTINGS_PREFIX = "subsidySettings:"; + + /** + * subsidySignInfo:memberId:1:classId:12:20211223:long,do 学生签到数据 + */ + public static final String SUBSIDY_SIGN_INFO_PREFIX = "subsidySignInfo:memberId:"; + +} diff --git a/src/main/java/com/subsidy/common/ResponseData.java b/src/main/java/com/subsidy/common/ResponseData.java new file mode 100644 index 0000000..fd45218 --- /dev/null +++ b/src/main/java/com/subsidy/common/ResponseData.java @@ -0,0 +1,54 @@ +package com.subsidy.common; + +import com.subsidy.common.configure.RemoteProperties; +import lombok.Data; +import org.springframework.boot.context.properties.EnableConfigurationProperties; + +/** + * 返回数据 + * + * @author DengMin + * @date 2019/08/27 13:57 + **/ +@Data +@EnableConfigurationProperties(RemoteProperties.class) +public class ResponseData { + + public static ResponseVO generateCreatedResponse(int code) { + return (ResponseVO) ResponseVO.builder() + .code(code) + .message(RemoteProperties.getMessage(code)) + .build(); + } + + public static ResponseVO generateCreatedResponse(int code, String message) { + return (ResponseVO) ResponseVO.builder() + .code(code) + .message(message) + .build(); + } + + public static ResponseVO generateCreatedResponse(int code, T data) { + return (ResponseVO) ResponseVO.builder() + .code(code) + .message(RemoteProperties.getMessage(code)) + .data(data) + .build(); + } + + public static ResponseVO generateCreatedResponse(int code, String message, T data) { + return (ResponseVO) ResponseVO.builder() + .code(code) + .message(message) + .data(data) + .build(); + } + + public static ResponseVO generateCreatedResponse(int code, String message, String path) { + return (ResponseVO) ResponseVO.builder() + .code(code) + .message(message) + .path(path) + .build(); + } +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/common/ResponseVO.java b/src/main/java/com/subsidy/common/ResponseVO.java new file mode 100644 index 0000000..afaa676 --- /dev/null +++ b/src/main/java/com/subsidy/common/ResponseVO.java @@ -0,0 +1,21 @@ +package com.subsidy.common; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ResponseVO { + + private Integer code; + + private String message; + + private T data; + + private String path; +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/common/configure/AliyunSmsProperties.java b/src/main/java/com/subsidy/common/configure/AliyunSmsProperties.java new file mode 100644 index 0000000..bb827e2 --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/AliyunSmsProperties.java @@ -0,0 +1,19 @@ +package com.subsidy.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Data +@Component +@ConfigurationProperties(prefix = "sms") +public class AliyunSmsProperties { + + private String product; + + private String domain; + + private String accessKeyId; + + private String accessKeySecret; +} diff --git a/src/main/java/com/subsidy/common/configure/JobFactory.java b/src/main/java/com/subsidy/common/configure/JobFactory.java new file mode 100644 index 0000000..9a0bdcb --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/JobFactory.java @@ -0,0 +1,31 @@ +package com.subsidy.common.configure; + +import org.quartz.spi.TriggerFiredBundle; +import org.springframework.beans.factory.config.AutowireCapableBeanFactory; +import org.springframework.scheduling.quartz.AdaptableJobFactory; +import org.springframework.stereotype.Component; + +/** + *

+ * JobFactory实例 + *

+ * + * @author DengMin + * @since 2020/12/9 + */ +@Component +public class JobFactory extends AdaptableJobFactory { + + private AutowireCapableBeanFactory factory; + + public JobFactory(AutowireCapableBeanFactory factory) { + this.factory = factory; + } + + @Override + protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception { + Object job = super.createJobInstance(bundle); + factory.autowireBean(job); + return job; + } +} diff --git a/src/main/java/com/subsidy/common/configure/MyTomcat.java b/src/main/java/com/subsidy/common/configure/MyTomcat.java new file mode 100644 index 0000000..52d1ac7 --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/MyTomcat.java @@ -0,0 +1,89 @@ +package com.subsidy.common.configure; + +import org.apache.catalina.connector.Connector; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer; +import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; +import org.springframework.boot.web.servlet.MultipartConfigFactory; +import org.springframework.boot.web.servlet.server.ServletWebServerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.servlet.MultipartConfigElement; + +@Configuration +public class MyTomcat { + + + @Value("${spring.server.port}") + private String port; + @Value("${spring.server.acceptorThreadCount}") + private String acceptorThreadCount; + @Value("${spring.server.minSpareThreads}") + private String minSpareThreads; + @Value("${spring.server.maxSpareThreads}") + private String maxSpareThreads; + @Value("${spring.server.maxThreads}") + private String maxThreads; + @Value("${spring.server.maxConnections}") + private String maxConnections; + @Value("${spring.server.protocol}") + private String protocol; + @Value("${spring.server.redirectPort}") + private String redirectPort; + @Value("${spring.server.compression}") + private String compression; + @Value("${spring.server.connectionTimeout}") + private String connectionTimeout; + + @Value("${spring.server.MaxFileSize}") + private String MaxFileSize; + @Value("${spring.server.MaxRequestSize}") + private String MaxRequestSize; + + @Bean + public ServletWebServerFactory servletContainer() { + TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); + tomcat.addConnectorCustomizers(new GwsTomcatConnectionCustomizer()); + return tomcat; + } + + @Bean + public MultipartConfigElement multipartConfigElement() { + MultipartConfigFactory factory = new MultipartConfigFactory(); + // 单个数据大小 + factory.setMaxFileSize(MaxFileSize); // KB,MB + /// 总上传数据大小 + factory.setMaxRequestSize(MaxRequestSize); + return factory.createMultipartConfig(); + } + + /** + * + * 默认http连接 + * + * @version + * @author liuyi 2016年7月20日 下午7:59:41 + * + */ + public class GwsTomcatConnectionCustomizer implements TomcatConnectorCustomizer { + + public GwsTomcatConnectionCustomizer() { + } + + @Override + public void customize(Connector connector) { + connector.setPort(Integer.valueOf(port)); + connector.setAttribute("connectionTimeout", connectionTimeout); + connector.setAttribute("acceptorThreadCount", acceptorThreadCount); + connector.setAttribute("minSpareThreads", minSpareThreads); + connector.setAttribute("maxSpareThreads", maxSpareThreads); + connector.setAttribute("maxThreads", maxThreads); + connector.setAttribute("maxConnections", maxConnections); + connector.setAttribute("protocol", protocol); + connector.setAttribute("redirectPort", "redirectPort"); + connector.setAttribute("compression", "compression"); + } + } + +} diff --git a/src/main/java/com/subsidy/common/configure/MybatisPlusConfig.java b/src/main/java/com/subsidy/common/configure/MybatisPlusConfig.java new file mode 100644 index 0000000..c02a5b2 --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/MybatisPlusConfig.java @@ -0,0 +1,54 @@ +package com.subsidy.common.configure; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.core.config.GlobalConfig; +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import com.subsidy.common.handler.MetaHandler; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @author: tuyp + * @create: 2020-08-12 12:01 + */ +@Configuration +@ConditionalOnClass(value = {PaginationInterceptor.class}) +public class MybatisPlusConfig { + + /** + * 分页 + * @return + */ + @Bean + public PaginationInterceptor paginationInterceptor(){ + PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); + paginationInterceptor.setDialectType(DbType.MYSQL.getDb()); + return paginationInterceptor; + } +// +// /** +// * 打印 sql +// */ +// @Bean +// public PerformanceInterceptor performanceInterceptor() { +// PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor(); +// //格式化sql语句 +// Properties properties = new Properties(); +// properties.setProperty("format", "false"); +// performanceInterceptor.setProperties(properties); +// return performanceInterceptor; +// } + + /** + * 自动填充功能 + * @return + */ + @Bean + public GlobalConfig globalConfig() { + GlobalConfig globalConfig = new GlobalConfig(); + globalConfig.setMetaObjectHandler(new MetaHandler()); + return globalConfig; + } + +} diff --git a/src/main/java/com/subsidy/common/configure/PolyvConfig.java b/src/main/java/com/subsidy/common/configure/PolyvConfig.java new file mode 100644 index 0000000..8082d40 --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/PolyvConfig.java @@ -0,0 +1,19 @@ +package com.subsidy.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Component +@Data +@ConfigurationProperties(prefix = "polyv") +public class PolyvConfig { + + private String userId; + + private String appId; + + private String appSecret; + + private String secretKey; +} diff --git a/src/main/java/com/subsidy/common/configure/QXueYouConfig.java b/src/main/java/com/subsidy/common/configure/QXueYouConfig.java new file mode 100644 index 0000000..0bf6873 --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/QXueYouConfig.java @@ -0,0 +1,18 @@ +package com.subsidy.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Data +@Configuration +@ConfigurationProperties(prefix = "qxueyou") +public class QXueYouConfig { + + private String appId; + + private String securityKey; + + private String url; + +} diff --git a/src/main/java/com/subsidy/common/configure/QuartzConfig.java b/src/main/java/com/subsidy/common/configure/QuartzConfig.java new file mode 100644 index 0000000..b9c9a33 --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/QuartzConfig.java @@ -0,0 +1,46 @@ +package com.subsidy.common.configure; + +import org.quartz.Scheduler; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.ClassPathResource; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; + +import javax.sql.DataSource; + +/** + *

+ * Quartz配置 + *

+ * + * @author DengMin + * @since 2020/12/8 + */ +@Configuration +public class QuartzConfig { + + @Autowired + private JobFactory jobFactory; + + @Autowired + private DataSource dataSource; + + @Bean + public SchedulerFactoryBean schedulerFactoryBean() { + SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean(); + schedulerFactoryBean.setOverwriteExistingJobs(true); + schedulerFactoryBean.setStartupDelay(60); + schedulerFactoryBean.setJobFactory(jobFactory); + schedulerFactoryBean.setOverwriteExistingJobs(true); + schedulerFactoryBean.setStartupDelay(1); + schedulerFactoryBean.setDataSource(dataSource); + schedulerFactoryBean.setConfigLocation(new ClassPathResource("/application-quartz.properties")); + return schedulerFactoryBean; + } + + @Bean + public Scheduler scheduler() { + return schedulerFactoryBean().getScheduler(); + } +} diff --git a/src/main/java/com/subsidy/common/configure/RedisConfig.java b/src/main/java/com/subsidy/common/configure/RedisConfig.java new file mode 100644 index 0000000..63cf2de --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/RedisConfig.java @@ -0,0 +1,122 @@ +package com.subsidy.common.configure; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.HashOperations; +import org.springframework.data.redis.core.ListOperations; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.SetOperations; +import org.springframework.data.redis.core.ValueOperations; +import org.springframework.data.redis.core.ZSetOperations; +import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; +import org.springframework.data.redis.serializer.StringRedisSerializer; + +@EnableCaching + +/** + *

+ * Redis + *

+ * + * @author DengMin + * @since 2020/12/14 + */ +@Configuration +public class RedisConfig extends CachingConfigurerSupport { + + /** + * retemplate相关配置 + * @param factory + * @return + */ + @Bean + public RedisTemplate redisTemplate(RedisConnectionFactory factory) { + + RedisTemplate template = new RedisTemplate<>(); + // 配置连接工厂 + template.setConnectionFactory(factory); + + //使用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值(默认使用JDK的序列化方式) + Jackson2JsonRedisSerializer jacksonSeial = new Jackson2JsonRedisSerializer(Object.class); + + ObjectMapper om = new ObjectMapper(); + // 指定要序列化的域,field,get和set,以及修饰符范围,ANY是都有包括private和public + om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); + // 指定序列化输入的类型,类必须是非final修饰的,final修饰的类,比如String,Integer等会跑出异常 + om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); + jacksonSeial.setObjectMapper(om); + + // 值采用json序列化 + template.setValueSerializer(jacksonSeial); + //使用StringRedisSerializer来序列化和反序列化redis的key值 + template.setKeySerializer(new StringRedisSerializer()); + + // 设置hash key 和value序列化模式 + template.setHashKeySerializer(new StringRedisSerializer()); + template.setHashValueSerializer(jacksonSeial); + template.afterPropertiesSet(); + + return template; + } + + /** + * 对hash类型的数据操作 + * + * @param redisTemplate + * @return + */ + @Bean + public HashOperations hashOperations(RedisTemplate redisTemplate) { + return redisTemplate.opsForHash(); + } + + /** + * 对redis字符串类型数据操作 + * + * @param redisTemplate + * @return + */ + @Bean + public ValueOperations valueOperations(RedisTemplate redisTemplate) { + return redisTemplate.opsForValue(); + } + + /** + * 对链表类型的数据操作 + * + * @param redisTemplate + * @return + */ + @Bean + public ListOperations listOperations(RedisTemplate redisTemplate) { + return redisTemplate.opsForList(); + } + + /** + * 对无序集合类型的数据操作 + * + * @param redisTemplate + * @return + */ + @Bean + public SetOperations setOperations(RedisTemplate redisTemplate) { + return redisTemplate.opsForSet(); + } + + /** + * 对有序集合类型的数据操作 + * + * @param redisTemplate + * @return + */ + @Bean + public ZSetOperations zSetOperations(RedisTemplate redisTemplate) { + return redisTemplate.opsForZSet(); + } +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/common/configure/RemoteProperties.java b/src/main/java/com/subsidy/common/configure/RemoteProperties.java new file mode 100644 index 0000000..23a42de --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/RemoteProperties.java @@ -0,0 +1,36 @@ +package com.subsidy.common.configure; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.PropertySource; +import org.springframework.stereotype.Component; + +import java.util.HashMap; +import java.util.Map; + +/** + *

+ * 读取状态码 + *

+ * + * @author DengMin + * @date Created in 2020/08/24 + */ +@Component +@ConfigurationProperties(prefix = "meishu") +@PropertySource(value = "classpath:code.properties", encoding = "UTF-8") +public class RemoteProperties { + + private static Map codeMessage = new HashMap<>(); + + public static String getMessage(Integer code) { + return codeMessage.get(code); + } + + public Map getCodeMessage() { + return codeMessage; + } + + public void setCodeMessage(Map codeMessage) { + RemoteProperties.codeMessage = codeMessage; + } +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/common/configure/RenSheConfig.java b/src/main/java/com/subsidy/common/configure/RenSheConfig.java new file mode 100644 index 0000000..65e7680 --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/RenSheConfig.java @@ -0,0 +1,20 @@ +package com.subsidy.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Component +@Data +@ConfigurationProperties(prefix = "renshe") +public class RenSheConfig { + + //接口地址 + private String url; + + //私钥 + private String secretKey; + + //普陀 正式接口 + private String putuo; +} diff --git a/src/main/java/com/subsidy/common/configure/RestTemplateConfig.java b/src/main/java/com/subsidy/common/configure/RestTemplateConfig.java new file mode 100644 index 0000000..c4f692f --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/RestTemplateConfig.java @@ -0,0 +1,31 @@ +package com.subsidy.common.configure; + +import org.springframework.context.annotation.Bean; +import org.springframework.http.MediaType; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.stereotype.Component; +import org.springframework.web.client.RestTemplate; + +import java.util.ArrayList; +import java.util.List; + +@Component +public class RestTemplateConfig { + + @Bean + public RestTemplate restTemplate() { + RestTemplate restTemplate = new RestTemplate(); + restTemplate.getMessageConverters().add(new WxMappingJackson2HttpMessageConverter()); + return restTemplate; + } + + public class WxMappingJackson2HttpMessageConverter extends MappingJackson2HttpMessageConverter { + public WxMappingJackson2HttpMessageConverter(){ + List mediaTypes = new ArrayList<>(); + mediaTypes.add(MediaType.TEXT_PLAIN); + mediaTypes.add(MediaType.TEXT_HTML); + setSupportedMediaTypes(mediaTypes); + } + } + +} diff --git a/src/main/java/com/subsidy/common/configure/SubsidyConfig.java b/src/main/java/com/subsidy/common/configure/SubsidyConfig.java new file mode 100644 index 0000000..18d8cbf --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/SubsidyConfig.java @@ -0,0 +1,18 @@ +package com.subsidy.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Data +@Configuration +@ConfigurationProperties(prefix = "subsidy") +public class SubsidyConfig { + + private String appId; + + private String securityKey; + + private String url; + +} diff --git a/src/main/java/com/subsidy/common/configure/SwaggerConfig.java b/src/main/java/com/subsidy/common/configure/SwaggerConfig.java new file mode 100644 index 0000000..541608f --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/SwaggerConfig.java @@ -0,0 +1,31 @@ +package com.subsidy.common.configure; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +@Configuration +@EnableSwagger2 +public class SwaggerConfig { + @Bean + public Docket createRestApi() { + return new Docket(DocumentationType.SWAGGER_2) + .pathMapping("/") + .select() + .apis(RequestHandlerSelectors.basePackage("com.subsidy")) + .paths(PathSelectors.any()) + .build().apiInfo(new ApiInfoBuilder() + .title("顶岗实习端") + .description("接口文档规范") + .version("1.0") +// .contact(new Contact("啊啊啊啊","www.youkehulian.com","tcp@meishu.com")) +// .license("The Apache License") +// .licenseUrl("http://www.baidu.com") + .build()); + } +} diff --git a/src/main/java/com/subsidy/common/configure/VODConfig.java b/src/main/java/com/subsidy/common/configure/VODConfig.java new file mode 100644 index 0000000..b27c94c --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/VODConfig.java @@ -0,0 +1,27 @@ +package com.subsidy.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * @author: tuyp + * @create: 2020-06-01 16:46 + */ +@Component +@Data +@ConfigurationProperties(prefix = "vod") +public class VODConfig { + + private String appId; + + private String secretId; + + private String secretKey; + + private String api; + + private String region; + + private Integer classId; +} diff --git a/src/main/java/com/subsidy/common/configure/WebConfig.java b/src/main/java/com/subsidy/common/configure/WebConfig.java new file mode 100644 index 0000000..07c78cd --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/WebConfig.java @@ -0,0 +1,78 @@ +package com.subsidy.common.configure; + + +import com.subsidy.common.interceptor.AuthenticationInterceptor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * @author DengMin + * @date 2020/07/06 + **/ +@Configuration +public class WebConfig implements WebMvcConfigurer { + + @Autowired + private AuthenticationInterceptor authenticationInterceptor; + + /** + * 跨域支持 + * + * @param registry + */ + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") +// .allowCredentials(true) + .allowedOrigins("*") + .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS") + .allowedHeaders("*") + .maxAge(3600); + } + + /** + * Swagger + * + * @param registry + */ + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/**").addResourceLocations("classpath:/static/"); + registry.addResourceHandler("swagger-ui.html") + .addResourceLocations("classpath:/META-INF/resources/"); + registry.addResourceHandler("/webjars/**") + .addResourceLocations("classpath:/META-INF/resources/webjars/"); + } + + /** + * 鉴权 + * + * @param registry + */ + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(authenticationInterceptor) + .excludePathPatterns("/static/*") + .addPathPatterns("/**"); + } + + @Bean + public CorsFilter corsFilter() { + CorsConfiguration config = new CorsConfiguration(); + config.setMaxAge(3600L); + config.addAllowedOrigin("*"); + config.addAllowedMethod("*"); + config.addAllowedHeader("*"); + UrlBasedCorsConfigurationSource configSource = new UrlBasedCorsConfigurationSource(); + configSource.registerCorsConfiguration("/**", config); + return new CorsFilter(configSource); + } +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/common/configure/WebLogAspect.java b/src/main/java/com/subsidy/common/configure/WebLogAspect.java new file mode 100644 index 0000000..ebfe688 --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/WebLogAspect.java @@ -0,0 +1,58 @@ +package com.subsidy.common.configure; + +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.annotation.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.util.Arrays; + +@Aspect +@Component +@Order(1) +public class WebLogAspect { + + private final Logger logger = LoggerFactory.getLogger(WebLogAspect.class); + + @Pointcut("execution(public * com.subsidy.controller.*.*(..))")//切入点描述 这个是controller包的切入点 + public void controllerLog(){}//签名,可以理解成这个切入点的一个名称 + + @Pointcut("execution(public * com.subsidy.controller.*.*(..))") + public void serviceImplLog(){} + + @Before("controllerLog()") //在切入点的方法run之前要干的 + public void logBeforeController(JoinPoint joinPoint) { + + +// RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); + //这个RequestContextHolder是Springmvc提供来获得请求的东西 +// HttpServletRequest request = ((ServletRequestAttributes)requestAttributes).getRequest(); + + // 记录下请求内容 +// logger.info("####requestUrl : " + request.getRequestURL().toString()); +// logger.info("####requestParam : " + Arrays.toString(joinPoint.getArgs())); + + } + +// @Around("serviceImplLog()") +// public Object afterController(ProceedingJoinPoint proceedingJoinPoint) { +// +// Object result = null; +// +// try{ +// result = proceedingJoinPoint.proceed(); +// logger.info("====reulst"+result); +// }catch (Throwable e){ +// MyException myException =(MyException)e; +// throw myException; +// } +// return result; +// } + +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/common/configure/WechatConfig.java b/src/main/java/com/subsidy/common/configure/WechatConfig.java new file mode 100644 index 0000000..050e82b --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/WechatConfig.java @@ -0,0 +1,24 @@ +package com.subsidy.common.configure; + + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Data +@Configuration +@ConfigurationProperties(prefix = "wechat") +public class WechatConfig { + + private String appId; + + private String appSecret; + + //private String msgUrl; + // + //private String templateId; + // + //private String agentId; + + +} diff --git a/src/main/java/com/subsidy/common/constant/AttendanceConstant.java b/src/main/java/com/subsidy/common/constant/AttendanceConstant.java new file mode 100644 index 0000000..1305fc9 --- /dev/null +++ b/src/main/java/com/subsidy/common/constant/AttendanceConstant.java @@ -0,0 +1,29 @@ +package com.subsidy.common.constant; + +public class AttendanceConstant { + + /** + * 创建预约api + */ + public static final String CREATE_TOPIC_URL = "https://open.api.roomis.com.cn/api/my/booking/spaces/{spaceId}/events"; + + /** + * 考勤api + */ + public static final String GET_ATTENDANCE_URL = "https://open.api.roomis.com.cn/api/attendance/{id}"; + + /** + * 创建人ID + */ + public static Long organizerId = 200000222L; + + /** + * 开始时间 + */ + public static String startTime = "07:00:00"; + + /** + * 结束时间 + */ + public static String endTime = "21:00:00"; +} diff --git a/src/main/java/com/subsidy/common/constant/Code.java b/src/main/java/com/subsidy/common/constant/Code.java new file mode 100644 index 0000000..fbe57a0 --- /dev/null +++ b/src/main/java/com/subsidy/common/constant/Code.java @@ -0,0 +1,33 @@ +package com.subsidy.common.constant; + +import lombok.Getter; + +@Getter +public enum Code { + + USERNAMENOTFOUND(1001, "用户不存在"), + BADCREDENTIALS(1002,"账户或者密码错误"), + ACCOUNTEXPIRED(1003,"账户过期"), + LOCKEDEXCEPTION(1004, "账户已锁定"), + DISABLEDEXCEPTION(1005,"账户已禁用"), + ACCESSDENIED(1006,"无权限访问"), + AUTHENTICATION(1007,"身份验证异常"), + NOHANDLERFOUND(1008,"找不到相应的视图处理器"), + PARAM_INVALID(1009, "参数不合法"), + TOKEN_EXCEPTION(1010, "无效的令牌"), + TOKEN_EXPIRED(1011, "当前账户已在其他设备登录"), + TOKEN_VERIFICATION_FAILED(1013, "令牌验证失败"), + OSS_ERROR(1012, "OSS文件上传异常"), + Network_ERROR(9000, "网络请求失败"), + SERVER_INTERNAL_ERROR(99999, "服务器内部错误"), + ; + + private Integer code; + + private String message; + + Code(Integer code, String message) { + this.code = code; + this.message = message; + } +} diff --git a/src/main/java/com/subsidy/common/constant/CourseNotification.java b/src/main/java/com/subsidy/common/constant/CourseNotification.java new file mode 100644 index 0000000..0111f35 --- /dev/null +++ b/src/main/java/com/subsidy/common/constant/CourseNotification.java @@ -0,0 +1,8 @@ +package com.subsidy.common.constant; + +public class CourseNotification { + + public static final String UNSENT = "待发送"; + + public static final String SENT = "已发送"; +} diff --git a/src/main/java/com/subsidy/common/constant/SmsCode.java b/src/main/java/com/subsidy/common/constant/SmsCode.java new file mode 100644 index 0000000..aef2eb2 --- /dev/null +++ b/src/main/java/com/subsidy/common/constant/SmsCode.java @@ -0,0 +1,23 @@ +package com.subsidy.common.constant; + +import lombok.Getter; + +@Getter +public enum SmsCode { + + SIGN_IN("SMS_234409992", "签到通知"), + TEST("SMS_234414789", "测试通知"), + CLASS_START("SMS_228137810", "开课通知"), + ALL("SMS_228137810", "全部成员"), + NOT_SIGNED_IN("SMS_234409992","未签到成员"), + UNFINISHED("SMS_234414789","未完课成员"); + + private String type; + + private String code; + + SmsCode(String code, String type) { + this.code = code; + this.type = type; + } +} diff --git a/src/main/java/com/subsidy/common/constant/VodConstant.java b/src/main/java/com/subsidy/common/constant/VodConstant.java new file mode 100644 index 0000000..12fe119 --- /dev/null +++ b/src/main/java/com/subsidy/common/constant/VodConstant.java @@ -0,0 +1,31 @@ +package com.subsidy.common.constant; + +import lombok.Getter; + +@Getter +public class VodConstant { + + /* 流量 */ + public final static String FLUX = "Flux"; + + /* 带宽 */ + public final static String BANDWIDTH = "Bandwidth"; + + /* 请求数 */ + public final static String REQUESTS = "Requests"; + + /* 请求命中率 */ + public final static String HITRATE = "Hitrate"; + + /* IP访问次数 */ + public final static String IP_VISITS = "Ip_visits"; + + /* 带宽缓存key */ + public final static String BANDWIDTH_CACHE_KEY = "CDNStatBandwidthCache"; + + /* 流量缓存key */ + public final static String FLUX_CACHE_KEY = "CDNStatFluxCache"; + + /* 自定义缓存名称(ehcache.xml中的自定义规则名称) */ + public final static String CDN_STAT_DETAILS_CACHE_NAME = "CDNStatDetails"; +} diff --git a/src/main/java/com/subsidy/common/constant/WxConstant.java b/src/main/java/com/subsidy/common/constant/WxConstant.java new file mode 100644 index 0000000..41ed23a --- /dev/null +++ b/src/main/java/com/subsidy/common/constant/WxConstant.java @@ -0,0 +1,35 @@ +package com.subsidy.common.constant; + +public class WxConstant { + + /** + * app id + */ + public static final String APPID = "wx75ec06e9ce50ef73"; + + /** + * 秘钥 + */ + public static final String SECRENT = "c039d32804278503474dfcf7cb3944b9"; + + /** + * 获取访问用户身份 + */ + public static final String GETUSERINFO = "https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo?access_token={access_token}&code={code}"; + + /** + * 读取成员 + */ + public static final String GET = "https://qyapi.weixin.qq.com/cgi-bin/user/get?access_token={access_token}&userid={userid}"; + + /** + * 获取access_token + */ + public static final String GET_SUITE_TOKEN = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={appid}&secret={secret}"; + + + /** + * 扫码登陆回调地址 + */ + public static final String QR_REDIRECT_URL = "http://massadmin.youkehulian.com"; +} diff --git a/src/main/java/com/subsidy/common/exception/GlobalExceptionHandler.java b/src/main/java/com/subsidy/common/exception/GlobalExceptionHandler.java new file mode 100644 index 0000000..2e535e9 --- /dev/null +++ b/src/main/java/com/subsidy/common/exception/GlobalExceptionHandler.java @@ -0,0 +1,119 @@ +package com.subsidy.common.exception; + +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.configure.RemoteProperties; +import com.subsidy.common.constant.Code; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.formula.functions.T; +import org.springframework.http.converter.HttpMessageNotReadableException; +import org.springframework.validation.BindException; +import org.springframework.web.HttpRequestMethodNotSupportedException; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.NoHandlerFoundException; + +import javax.servlet.http.HttpServletRequest; +import java.util.ArrayList; +import java.util.List; + +/** + * 异常处理 + * @author DengMin + * @date 2020/07/14 + **/ +@Slf4j +@RestControllerAdvice +public class GlobalExceptionHandler { + + /** + * 自定义异常 + * @param e + * @return + */ + @ExceptionHandler(value = HttpException.class) + public ResponseVO handlerException(HttpServletRequest request, HttpException e) { + String message = RemoteProperties.getMessage(e.getCode()); + if(StringUtils.isBlank(message)) { + message = e.getMessage(); + } + String url = request.getRequestURI(); + return ResponseData.generateCreatedResponse(e.getCode(), message, url); + } + + /** + * 404 + * @param request + * @return + */ + @ExceptionHandler(value = NoHandlerFoundException.class) + public ResponseVO NoHandlerFoundException(HttpServletRequest request) { + String url = request.getRequestURI(); + return ResponseData.generateCreatedResponse(Code.NOHANDLERFOUND.getCode(), Code.NOHANDLERFOUND.getMessage(), url); + } + + /** + * 请求方式错误 + * @param request + * @return + */ + @ExceptionHandler(value = HttpRequestMethodNotSupportedException.class) + public ResponseVO HttpRequestMethodNotSupportedException(HttpServletRequest request) { + String url = request.getRequestURI(); + return ResponseData.generateCreatedResponse(Code.NOHANDLERFOUND.getCode(), Code.NOHANDLERFOUND.getMessage(), url); + } + + /** + * 参数不合法 + * @param e + * @return + */ + @ExceptionHandler(MethodArgumentNotValidException.class) + public ResponseVO validateException(MethodArgumentNotValidException e){ + final List errList = new ArrayList<>(); + e.getBindingResult().getAllErrors().stream().forEach(x -> { + errList.add(x.getDefaultMessage()); + }); + return ResponseData.generateCreatedResponse(Code.PARAM_INVALID.getCode(), Code.PARAM_INVALID.getMessage(), errList.toString()); + } + + /** + * JSON 序列化异常 + * @param e + * @return + */ + @ExceptionHandler(HttpMessageNotReadableException.class) + public ResponseVO exceptionHandler(HttpMessageNotReadableException e) { + log.error(e.getMessage()); + return ResponseData.generateCreatedResponse(Code.PARAM_INVALID.getCode(), Code.PARAM_INVALID.getMessage()+":{"+e.getMessage()+"}"); + } + + /** + * 校验异常 + * @param e + * @return + */ + @ExceptionHandler(BindException.class) + public ResponseVO BindException(BindException e){ + final List errList = new ArrayList<>(); + e.getBindingResult().getAllErrors().stream().forEach(x -> { + errList.add(x.getDefaultMessage()); + }); + return ResponseData.generateCreatedResponse(Code.PARAM_INVALID.getCode(), Code.PARAM_INVALID.getMessage(), errList.toString()); + } + + /** + * 服务器内部错误 + * @return + */ + @ExceptionHandler(value = Exception.class) + public ResponseVO serverInternalError(Exception e, HttpServletRequest request) { + String url = request.getRequestURI(); +// log.error("path:"+url); +// log.error("---- error message: ---"+e.toString()); + e.printStackTrace(); + return ResponseData.generateCreatedResponse(Code.SERVER_INTERNAL_ERROR.getCode(), Code.SERVER_INTERNAL_ERROR.getMessage(), url); + } +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/common/exception/HttpException.java b/src/main/java/com/subsidy/common/exception/HttpException.java new file mode 100644 index 0000000..291188b --- /dev/null +++ b/src/main/java/com/subsidy/common/exception/HttpException.java @@ -0,0 +1,45 @@ +package com.subsidy.common.exception; + + +import com.subsidy.common.configure.RemoteProperties; + +/** + * 异常处理 + * @author DengMin + * @date 2020/08/12 + **/ +public class HttpException extends RuntimeException{ + + private Integer code; + + private String message; + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + @Override + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public HttpException(Integer code) { + super(RemoteProperties.getMessage(code)); + String message = RemoteProperties.getMessage(code); + this.message = message; + this.code = code; + } + + public HttpException(Integer code, String message) { + this.message = message; + this.code = code; + } +} diff --git a/src/main/java/com/subsidy/common/handler/MetaHandler.java b/src/main/java/com/subsidy/common/handler/MetaHandler.java new file mode 100644 index 0000000..9e83fcd --- /dev/null +++ b/src/main/java/com/subsidy/common/handler/MetaHandler.java @@ -0,0 +1,26 @@ +package com.subsidy.common.handler; + +import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; +import org.apache.ibatis.reflection.MetaObject; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; + +/** + * 填充配置 + * @author DengMin + * @date 2020/07/21 + **/ +@Component +public class MetaHandler implements MetaObjectHandler { + + @Override + public void insertFill(MetaObject metaObject) { + this.setFieldValByName("createDate", LocalDateTime.now(), metaObject); + } + + @Override + public void updateFill(MetaObject metaObject) { + this.setFieldValByName("updateDate", LocalDateTime.now(), metaObject); + } +} diff --git a/src/main/java/com/subsidy/common/interceptor/AuthenticationInterceptor.java b/src/main/java/com/subsidy/common/interceptor/AuthenticationInterceptor.java new file mode 100644 index 0000000..d7bd6be --- /dev/null +++ b/src/main/java/com/subsidy/common/interceptor/AuthenticationInterceptor.java @@ -0,0 +1,107 @@ +package com.subsidy.common.interceptor; + +import com.auth0.jwt.interfaces.Claim; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.subsidy.common.exception.HttpException; +import com.subsidy.mapper.AdministerMapper; +import com.subsidy.model.AdministerDO; +import com.subsidy.util.ConstantUtils; +import com.subsidy.util.JwtUtil; +import com.subsidy.util.Localstorage; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.method.HandlerMethod; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.lang.reflect.Method; +import java.util.Calendar; +import java.util.Map; + +/** + *

+ * 鉴权拦截器 + *

+ * + * @author DengMin + * @since 2021/4/14 + */ +@Component +public class AuthenticationInterceptor implements HandlerInterceptor { + + @Autowired + private AdministerMapper administerMapper; + + @Override + @CrossOrigin() + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { + // 不需要进行拦截 + if (!(handler instanceof HandlerMethod)) { + return true; + } + + HandlerMethod handlerMethod = (HandlerMethod) handler; + Method method = handlerMethod.getMethod(); + + TimeRequired timeRequired = method.getAnnotation(TimeRequired.class); + if (timeRequired != null) { + Calendar calendar = Calendar.getInstance(); + + int hour = calendar.get(Calendar.HOUR_OF_DAY); + if (hour < 6 || hour >= 23 ) { + throw new HttpException(17001); + } + } + + LoginRequired methodAnnotation = method.getAnnotation(LoginRequired.class); + if (methodAnnotation != null) { + String authorization = request.getHeader("Authorization"); + if (!StringUtils.isBlank(authorization)) { + String token = authorization; + if (authorization.startsWith("Bearer")) { + token = authorization.replace("Bearer ", ""); + } + /*Token不存在*/ + if (token == null || !JwtUtil.verifyToken(token)) { + throw new HttpException(1010); + } + + Map claimMap = JwtUtil.getClaims(token); + if (claimMap != null) { + //String[] role = methodAnnotation.value(); + String type = claimMap.get("type").asString(); + if (ConstantUtils.ADMINISTER_TERMINATE.equals(type)) { + AdministerDO administerDO = administerMapper.selectById(claimMap.get("id").asLong()); + if (administerDO != null) { + Localstorage.setUser(administerDO); + return true; + } + } else if (ConstantUtils.MOBILE_TERMINATE.equals(type)) { + + + /** + * 学生端设置单设备登录 + */ + /* String tk = (String) redisUtil.get(ConstantUtils.MOBILE_TERMINATE+"_"+claimMap.get("id").asLong()); + if(StringUtils.isNotBlank(tk)) { + if(tk.equals(token)) { + return true; + } + + throw new HttpException(1011); + } else { + throw new HttpException(1010); + }*/ + } else { + throw new HttpException(1010); + } + } + } + throw new HttpException(1010); + } + return true; + } + +} diff --git a/src/main/java/com/subsidy/controller/AdministerController.java b/src/main/java/com/subsidy/controller/AdministerController.java new file mode 100644 index 0000000..f202862 --- /dev/null +++ b/src/main/java/com/subsidy/controller/AdministerController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *

+ * 管理平台用户 前端控制器 + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +@RestController +@Api(tags = "管理平台用户") +@RequestMapping("/administer-do") +public class AdministerController { + +} diff --git a/src/main/java/com/subsidy/controller/ProjectController.java b/src/main/java/com/subsidy/controller/ProjectController.java new file mode 100644 index 0000000..0ca72e7 --- /dev/null +++ b/src/main/java/com/subsidy/controller/ProjectController.java @@ -0,0 +1,97 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.dto.administer.VerifyCodeDTO; +import com.subsidy.dto.labor.SalaryListSumDTO; +import com.subsidy.dto.labor.UpdateTelephoneDTO; +import com.subsidy.model.MemberDO; +import com.subsidy.service.ProjectService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *

+ * 项目表 前端控制器 + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +@RestController +@Api(tags = "项目表") +@RequestMapping("/project") +public class ProjectController { + + @Autowired + private ProjectService projectService; + + @PostMapping("sendSms") + @ApiOperation("发送验证码 telephone ") + public ResponseVO sendSms(@RequestBody MemberDO memberDO){ + return ResponseData.generateCreatedResponse(0,projectService.sendSms(memberDO)); + } + + @PostMapping("login") + @ApiOperation("登录 telephone verifyCode") + public ResponseVO login(@RequestBody VerifyCodeDTO verifyCodeDTO){ + return ResponseData.generateCreatedResponse(0,projectService.login(verifyCodeDTO)); + } + + @PostMapping("currentProject") + @ApiOperation("当前所在项目 id 人才id") + public ResponseVO currentProject(@RequestBody MemberDO memberDO){ + return ResponseData.generateCreatedResponse(0,projectService.currentProject(memberDO)); + } + + @PostMapping("historyProjects") + @ApiOperation("历史所有职位 id 人才id") + public ResponseVO historyProjects(@RequestBody MemberDO memberDO){ + return ResponseData.generateCreatedResponse(0,projectService.historyProjects(memberDO)); + } + + @PostMapping("verify") + @ApiOperation("变更绑定手机--验证验证码 verifyCode") + public ResponseVO verify(@RequestBody VerifyCodeDTO verifyCodeDTO){ + return ResponseData.generateCreatedResponse(0,projectService.verify(verifyCodeDTO)); + } + + @PostMapping("updateTelephone") + @ApiOperation("更新手机号 id telephone verifyCode ") + public ResponseVO updateTelephone(@RequestBody UpdateTelephoneDTO updateTelephoneDTO){ + return ResponseData.generateCreatedResponse(0,projectService.updateTelephone(updateTelephoneDTO)); + } + + @PostMapping("idCardInfo") + @ApiOperation("身份证信息 id") + public ResponseVO idCardInfo(@RequestBody MemberDO memberDO){ + return ResponseData.generateCreatedResponse(0,projectService.idCardInfo(memberDO)); + } + + @PostMapping("bankInfo") + @ApiOperation("银行卡信息 id") + public ResponseVO bankInfo(@RequestBody MemberDO memberDO){ + return ResponseData.generateCreatedResponse(0,projectService.bankInfo(memberDO)); + } + + @PostMapping("salaryListSum") + @ApiOperation("工资单--笔数+总计 memberId 人才id projectId 项目id ") + public ResponseVO salaryListSum(@RequestBody SalaryListSumDTO salaryListSumDTO){ + return ResponseData.generateCreatedResponse(0,projectService.salaryListSum(salaryListSumDTO)); + } + + @PostMapping("salaryList") + @ApiOperation("工资单明细 memberId 人才id projectId 项目id pageSize pageNum ") + public ResponseVO salaryList(@RequestBody SalaryListSumDTO salaryListSumDTO){ + return ResponseData.generateCreatedResponse(0,projectService.salaryList(salaryListSumDTO)); + } + + +} diff --git a/src/main/java/com/subsidy/dto/administer/VerifyCodeDTO.java b/src/main/java/com/subsidy/dto/administer/VerifyCodeDTO.java new file mode 100644 index 0000000..2d3dd68 --- /dev/null +++ b/src/main/java/com/subsidy/dto/administer/VerifyCodeDTO.java @@ -0,0 +1,11 @@ +package com.subsidy.dto.administer; + +import lombok.Data; + +@Data +public class VerifyCodeDTO { + + private String telephone; + + private String verifyCode; +} diff --git a/src/main/java/com/subsidy/dto/labor/SalaryListSumDTO.java b/src/main/java/com/subsidy/dto/labor/SalaryListSumDTO.java new file mode 100644 index 0000000..91b7ab3 --- /dev/null +++ b/src/main/java/com/subsidy/dto/labor/SalaryListSumDTO.java @@ -0,0 +1,16 @@ +package com.subsidy.dto.labor; + +import lombok.Data; + +@Data +public class SalaryListSumDTO { + + private Long memberId; + + private Long projectId; + + private Integer pageSize; + + private Integer pageNum; + +} diff --git a/src/main/java/com/subsidy/dto/labor/UpdateTelephoneDTO.java b/src/main/java/com/subsidy/dto/labor/UpdateTelephoneDTO.java new file mode 100644 index 0000000..b66d74a --- /dev/null +++ b/src/main/java/com/subsidy/dto/labor/UpdateTelephoneDTO.java @@ -0,0 +1,14 @@ +package com.subsidy.dto.labor; + +import lombok.Data; + +@Data +public class UpdateTelephoneDTO { + + private Long id; + + private String telephone; + + private String verifyCode; + +} diff --git a/src/main/java/com/subsidy/mapper/ProjectMemberMappingMapper.java b/src/main/java/com/subsidy/mapper/ProjectMemberMappingMapper.java new file mode 100644 index 0000000..37bf1e8 --- /dev/null +++ b/src/main/java/com/subsidy/mapper/ProjectMemberMappingMapper.java @@ -0,0 +1,33 @@ +package com.subsidy.mapper; + +import com.subsidy.model.ProjectMemberMappingDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.subsidy.vo.labor.CurrentProjectVO; +import com.subsidy.vo.labor.HistoryProjectsVO; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 项目人员映射表 Mapper 接口 + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +@Repository +public interface ProjectMemberMappingMapper extends BaseMapper { + + + /** + * 查看某人当前所在项目 + */ + CurrentProjectVO currentProject(Long memberId); + + /** + * 某人的历史职位 + */ + List historyProjects(Long memberId); + +} diff --git a/src/main/java/com/subsidy/mapper/ProjectSalaryHistoryMapper.java b/src/main/java/com/subsidy/mapper/ProjectSalaryHistoryMapper.java new file mode 100644 index 0000000..49ce75d --- /dev/null +++ b/src/main/java/com/subsidy/mapper/ProjectSalaryHistoryMapper.java @@ -0,0 +1,25 @@ +package com.subsidy.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.subsidy.model.ProjectSalaryHistoryDO; +import com.subsidy.vo.labor.SalaryListSumVO; +import com.subsidy.vo.labor.SalaryListVO; +import org.springframework.stereotype.Repository; + +/** + *

+ * 工资单历史表 Mapper 接口 + *

+ * + * @author Tuyp + * @since 2024-07-11 + */ +@Repository +public interface ProjectSalaryHistoryMapper extends BaseMapper { + + SalaryListSumVO salaryCount(Long project, Long memberId); + + IPage salaryList(IPage page, Long projectId, Long memberId); + +} diff --git a/src/main/java/com/subsidy/mapper/SmsVerifyCodeMapper.java b/src/main/java/com/subsidy/mapper/SmsVerifyCodeMapper.java new file mode 100644 index 0000000..7c73f4a --- /dev/null +++ b/src/main/java/com/subsidy/mapper/SmsVerifyCodeMapper.java @@ -0,0 +1,18 @@ +package com.subsidy.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.subsidy.model.SmsVerifyCodeDO; +import org.springframework.stereotype.Repository; + +/** + *

+ * 短信验证码记录表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2021-10-14 + */ + @Repository +public interface SmsVerifyCodeMapper extends BaseMapper { + +} diff --git a/src/main/java/com/subsidy/model/AdministerDO.java b/src/main/java/com/subsidy/model/AdministerDO.java new file mode 100644 index 0000000..b97295c --- /dev/null +++ b/src/main/java/com/subsidy/model/AdministerDO.java @@ -0,0 +1,77 @@ +package com.subsidy.model; + +import com.subsidy.util.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 管理平台用户 + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("administer") +public class AdministerDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 手机号 + */ + private String telephone; + + /** + * 账号 + */ + private String accountName; + + /** + * 密码 + */ + private String password; + + /** + * 公司id + */ + private Long companyId; + + /** + * 成员名称 + */ + private String userName; + + /** + * 头像 + */ + private String img; + + /** + * 1:启用 0:禁用 + */ + private String status; + + /** + * 角色 0:应用 1:企业关联客户 2:中心 3:企业唯一账号,4:院校唯一账号 5:院校关联账号 6:伙伴唯一账号 7:伙伴关联账号 + */ + private Integer role; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/src/main/java/com/subsidy/model/AdministerProjectMappingDO.java b/src/main/java/com/subsidy/model/AdministerProjectMappingDO.java new file mode 100644 index 0000000..f0d71df --- /dev/null +++ b/src/main/java/com/subsidy/model/AdministerProjectMappingDO.java @@ -0,0 +1,33 @@ +package com.subsidy.model; + +import com.subsidy.util.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 管理员-项目映射表 + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("administer_project_mapping") +public class AdministerProjectMappingDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private Long administerId; + + private Long projectId; + + +} diff --git a/src/main/java/com/subsidy/model/MemberDO.java b/src/main/java/com/subsidy/model/MemberDO.java new file mode 100644 index 0000000..1df8af3 --- /dev/null +++ b/src/main/java/com/subsidy/model/MemberDO.java @@ -0,0 +1,170 @@ +package com.subsidy.model; + +import com.subsidy.util.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("member") +public class MemberDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 院校id + */ + private Long academyId; + + /** + * 公司名 弃用 + */ + private Long companyId; + + /** + * 姓名 + */ + private String userName; + + /** + * 账号 + */ + private String accountName; + + /** + * 英文名 + */ + private String accountNameEn; + + /** + * 邮箱 + */ + private String email; + + /** + * 工号 + */ + private String workNo; + + /** + * 入职时间 + */ + private String inductionDate; + + /** + * 手机号 + */ + private String telephone; + + /** + * 密码 + */ + private String password; + + /** + * 性别 + */ + private String gender; + + /** + * 头像 + */ + private String image; + + /** + * 人脸核验--照片 + */ + private String checkImage; + + /** + * 采集时间 + */ + private LocalDateTime checkTime; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 身份证照片 + */ + private String idCardPhoto; + + /** + * 启用/冻结 + */ + private String status; + + /** + * 是否登陆过 1 是 0 不是 + */ + private Integer firstLogin; + + /** + * QQ号 + */ + private String qqNo; + + /** + * 微信账号 + */ + private String wechat; + + /** + * 实习状态 + */ + private String practiceStatus; + + /** + * 学院id + */ + private Long collegeId; + + /** + * 专业id + */ + private String major; + + /** + * 入学年份 + */ + private String enrollmentYear; + + /** + * 工资账户 + */ + private String payrollAccount; + + /** + * 开户行 + */ + private String bank; + + /** + * 0:学生 2:职工 3:人才 + */ + private Integer memberType; + + + /** + * 微信的openId + */ + private String openId; + +} diff --git a/src/main/java/com/subsidy/model/ProjectDO.java b/src/main/java/com/subsidy/model/ProjectDO.java new file mode 100644 index 0000000..5eb83f9 --- /dev/null +++ b/src/main/java/com/subsidy/model/ProjectDO.java @@ -0,0 +1,59 @@ +package com.subsidy.model; + +import com.subsidy.util.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目表 + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project") +public class ProjectDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目名称 + */ + private String projectName; + + /** + * 关联企业 + */ + private Long companyId; + + /** + * 伙伴id + */ + private Long laborServiceId; + + /** + * 薪资发放日 + */ + private String salaryDate; + + /** + * 开始时间 + */ + private String startDate; + + /** + * 结束时间 + */ + private String endDate; + + +} diff --git a/src/main/java/com/subsidy/model/ProjectMemberMappingDO.java b/src/main/java/com/subsidy/model/ProjectMemberMappingDO.java new file mode 100644 index 0000000..5d23f54 --- /dev/null +++ b/src/main/java/com/subsidy/model/ProjectMemberMappingDO.java @@ -0,0 +1,54 @@ +package com.subsidy.model; + +import com.subsidy.util.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 项目人员映射表 + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_member_mapping") +public class ProjectMemberMappingDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 人员id + */ + private Long memberId; + + /** + * 项目id + */ + private Long projectId; + + /** + * 职位名称 + */ + private String jobName; + + /** + * 排序 + */ + private Integer orderNo; + + /** + * 1:在职 0 已离职 + */ + private Integer status; + + +} diff --git a/src/main/java/com/subsidy/model/ProjectSalaryHistoryDO.java b/src/main/java/com/subsidy/model/ProjectSalaryHistoryDO.java new file mode 100644 index 0000000..b41d198 --- /dev/null +++ b/src/main/java/com/subsidy/model/ProjectSalaryHistoryDO.java @@ -0,0 +1,59 @@ +package com.subsidy.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.subsidy.util.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 工资单历史表 + *

+ * + * @author Tuyp + * @since 2024-07-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("project_salary_history") +public class ProjectSalaryHistoryDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 人员id + */ + private Long memberId; + + /** + * 项目id + */ + private Long projectId; + + /** + * 工资 + */ + private String salary; + + /** + * 备注 + */ + private String salaryMark; + + /** + * 开户行 + */ + private String bank; + + /** + * 账户 + */ + private String payrollAccount; + + +} diff --git a/src/main/java/com/subsidy/model/SmsVerifyCodeDO.java b/src/main/java/com/subsidy/model/SmsVerifyCodeDO.java new file mode 100644 index 0000000..902ae10 --- /dev/null +++ b/src/main/java/com/subsidy/model/SmsVerifyCodeDO.java @@ -0,0 +1,39 @@ +package com.subsidy.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.subsidy.util.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 短信验证码记录表 + *

+ * + * @author DengMin + * @since 2021-10-14 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("sms_verify_code") +public class SmsVerifyCodeDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 手机号 + */ + private String telephone; + + /** + * 验证码 + */ + private String verifyCode; + + +} diff --git a/src/main/java/com/subsidy/service/ProjectService.java b/src/main/java/com/subsidy/service/ProjectService.java new file mode 100644 index 0000000..f2727a3 --- /dev/null +++ b/src/main/java/com/subsidy/service/ProjectService.java @@ -0,0 +1,45 @@ +package com.subsidy.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.subsidy.dto.administer.VerifyCodeDTO; +import com.subsidy.dto.labor.SalaryListSumDTO; +import com.subsidy.dto.labor.UpdateTelephoneDTO; +import com.subsidy.model.MemberDO; +import com.subsidy.model.ProjectDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.subsidy.vo.administer.UserRoleVO; +import com.subsidy.vo.labor.*; + +import java.util.List; + +/** + *

+ * 项目表 服务类 + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +public interface ProjectService extends IService { + + String sendSms(MemberDO memberDO); + + UserRoleVO login(VerifyCodeDTO verifyCodeDTO); + + CurrentProjectVO currentProject(MemberDO memberDO); + + List historyProjects(MemberDO memberDO); + + String verify(VerifyCodeDTO verifyCodeDTO); + + String updateTelephone(UpdateTelephoneDTO updateTelephoneDTO); + + IdCardInfoVO idCardInfo(MemberDO memberDO); + + BankInfoVO bankInfo(MemberDO memberDO); + + SalaryListSumVO salaryListSum(SalaryListSumDTO salaryListSumDTO); + + IPage salaryList(SalaryListSumDTO salaryListSumDTO); + +} diff --git a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java new file mode 100644 index 0000000..f0cccbe --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java @@ -0,0 +1,20 @@ +package com.subsidy.service.impl; + +import com.subsidy.model.AdministerDO; +import com.subsidy.mapper.AdministerMapper; +import com.subsidy.service.AdministerService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 管理平台用户 服务实现类 + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +@Service +public class AdministerServiceImpl extends ServiceImpl implements AdministerService { + +} diff --git a/src/main/java/com/subsidy/service/impl/ProjectServiceImpl.java b/src/main/java/com/subsidy/service/impl/ProjectServiceImpl.java new file mode 100644 index 0000000..5d866ad --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/ProjectServiceImpl.java @@ -0,0 +1,175 @@ +package com.subsidy.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.subsidy.common.exception.HttpException; +import com.subsidy.dto.administer.VerifyCodeDTO; +import com.subsidy.dto.labor.SalaryListSumDTO; +import com.subsidy.dto.labor.UpdateTelephoneDTO; +import com.subsidy.mapper.*; +import com.subsidy.model.MemberDO; +import com.subsidy.model.ProjectDO; +import com.subsidy.model.SmsVerifyCodeDO; +import com.subsidy.service.ProjectService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.subsidy.util.*; +import com.subsidy.vo.administer.UserRoleVO; +import com.subsidy.vo.labor.*; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDateTime; +import java.util.List; + +/** + *

+ * 项目表 服务实现类 + *

+ * + * @author Tuyp + * @since 2024-07-18 + */ +@Service +public class ProjectServiceImpl extends ServiceImpl implements ProjectService { + + @Autowired + private MemberMapper memberMapper; + + @Autowired + private SMSUtils smsUtils; + + @Autowired + private SmsVerifyCodeMapper smsVerifyCodeMapper; + + @Autowired + private ProjectMemberMappingMapper projectMemberMappingMapper; + + @Autowired + private ProjectSalaryHistoryMapper projectSalaryHistoryMapper; + + public String sendSms(MemberDO memberDO) { + + int count = memberMapper.selectCount(new QueryWrapper() + .lambda() + .eq(MemberDO::getTelephone, memberDO.getTelephone()) + .eq(MemberDO::getMemberType, 3)); + + if (count == 0) { + throw new HttpException(10011); + } + + String code = RandomUtil.getRandomCode(6); + smsUtils.send(memberDO.getTelephone(), code); + + smsVerifyCodeMapper.delete(new QueryWrapper() + .lambda() + .eq(SmsVerifyCodeDO::getTelephone, memberDO.getTelephone())); + + SmsVerifyCodeDO smsCodeDO = new SmsVerifyCodeDO(); + smsCodeDO.setVerifyCode(code); + smsCodeDO.setTelephone(memberDO.getTelephone()); + smsVerifyCodeMapper.insert(smsCodeDO); + return ConstantUtils.SUCCESS_SEND_OUT; + } + + public UserRoleVO login(VerifyCodeDTO verifyCodeDTO) { + UserRoleVO userRoleVO = new UserRoleVO(); + + MemberDO memberDO = memberMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MemberDO::getTelephone, verifyCodeDTO.getTelephone()) + .eq(MemberDO::getMemberType, 3)); + if (null == memberDO) { + throw new HttpException(10011); + } + + SmsVerifyCodeDO smsCodeDO = smsVerifyCodeMapper.selectOne(new QueryWrapper() + .lambda() + .eq(SmsVerifyCodeDO::getTelephone, verifyCodeDTO.getTelephone()) + .eq(SmsVerifyCodeDO::getVerifyCode, verifyCodeDTO.getVerifyCode()) + .gt(SmsVerifyCodeDO::getCreateDate, LocalDateTime.now().minusMinutes(30L))); + + if (null == smsCodeDO || !verifyCodeDTO.getVerifyCode().equals(smsCodeDO.getVerifyCode())) { + throw new HttpException(70010); + } + + String token = JwtUtil.generateToken(memberDO.getId(), ConstantUtils.MOBILE_TERMINATE); + Localstorage.setUser(memberDO); + userRoleVO.setToken(token); + BeanUtils.copyProperties(memberDO, userRoleVO); + + return userRoleVO; + } + + public CurrentProjectVO currentProject(MemberDO memberDO) { + return projectMemberMappingMapper.currentProject(memberDO.getId()); + } + + public List historyProjects(MemberDO memberDO) { + return projectMemberMappingMapper.historyProjects(memberDO.getId()); + } + + public String verify(VerifyCodeDTO verifyCodeDTO) { + + SmsVerifyCodeDO smsCodeDO = smsVerifyCodeMapper.selectOne(new QueryWrapper() + .lambda() + .eq(SmsVerifyCodeDO::getTelephone, verifyCodeDTO.getTelephone()) + .eq(SmsVerifyCodeDO::getVerifyCode, verifyCodeDTO.getVerifyCode()) + .gt(SmsVerifyCodeDO::getCreateDate, LocalDateTime.now().minusMinutes(30L))); + + if (null == smsCodeDO || !verifyCodeDTO.getVerifyCode().equals(smsCodeDO.getVerifyCode())) { + throw new HttpException(70010); + } + + return ConstantUtils.SUCCESS_VERIFY; + } + + public String updateTelephone(UpdateTelephoneDTO updateTelephoneDTO) { + + SmsVerifyCodeDO smsCodeDO = smsVerifyCodeMapper.selectOne(new QueryWrapper() + .lambda() + .eq(SmsVerifyCodeDO::getTelephone, updateTelephoneDTO.getTelephone()) + .eq(SmsVerifyCodeDO::getVerifyCode, updateTelephoneDTO.getVerifyCode()) + .gt(SmsVerifyCodeDO::getCreateDate, LocalDateTime.now().minusMinutes(30L))); + + if (null == smsCodeDO || !updateTelephoneDTO.getVerifyCode().equals(smsCodeDO.getVerifyCode())) { + throw new HttpException(70010); + } + + MemberDO memberDO = memberMapper.selectById(updateTelephoneDTO.getId()); + memberDO.setTelephone(updateTelephoneDTO.getTelephone()); + memberMapper.updateById(memberDO); + + return ConstantUtils.SUCCESS_UPDATE; + } + + public IdCardInfoVO idCardInfo(MemberDO memberDO) { + IdCardInfoVO idCardInfoVO = new IdCardInfoVO(); + MemberDO memberDO1 = memberMapper.selectById(memberDO.getId()); + idCardInfoVO.setIdCard(memberDO1.getIdCard()); + idCardInfoVO.setUserName(memberDO1.getUserName()); + return idCardInfoVO; + } + + public BankInfoVO bankInfo(MemberDO memberDO) { + BankInfoVO bankInfoVO = new BankInfoVO(); + MemberDO memberDO1 = memberMapper.selectById(memberDO.getId()); + bankInfoVO.setPayrollAccount(memberDO1.getPayrollAccount()); + bankInfoVO.setUserName(memberDO1.getUserName()); + bankInfoVO.setBank(memberDO1.getBank()); + return bankInfoVO; + } + + public SalaryListSumVO salaryListSum(SalaryListSumDTO salaryListSumDTO) { + return projectSalaryHistoryMapper.salaryCount(salaryListSumDTO.getProjectId(), salaryListSumDTO.getMemberId()); + } + + public IPage salaryList(SalaryListSumDTO salaryListSumDTO) { + Page page = new Page(salaryListSumDTO.getPageNum(), salaryListSumDTO.getPageSize()); + return projectSalaryHistoryMapper.salaryList(page, salaryListSumDTO.getProjectId(), salaryListSumDTO.getMemberId()); + } + + +} diff --git a/src/main/java/com/subsidy/util/ActivityDetectionUtils.java b/src/main/java/com/subsidy/util/ActivityDetectionUtils.java new file mode 100644 index 0000000..0f09334 --- /dev/null +++ b/src/main/java/com/subsidy/util/ActivityDetectionUtils.java @@ -0,0 +1,52 @@ +package com.subsidy.util; + +import com.tencentcloudapi.captcha.v20190722.CaptchaClient; +import com.tencentcloudapi.captcha.v20190722.models.DescribeCaptchaResultRequest; +import com.tencentcloudapi.captcha.v20190722.models.DescribeCaptchaResultResponse; +import com.tencentcloudapi.common.Credential; +import com.tencentcloudapi.common.profile.ClientProfile; +import com.tencentcloudapi.common.profile.HttpProfile; + +import javax.servlet.http.HttpServletRequest; + +public class ActivityDetectionUtils { + + /** + * 活跃度检测工具类 + * + * @throws Exception + */ + + public static DescribeCaptchaResultResponse activityDetection(HttpServletRequest request, String ticket, String randstr) { + + try { + // 实例化一个认证对象,入参需要传入腾讯云账户secretId,secretKey,此处还需注意密钥对的保密 + // 密钥可前往https://console.cloud.tencent.com/cam/capi网站进行获取 + Credential cred = new Credential(ConstantUtils.SECRET_ID, ConstantUtils.SECRET_KEY); + // 实例化一个http选项,可选的,没有特殊需求可以跳过 + HttpProfile httpProfile = new HttpProfile(); + httpProfile.setEndpoint("captcha.tencentcloudapi.com"); + // 实例化一个client选项,可选的,没有特殊需求可以跳过 + ClientProfile clientProfile = new ClientProfile(); + clientProfile.setHttpProfile(httpProfile); + // 实例化要请求产品的client对象,clientProfile是可选的 + CaptchaClient client = new CaptchaClient(cred, "", clientProfile); + // 实例化一个请求对象,每个接口都会对应一个request对象 + DescribeCaptchaResultRequest req = new DescribeCaptchaResultRequest(); + req.setCaptchaType(9L); + String ip = IpAddressUtil.getIpAddress(request); + req.setUserIp(ip); + req.setRandstr(randstr); + req.setCaptchaAppId(ConstantUtils.CAPTCHAAPP_ID); + req.setAppSecretKey(ConstantUtils.APP_SECRET_KEY); + req.setBusinessId(ConstantUtils.BUSINESS_ID); + req.setTicket(ticket); + // 返回的resp是一个DescribeCaptchaResultResponse的实例,与请求对象对应 + return client.DescribeCaptchaResult(req); + } catch (Exception e) { + + } + return null; + } + +} diff --git a/src/main/java/com/subsidy/util/Base64Util.java b/src/main/java/com/subsidy/util/Base64Util.java new file mode 100644 index 0000000..cabdb91 --- /dev/null +++ b/src/main/java/com/subsidy/util/Base64Util.java @@ -0,0 +1,87 @@ +package com.subsidy.util; + +import sun.misc.BASE64Decoder; +import sun.misc.BASE64Encoder; + +import javax.imageio.stream.FileImageInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +class Base64Util { + /** + * 字符串转图片 + * @param base64Str + * @return + */ + public static byte[] decode(String base64Str){ + byte[] b = null; + BASE64Decoder decoder = new BASE64Decoder(); + try { + b = decoder.decodeBuffer(replaceEnter(base64Str)); + } catch (IOException e) { + e.printStackTrace(); + } + return b; + } + + /** + * 图片转字符串 + * @param image + * @return + */ + public static String encode(byte[] image){ + BASE64Encoder decoder = new BASE64Encoder(); + return replaceEnter(decoder.encode(image)); + } + + public static void main(String[] args) { + System.out.println(encode("http://ykhl-bigger.oss-cn-beijing.aliyuncs.com/2023-02-1618cb936b-4825-429c-9fdd-dd9d0de97ed7.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg")); + } + + public static String encode(String uri){ + BASE64Encoder encoder = new BASE64Encoder(); + return replaceEnter(encoder.encode(uri.getBytes())); + } + + /** + * + * @path 图片路径 + * @return + */ + + public static byte[] imageTobyte(String path){ + byte[] data = null; + FileImageInputStream input = null; + try { + input = new FileImageInputStream(new File(path)); + ByteArrayOutputStream output = new ByteArrayOutputStream(); + byte[] buf = new byte[1024]; + int numBytesRead = 0; + while((numBytesRead = input.read(buf)) != -1){ + output.write(buf, 0, numBytesRead); + } + data = output.toByteArray(); + output.close(); + input.close(); + + } catch (Exception e) { + e.printStackTrace(); + } + + return data; + } + + + + public static String replaceEnter(String str){ + String reg ="[\n-\r]"; + Pattern p = Pattern.compile(reg); + Matcher m = p.matcher(str); + return m.replaceAll(""); + } + + +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/util/BaseModel.java b/src/main/java/com/subsidy/util/BaseModel.java new file mode 100644 index 0000000..7504dd0 --- /dev/null +++ b/src/main/java/com/subsidy/util/BaseModel.java @@ -0,0 +1,35 @@ +package com.subsidy.util; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +public abstract class BaseModel { + + /** + * 创建时间 + */ + @JsonIgnore + @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "create_date", fill = FieldFill.INSERT) + private LocalDateTime createDate; + + /** + * 更新时间 + */ + @JsonIgnore + @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "update_date", fill = FieldFill.UPDATE) + private LocalDateTime updateDate; + + /** + * 删除时间 + */ + @JsonIgnore + @TableLogic + private LocalDateTime deleteDate; +} diff --git a/src/main/java/com/subsidy/util/CodeGenerator.java b/src/main/java/com/subsidy/util/CodeGenerator.java new file mode 100644 index 0000000..7b488bc --- /dev/null +++ b/src/main/java/com/subsidy/util/CodeGenerator.java @@ -0,0 +1,129 @@ +package com.subsidy.util; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException; +import com.baomidou.mybatisplus.core.toolkit.StringPool; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.generator.AutoGenerator; +import com.baomidou.mybatisplus.generator.InjectionConfig; +import com.baomidou.mybatisplus.generator.config.DataSourceConfig; +import com.baomidou.mybatisplus.generator.config.FileOutConfig; +import com.baomidou.mybatisplus.generator.config.GlobalConfig; +import com.baomidou.mybatisplus.generator.config.PackageConfig; +import com.baomidou.mybatisplus.generator.config.StrategyConfig; +import com.baomidou.mybatisplus.generator.config.TemplateConfig; +import com.baomidou.mybatisplus.generator.config.po.TableInfo; +import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; +import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; + +import java.util.ArrayList; +import java.util.List; +import java.util.ResourceBundle; +import java.util.Scanner; + +/** + * Mybatis-Plus CodeGenerator + * + * @author DengMin + * @date 2020/07/02 + **/ +public class CodeGenerator { + + public static String scanner(String tip) { + StringBuilder help = new StringBuilder(); + help.append("1.生成全部表 2.输入需要生成表名"); + System.out.println(help.toString()); + Scanner scanner = new Scanner(System.in); + Integer ipt = Integer.valueOf(scanner.next()); + if(ipt == 1) { + return ""; + } else if(ipt == 2) { + StringBuilder help1 = new StringBuilder(); + help1.append("请输入" + tip + ":"); + System.out.println(help1.toString()); + Scanner scanner1 = new Scanner(System.in); + if (scanner1.hasNext()) { + String name = scanner1.next(); + if (StringUtils.isNotEmpty(name)) { + return name; + } + } + throw new MybatisPlusException("请输入正确的" + tip + "!"); + } + return scanner(tip); + } + + public static void main(String[] args) { + final ResourceBundle rb = ResourceBundle.getBundle("mybatis-plus"); + // 代码生成器 + AutoGenerator mpg = new AutoGenerator(); + + // 全局配置 + GlobalConfig gc = new GlobalConfig(); + gc.setOutputDir(System.getProperty("user.dir") + rb.getString("outputDir")); + gc.setOpen(false); + gc.setBaseResultMap(true); + gc.setBaseColumnList(true); + gc.setAuthor(rb.getString("author")); + gc.setMapperName("%sMapper"); + gc.setEntityName("%sDO"); + gc.setServiceName("%sService"); + gc.setServiceImplName("%sServiceImpl"); + gc.setControllerName("%sController"); + mpg.setGlobalConfig(gc); + + // 数据源配置 + DataSourceConfig dsc = new DataSourceConfig(); + dsc.setDbType(DbType.MYSQL); + dsc.setUrl(rb.getString("url")); + dsc.setDriverName(rb.getString("driverName")); + dsc.setUsername(rb.getString("userName")); + dsc.setPassword(rb.getString("password")); + mpg.setDataSource(dsc); + + // 包配置 + PackageConfig pc = new PackageConfig(); + pc.setParent(rb.getString("setParent")); + pc.setController("controller"); + pc.setService("service"); + pc.setServiceImpl("service.impl"); + pc.setEntity("model"); + pc.setMapper("mapper"); + mpg.setPackageInfo(pc); + + // 自定义配置 + InjectionConfig cfg = new InjectionConfig() { + @Override + public void initMap() { + // to do nothing + } + }; + List focList = new ArrayList<>(); + focList.add(new FileOutConfig("/templates/mapper.xml.ftl") { + @Override + public String outputFile(TableInfo tableInfo) { + // 自定义输入文件名称 + return System.getProperty("user.dir")+ rb.getString("mapperPath") + tableInfo.getMapperName() + StringPool.DOT_XML; + } + }); + cfg.setFileOutConfigList(focList); + mpg.setCfg(cfg); + mpg.setTemplate(new TemplateConfig().setXml(null)); + + // 策略配置 + StrategyConfig strategy = new StrategyConfig(); + strategy.setNaming(NamingStrategy.underline_to_camel); + strategy.setColumnNaming(NamingStrategy.underline_to_camel); + strategy.setSuperEntityClass(BaseModel.class); + strategy.setEntityLombokModel(true); + strategy.setRestControllerStyle(true); + String [] tables = scanner("表名,多个英文逗号分割").split(","); + if(StringUtils.isNotBlank(tables[0])) { + strategy.setInclude(tables); + } + strategy.setControllerMappingHyphenStyle(true); + mpg.setStrategy(strategy); + mpg.setTemplateEngine(new FreemarkerTemplateEngine()); + mpg.execute(); + } +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/util/ConstantUtils.java b/src/main/java/com/subsidy/util/ConstantUtils.java new file mode 100644 index 0000000..d19e82f --- /dev/null +++ b/src/main/java/com/subsidy/util/ConstantUtils.java @@ -0,0 +1,116 @@ +package com.subsidy.util; + + +/** + * 枚举类 + */ +public class ConstantUtils { + + public static final String DELETE_SUCCESS = "删除成功"; + + public static final String UPLOAD_FAIL = "上传失败"; + + public static final String ADD_SUCCESS = "新增成功"; + + public static final String COMMIT_SUCCESS = "提交成功"; + + public static final String SUCCESS_SEND_OUT = "发送成功"; + + public static final String FAIL_SEND_OUT = "发送失败"; + + public static final String SAVE_SUCCESS = "保存成功"; + + public static final String SHARE_SUCCESS = "共享成功"; + + public static final String SUBMIT_SUCCESS = "提交成功"; + + public static final String SUCCESS_UPDATE = "更新成功"; + + public static final String FAIL_UPDATE = "更新失败"; + + public static final String SET_SUCCESS = "设置成功"; + + public static final String SUCCESS_VERIFY = "验证成功"; + + public static final String FAIL_VERIFY = "验证失败"; + + public static final String COMPANY_NAME = "TeachAI"; + + public static final String ALREADY_DONE = "已完成"; + + public static final String ALREADY_RECOMMEND = "已推荐"; + + public static final String VERIFY_NAME = "有课互联"; + + public static final String NOTICE_NAME = "有课进度通知"; + + public static final String TECH_NAME = "有课互联学习平台"; + + public static final String PUBLISH_SUCCESS = "发布成功"; + + public static final String COMPRESS_SUCCESS = "压缩成功"; + + public static final String CHECK_STATUS = "审核通过"; + + /** + * 短信模板---验证模板 + */ + public static final String TEMPLATE_CODE = "SMS_190945394"; + + /** + * 短信 地域ID + */ + public static final String REGION_ID = "cn-hangzhou"; + + /** + * 短信 RAM账号AccessKey ID + */ + public static final String ACCESS_KEY_ID = "LTAI5tPAH7P7WQVeowo517BE"; + + /** + * 短信 RAM账号AccessKey Secret + */ + public static final String SECRET = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY"; + + /** + * 腾讯云点播视频转码模板 + */ + public static final Long TEMPLATE_VOD = 100030L; + + /** + * 手机端token + */ + public static final String MOBILE_TERMINATE = "mobile"; + + public static final String ADMINISTER_TERMINATE = "administer"; + + + /** + * API密钥--微信参数 + */ + public static final String SECRET_ID = "AKIDOcePHvZ2C5VeYHQGSO5aqtlNxJQLqfz2"; + + public static final String SECRET_KEY = "vjHYRmrfDbw0rWxA7oFcj7F8lDPKCm8E"; + + /** + * 图形验证码 + */ + public static final Long CAPTCHAAPP_ID = 2013197365L; + + public static final String APP_SECRET_KEY = "04ABoF0ZVuMje8NP84DE5Sg**"; + + public static final Long BUSINESS_ID = 1L; + + public static final String UTF8 = "UTF-8"; + + /** + * 保利威视 + */ + public static final String POLYV_VIEWLOG_2 = "http://api.polyv.net/live/v1/statistics/{channelId}/viewlog"; + + /** + * 推送人社局图片格式 + */ + public static final String IMAGE_FORMAT = "?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg"; + +} diff --git a/src/main/java/com/subsidy/util/DateFormatUtil.java b/src/main/java/com/subsidy/util/DateFormatUtil.java new file mode 100644 index 0000000..f39120e --- /dev/null +++ b/src/main/java/com/subsidy/util/DateFormatUtil.java @@ -0,0 +1,120 @@ +package com.subsidy.util; + +import java.awt.SystemTray; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.util.Date; + +/** + * 处理时间工具 + * + * @author DengMin + * @date 2019/08/27 13:56 + **/ +public class DateFormatUtil { + + public final static String YEAR = "yyyy"; + public final static String FMT_sdf14_L = "yyyy-MM-dd HH:mm:ss"; + public final static String FMT_sdf_yMd = "yyyy-MM-dd"; + public final static String FMT_sdf_yM = "yyyy-M"; + public final static String FMT_sdf_yMM = "yyyy-MM"; + public final static String FMT_sdf_Hm = "H:mm"; + public final static String FMT_sdf_HHmm = "HH:mm"; + public final static String cron = "s m H d M ? yyyy"; + + /** + * Date转String,自定义格式 + * @param date + * @param pattern + * @return + */ + public static String format(Date date, String pattern) { + try { + SimpleDateFormat sdf = new SimpleDateFormat(pattern); + return sdf.format(date); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + /** + * LocalDateTime转String,自定义格式 + * @param localDateTime + * @param pattern + * @return + */ + public static String format(LocalDateTime localDateTime, String pattern) { + try { + SimpleDateFormat sdf = new SimpleDateFormat(pattern); + return sdf.format(localDateTime); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + /** + * String转Date,自定义格式 + * @param date + * @param pattern + * @return + */ + public static Date parse(String date, String pattern) { + try { + SimpleDateFormat sdf = new SimpleDateFormat(pattern); + return sdf.parse(date); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + /** + * 比较两个时间 + * .after 大于 + * .before 小于 + * @param d1 + * @param d2 + * @return + */ + public static boolean compare(Date d1, Date d2 ) { + return !d1.after(d2); + } + + /** + * Data转Cron + * @param date + * @return + */ + public static String getCron(Date date) { + SimpleDateFormat sdf = new SimpleDateFormat("s m H d M ? yyyy"); + return sdf.format(date); + } + + public static Date localDateTimeToDate(LocalDateTime dateTime) { + if(dateTime == null) { + return null; + } + ZoneId zoneId = ZoneId.systemDefault(); + ZonedDateTime zdt = dateTime.atZone(zoneId); + return Date.from(zdt.toInstant()); + } + + public static LocalDateTime secondToLocalDateTime(Long second) { + if(second != null) { + return LocalDateTime.ofEpochSecond(second, 0, ZoneOffset.ofHours(8)); + } + return LocalDateTime.now(); + } + + public static Long LocalDateTimeToSecond(LocalDateTime localDateTime) { + if(localDateTime != null) { + return localDateTime.atZone(ZoneOffset.ofHours(8)).toInstant().toEpochMilli(); + } + return System.currentTimeMillis(); + } +} diff --git a/src/main/java/com/subsidy/util/DudaoConstant.java b/src/main/java/com/subsidy/util/DudaoConstant.java new file mode 100644 index 0000000..22b77e2 --- /dev/null +++ b/src/main/java/com/subsidy/util/DudaoConstant.java @@ -0,0 +1,49 @@ +package com.subsidy.util; + +public class DudaoConstant { + + /** + * POST-1:班级基本信息信息采集接口 + */ + public static final String POST_1 = "DUDAO_POST_1_insertClassBasicInformation"; + + /** + * POST-2:学时信息采集接口 + */ + public static final String POST_2 = "DUDAO_POST_2_insertLearnDuration"; + + /** + * POST-3:考试信息采集接口 + */ + public static final String POST_3 = "DUDAO_POST_3_insertExamInformation"; + + /** + * POST-4:答疑辅导采集接口 + */ + public static final String POST_4 = "DUDAO_POST_4_insertAnswerTutor"; + + /** + * POST-5 上下游班级数据绑定接口 + */ + public static final String POST_5 = "DUDAO_POST_5_insertBindClass"; + + /** + * 调取失败 + */ + public static final String API_ERROR = "调取失败"; + + /** + * 当天没数据 + */ + public static final String NO_DATA = "NO_DATA"; + + /** + * 推送失败 + */ + public static final String PUSH_FAIL = "推送失败"; + + /** + * 推送成功 + */ + public static final String PUSH_SUCCESS = "推送成功"; +} diff --git a/src/main/java/com/subsidy/util/EhCacheUtil.java b/src/main/java/com/subsidy/util/EhCacheUtil.java new file mode 100644 index 0000000..45dba17 --- /dev/null +++ b/src/main/java/com/subsidy/util/EhCacheUtil.java @@ -0,0 +1,53 @@ +package com.subsidy.util; + +import net.sf.ehcache.Cache; +import net.sf.ehcache.CacheManager; +import net.sf.ehcache.Element; +import org.springframework.util.ClassUtils; + +/** + *

+ * Ehcache + *

+ * + * @author DengMin + * @since 2022/8/1 + */ +public class EhCacheUtil { + + static CacheManager cacheManager = CacheManager.newInstance(ClassUtils.getDefaultClassLoader().getResource("").getPath()+"ehcache.xml"); + + /** + * 添加缓存 + * @param cacheName + * @param key + * @param value + */ + public static void putEhCache(String cacheName, String key, Object value) { + Cache cache = cacheManager.getCache(cacheName); + Element element = new Element(key, value); + cache.put(element); + } + + /** + * 获取缓存数据 + * @param cacheName + * @param key + * @return + */ + public static Object getEhCache(String cacheName, String key) { + Cache cache = cacheManager.getCache(cacheName); + Element element = cache.get(key); + return element == null ? null : element.getObjectValue(); + } + + /** + * 删除缓存 + * @param cacheName + * @param key + */ + public static void deleteEhCache(String cacheName, String key) { + Cache cache = cacheManager.getCache(cacheName); + cache.remove(key); + } +} diff --git a/src/main/java/com/subsidy/util/EncryptUtil.java b/src/main/java/com/subsidy/util/EncryptUtil.java new file mode 100644 index 0000000..9db0ff2 --- /dev/null +++ b/src/main/java/com/subsidy/util/EncryptUtil.java @@ -0,0 +1,35 @@ +//package com.subsidy.util; +// +//import com.amdelamar.jhash.Hash; +//import com.amdelamar.jhash.algorithms.Type; +//import com.amdelamar.jhash.exception.InvalidHashException; +// +//public class EncryptUtil { +// +// /** +// * 设置密文密码 +// * +// * @param password 原始密码 +// * @return 加密密码 +// */ +// public static String encrypt(String password) { +// char[] chars = password.toCharArray(); +// return Hash.password(chars).algorithm(Type.PBKDF2_SHA256).create(); +// } +// +// /** +// * 验证加密密码 +// * +// * @param encryptedPassword 密文密码 +// * @param plainPassword 明文密码 +// * @return 验证是否成功 +// */ +// public static boolean verify(String encryptedPassword, String plainPassword) { +// char[] chars = plainPassword.toCharArray(); +// try { +// return Hash.password(chars).algorithm(Type.PBKDF2_SHA256).verify(encryptedPassword); +// } catch (InvalidHashException e) { +// return false; +// } +// } +//} diff --git a/src/main/java/com/subsidy/util/ExcelFormatUtils.java b/src/main/java/com/subsidy/util/ExcelFormatUtils.java new file mode 100644 index 0000000..c0330e2 --- /dev/null +++ b/src/main/java/com/subsidy/util/ExcelFormatUtils.java @@ -0,0 +1,19 @@ +package com.subsidy.util; + +import java.util.Arrays; +import java.util.List; + +public class ExcelFormatUtils { + + + public static final List memberList = Arrays.asList("序号", "成员名称","身份证号码", "性别", "账号", "联系方式", "签到次数", "课程进度", "学习时长(小时)","学习时长(分钟)","累计有效学习时长", "答疑数", "测试成绩", "总评价"); + + public static final List signList = Arrays.asList("序号", "成员名称", "身份证号", "联系方式", "签到次数", "签到时间","最近签到ip地址","最近签到设备型号"); + + public static final List scoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "测试成绩", "测试次数","开始时间","结束时间","测评时间", "总评价"); + + public static final List answersList = Arrays.asList("序号", "提问", "答疑", "提问时间", "提问成员", "答疑时间"); + + public static final List studyLogList = Arrays.asList("开始时间","结束时间","课程","类型","学习时长","累计有效时长"); + +} diff --git a/src/main/java/com/subsidy/util/HttpUtil.java b/src/main/java/com/subsidy/util/HttpUtil.java new file mode 100644 index 0000000..64125fd --- /dev/null +++ b/src/main/java/com/subsidy/util/HttpUtil.java @@ -0,0 +1,461 @@ +package com.subsidy.util; + + +import org.apache.http.Header; +import org.apache.http.HttpEntity; +import org.apache.http.NameValuePair; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +//import org.apache.http.entity.mime.MultipartEntityBuilder; +//import org.apache.http.entity.mime.content.FileBody; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.*; +import java.net.URLEncoder; +import java.util.*; + +/** + * @author: sadboy + **/ + +public class HttpUtil { + private static final Logger log = LoggerFactory.getLogger(HttpUtil.class); + private static final String UTF8 = "UTF-8"; + private static final String APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded; charset=UTF-8"; + private static final String APPLICATION_JSON = "application/json; charset=UTF-8"; + private static final String TEXT_PLAIN = "text/plain; charset=UTF-8"; + private static final String TEXT_HTML = "text/html; charset=UTF-8"; + private static final String APPLICATION_XML = "application/xml; charset=UTF-8"; + + private HttpUtil() { + } + + /** + * 向url发送get请求,当无参数时,paramMap为NULL + * @param url 请求url + * @param paramMap 需要拼接的参数 + * @return 请求返回的数据 + * @throws IOException 读写异常 + */ + public static String get(String url, Map paramMap) throws IOException { + return get(url, paramMap, UTF8); + } + + /** + * 向url发送get请求 + * @param url 请求url + * @param paramMap 需要拼接的参数 + * @param encoding 编码 + * @return 请求返回的数据 + * @throws IOException 读写异常 + */ + public static String get(String url, Map paramMap, String encoding) throws IOException { + encoding = encoding == null ? UTF8 : encoding; + url = appendUrl(url, paramMap); + return get(url, encoding, new DataParse() { + @Override + public String parseData(HttpEntity httpEntity, String encoding) throws IOException { + return EntityUtils.toString(httpEntity, encoding); + } + }); + } + + /** + * 向url发送get请求 + * @param url 请求url + * @param paramMap 需要拼接的参数 + * @param encoding 编码 + * @return 请求返回的字节数组,一般用于文件下载 + * @throws IOException 读写异常 + */ + public static byte[] getBinary(String url, Map paramMap, String encoding) throws IOException { + encoding = encoding == null ? UTF8 : encoding; + url = appendUrl(url, paramMap); + return get(url, encoding, new DataParse() { + @Override + public byte[] parseData(HttpEntity httpEntity, String encoding) throws IOException { + return EntityUtils.toByteArray(httpEntity); + } + }); + } + + + /** + * HTTP GET 内部公共请求处理逻辑 + * @param url 请求地址 + * @param encoding 编码字符集, 默认为 utf-8 + * @param dataParse 返回数据反序列化逻辑实现类 + * @return HTTP 返回的内容 + * @throws IOException 客户端和服务器读写通讯异常 + */ + private static T get(String url, String encoding, DataParse dataParse) throws IOException { + log.debug("http 请求 url: {}", url); + T result = null; + // 创建httpclient对象 + CloseableHttpClient httpClient = HttpClientBuilder.create().build(); + // 创建get方式请求对象 + HttpGet httpGet = new HttpGet(url); + httpGet.addHeader("Content-type", APPLICATION_JSON); + // 通过请求对象获取响应对象 + CloseableHttpResponse response = sendRequestAndGetResult(url, httpClient, httpGet); + // 获取结果实体 + if (null != response) { + result = dataParse.parseData(response.getEntity(), encoding); + if (!(result instanceof byte[])) { + log.debug("http 请求结果: {}", result); + } else { + Header[] headers = response.getHeaders("Content-Type"); + for (Header responseHead : headers) { + String headStr = responseHead.getValue(); + if (headStr.startsWith("application/json")) { + String json = new String((byte[]) result); + response.close(); + throw new RuntimeException(json); + } + } + } + } + try { + if (null != response) { + response.close(); + } + } catch (IOException ex) { + log.error(ex.getMessage(), ex); + } + return result; + } + + + /** + * 向url发送post请求 + * @param url 请求url + * @param paramMap 需要拼接的参数 + * @return 请求返回的数据 + * @throws IOException 读写异常 + */ + public static String postFormBody(String url, Map paramMap) throws IOException { + return postFormBody(url, paramMap, null); + } + + /** + * 向url发送post请求 + * @param url 请求url + * @param paramMap 需要拼接的参数 + * @param encoding 编码 + * @return 请求返回的数据 + * @throws IOException 读写异常 + */ + public static String postFormBody(String url, Map paramMap, String encoding) throws IOException { + return post(url, paramMap, encoding); + } + + + /** + * 向url发送post请求表单提交数据 + * @param url 请求url + * @param paramMap 表单数据 + * @param encoding 编码 + * @return 请求返回的数据 + * @throws IOException 读写异常 + */ + private static String post(String url, Map paramMap, String encoding) throws IOException { + log.debug("http 请求 url: {} , 请求参数: {}", url, appendUrl("", paramMap).replace("?", "")); + encoding = encoding == null ? UTF8 : encoding; + // 创建post方式请求对象 + HttpPost httpPost = new HttpPost(url); + // 装填参数 + List nameValuePairs = new ArrayList(); + if (paramMap != null) { + for (Map.Entry entry : paramMap.entrySet()) { + String value = entry.getValue(); + //去掉如下判断会造成String类型的value为null时 + if (value != null) { + nameValuePairs.add(new BasicNameValuePair(entry.getKey(), value)); + } + } + } + // 设置参数到请求对象中 + httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs, encoding)); + // 设置header信息 + // 指定报文头【Content-type】、【User-Agent】 + httpPost.setHeader("Content-type", APPLICATION_FORM_URLENCODED); + return post(url, httpPost, encoding, new DataParse() { + @Override + public String parseData(HttpEntity httpEntity, String encoding) throws IOException { + return EntityUtils.toString(httpEntity, encoding); + } + }); + } + + /** + * 向url发送post请求发送json + * @param url 请求url + * @param json json字符串 + * @param encoding 编码 + * @return 请求返回的数据 + * @throws IOException 读写异常 + */ + public static String postJsonBody(String url, String json, String encoding) throws IOException { + log.debug("http 请求 url: {} , 请求参数: {}", url, json); + encoding = encoding == null ? UTF8 : encoding; + // 创建post方式请求对象 + HttpPost httpPost = new HttpPost(url); + // 设置参数到请求对象中 + StringEntity stringEntity = new StringEntity(json, ContentType.APPLICATION_JSON); + // Constant.UTF8 + stringEntity.setContentEncoding(encoding); + httpPost.setEntity(stringEntity); + String result = post(url, httpPost, encoding, new DataParse() { + @Override + public String parseData(HttpEntity httpEntity, String encoding) throws IOException { + return EntityUtils.toString(httpEntity, encoding); + } + }); + return result; + } + + /** + * 向url发送post请求 + * @param url 请求url + * @param httpPost httpClient + * @return 请求返回的数据 + * @throws IOException 读写异常 + */ + private static T post(String url, HttpPost httpPost, String encoding, DataParse dataParse) + throws IOException { + T result = null; + CloseableHttpResponse response = null; + // 创建httpclient对象 + CloseableHttpClient httpClient = HttpClientBuilder.create().build(); + + // 执行请求操作,并拿到结果(同步阻塞) + response = sendRequestAndGetResult(url, httpClient, httpPost); + // 获取结果实体 + // 判断网络连接状态码是否正常(0--200都数正常) + if (null != response) { + result = dataParse.parseData(response.getEntity(), encoding); + log.debug("http 请求结果: {}", result); + } + try { + if (null != response) { + response.close(); + } + } catch (IOException ex) { + log.error(ex.getMessage(), ex); + } + return result; + } + + /** + * 设置http头,发送http请求,打印请求耗时 + * @param url 请求url + * @param httpClient httpClient + * @param httpUriRequest httpUriRequest + * @return 请求返回的数据 + * @throws IOException 读写异常 + */ + private static CloseableHttpResponse sendRequestAndGetResult(String url, CloseableHttpClient httpClient, + HttpUriRequest httpUriRequest) throws IOException { + long startTime = System.currentTimeMillis(); + CloseableHttpResponse response = httpClient.execute(httpUriRequest); + long endTime = System.currentTimeMillis(); + collectAPISpendTime(url, startTime, endTime); + return response; + } + + /** + * 打印请求信息 + * @param url 请求url + * @param startTime 请求开始时间 + * @param endTime 请求结束时间 + */ + private static void collectAPISpendTime(String url, long startTime, long endTime) { + log.debug("HTTP请求耗时分析,请求URL: {} , 耗时: {} ms", url, endTime - startTime); + } + +// /** +// * 向url发送post请求上传单文件 +// * @param url 请求url +// * @param paramMap 需要表单提交的参数 +// * @param fileMap 需要上传的文件 +// * @param encoding 编码 +// * @return 请求返回的数据 +// * @throws IOException 读写异常 +// */ +// public static String postFile(String url, Map paramMap, Map fileMap, String encoding) +// throws IOException { +// if (fileMap != null) { +// Map> fileListMap = new HashMap>(); +// for (Map.Entry entry : fileMap.entrySet()) { +// File file = entry.getValue(); +// List fileList = new ArrayList(); +// fileList.add(file); +// fileListMap.put(entry.getKey(), fileList); +// } +// return postMultipleFile(url, paramMap, fileListMap, encoding); +// } +// return postMultipleFile(url, paramMap, null, encoding); +// } + +// /** +// * 向url发送post请求上传多文件 +// * 向url发送post请求上传单文件 +// * @param url 请求url +// * @param paramMap 需要表单提交的参数 +// * @param fileListMap 需要上传的文件 +// * @param encoding 编码 +// * @return 请求返回的数据 +// * @throws IOException 读写异常 +// */ +// public static String postMultipleFile(String url, Map paramMap, Map> fileListMap, +// String encoding) throws IOException { +// return postFileBody(url, paramMap, fileListMap, encoding, new DataParse() { +// @Override +// public String parseData(HttpEntity httpEntity, String encoding) throws IOException { +// return EntityUtils.toString(httpEntity, encoding); +// } +// }); +// } + +// /** +// * 向url发送post请求上传多文件 +// * 向url发送post请求上传单文件 +// * @param url 请求url +// * @param paramMap 需要表单提交的参数 +// * @param fileListMap 需要上传的文件 +// * @param encoding 编码 +// * @return 请求返回的数据 +// * @throws IOException 读写异常 +// */ +// private static T postFileBody(String url, Map paramMap, Map> fileListMap, +// String encoding, DataParse dataParse) throws IOException { +// log.debug("http 请求 url: {} , 请求参数: {}", url, appendUrl("", paramMap).replace("?", "")); +// encoding = encoding == null ? UTF8 : encoding; +// T result = null; +// CloseableHttpClient httpClient = HttpClientBuilder.create().build(); +// HttpPost httpPost = new HttpPost(url); +// MultipartEntityBuilder entityBuilder = MultipartEntityBuilder.create(); +// +// ContentType contentType = ContentType.create("text/plain", Charset.forName(encoding)); +// if (null != paramMap) { +// for (Map.Entry entry : paramMap.entrySet()) { +// entityBuilder.addTextBody(entry.getKey(), entry.getValue(), contentType); +// } +// } +// +// if (null != fileListMap) { +// for (Map.Entry> entry : fileListMap.entrySet()) { +// String key = entry.getKey(); +// List fileList = entry.getValue(); +// for (File file : fileList) { +// FileBody fileBody = new FileBody(file); +// entityBuilder.addPart(key, fileBody); +// } +// } +// } +// +// HttpEntity entity = entityBuilder.build(); +// httpPost.setEntity(entity); +// CloseableHttpResponse response = sendRequestAndGetResult(url, httpClient, httpPost); +// if (null != response) { +// result = dataParse.parseData(response.getEntity(), encoding); +// log.debug("http 请求结果: {}", result); +// } +// try { +// if (null != response) { +// response.close(); +// } +// } catch (IOException ex) { +// log.error(ex.getMessage(), ex); +// } +// return result; +// } + + + /** + * 公共数据解析接口 + * @param + */ + private interface DataParse { + /** + * 解析返回数据 + * @param httpEntity 返回实体 + * @param encoding 编码 + * @return 实际解析返回内容 + * @throws IOException io异常 + */ + T parseData(HttpEntity httpEntity, String encoding) throws IOException; + + } + + /** + * 将url与map拼接成HTTP查询字符串 + * @param url 请求url + * @param paramMap 需要拼装的map + * @return 拼装好的url + */ + public static String appendUrl(String url, Map paramMap) throws UnsupportedEncodingException { + if (paramMap == null) { + return url; + } + StringBuffer paramStringBuffer = new StringBuffer(); + Iterator> mapIterator = paramMap.entrySet().iterator(); + while (mapIterator.hasNext()) { + Map.Entry next = mapIterator.next(); + paramStringBuffer.append(next.getKey()).append("=").append(URLEncoder.encode(next.getValue(), ConstantUtils.UTF8)).append("&"); + } + String paramStr = paramStringBuffer.toString(); +// String paramStr = mapJoinNotEncode(paramMap); + if (paramStr != null && !"".equals(paramStr)) { + if (url.indexOf("?") > 0) { + if (url.endsWith("&")) { + url += paramStr.substring(0, paramStr.length() - 1); + } else { + url += "&" + paramStr.substring(0, paramStr.length() - 1); + } + } else { + url += "?" + paramStr.substring(0, paramStr.length() - 1); + } + } + return url; + } + + /** + * 把二进制写入文件 + * @param bytes + * @param path + * @throws IOException + */ + public static void writeFile(byte[] bytes, String path) throws IOException { + OutputStream os = null; + try { + // 根据绝对路径初始化文件 + File localFile = new File(path); + if (!localFile.exists()) { + boolean newFile = localFile.createNewFile(); + if (!newFile) { + throw new RuntimeException("创建文件异常,路径:" + path); + } + } + // 输出流 + os = new FileOutputStream(localFile); + os.write(bytes); + } finally { + if (os != null) { + os.close(); + } + } + } + +} + diff --git a/src/main/java/com/subsidy/util/ImageCheckUtil.java b/src/main/java/com/subsidy/util/ImageCheckUtil.java new file mode 100644 index 0000000..5fcead4 --- /dev/null +++ b/src/main/java/com/subsidy/util/ImageCheckUtil.java @@ -0,0 +1,33 @@ +package com.subsidy.util; + + +import com.google.common.hash.Hashing; +import org.apache.commons.codec.Charsets; + +import java.util.Collections; +import java.util.List; + +/** + * 人脸识别工具类 + */ +public class ImageCheckUtil { + + /** + * 签名方法 + * @param values + * @param ticket + * @return + */ + public static String sign(List values, String ticket) { //values传ticket外的其他参数 + if (values == null) { + throw new NullPointerException("values is null"); + } + values.removeAll(Collections.singleton(null));// remove null + values.add(ticket); java.util.Collections.sort(values); + StringBuilder sb = new StringBuilder(); + for (String s : values) { sb.append(s); + } + return Hashing.sha1().hashString(sb, + Charsets.UTF_8).toString().toUpperCase(); + } +} diff --git a/src/main/java/com/subsidy/util/IpAddressUtil.java b/src/main/java/com/subsidy/util/IpAddressUtil.java new file mode 100644 index 0000000..b81d8b2 --- /dev/null +++ b/src/main/java/com/subsidy/util/IpAddressUtil.java @@ -0,0 +1,92 @@ +package com.subsidy.util; + +import javax.servlet.http.HttpServletRequest; +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.InetAddress; +import java.net.URL; +import java.net.UnknownHostException; + +public class IpAddressUtil { + + /** + * 返回客户端ip + */ + public static String getIpAddress(HttpServletRequest request) { + String ipAddress = request.getHeader("x-forwarded-for"); + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("WL-Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getRemoteAddr(); + if (ipAddress.equals("127.0.0.1") || ipAddress.equals("0:0:0:0:0:0:0:1")) { + InetAddress inet = null; + try { + inet = InetAddress.getLocalHost(); + } catch (UnknownHostException e) { + e.printStackTrace(); + } + ipAddress = inet.getHostAddress(); + } + } + if (ipAddress != null && ipAddress.length() > 15) { + if (ipAddress.indexOf(",") > 0) { + ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); + } + } + return ipAddress; + } + + /** + * @Description:获取客户端外网ip + * @Author:zrt + * @Date:2019/6/13 11:23 + **/ + public static String getPublicIp() { + try { + String path = "http://subsidy.youkehulian.cn/";// 要获得html页面内容的地址 + + URL url = new URL(path);// 创建url对象 + + HttpURLConnection conn = (HttpURLConnection) url.openConnection();// 打开连接 + + conn.setRequestProperty("contentType", "GBK"); // 设置url中文参数编码 + + conn.setConnectTimeout(5 * 1000);// 请求的时间 + + conn.setRequestMethod("GET");// 请求方式 + + InputStream inStream = conn.getInputStream(); + // readLesoSysXML(inStream); + + BufferedReader in = new BufferedReader(new InputStreamReader( + inStream, "GBK")); + StringBuffer buffer = new StringBuffer(); + String line = ""; + // 读取获取到内容的最后一行,写入 + while ((line = in.readLine()) != null) { + buffer.append(line); + } + String str = buffer.toString(); + String ipString1 = str.substring(str.indexOf("[")); + // 获取你的IP是中间的[182.149.82.50]内容 + String ipsString2 = ipString1.substring(ipString1.indexOf("[") + 1, + ipString1.lastIndexOf("]")); + //获取当前IP地址所在地址 + /* String ipsString3=ipString1.substring(ipString1.indexOf(": "),ipString1.lastIndexOf("")); + System.err.println(ipsString3);*/ + + // 返回公网IP值 + return ipsString2; + + } catch (Exception e) { + System.out.println("获取公网IP连接超时"); + return "连接超时"; + } + } +} diff --git a/src/main/java/com/subsidy/util/JwtUtil.java b/src/main/java/com/subsidy/util/JwtUtil.java new file mode 100644 index 0000000..972185b --- /dev/null +++ b/src/main/java/com/subsidy/util/JwtUtil.java @@ -0,0 +1,96 @@ +package com.subsidy.util; + +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.Claim; + +import java.util.Date; +import java.util.Map; + +/** + *

+ * Token工具 + *

+ * + * @author DengMin + * @since 2021/4/14 + */ +public class JwtUtil { + + private static Long EXPIRE_TIME = 24 * 60 * 60 * 1000L; + + private static String SECRET = "PBKDF2SHA256:64000:18:24:N:GFHZ6Y0PTEUDYCJI3K6SOOXWYEKPOZED:WBWFJMX5DF252E0HR3BF3P/D"; + + /** + * 生成Token + * @param id + * @return + */ + public static String generateToken(Long id, String type) { + Date expireDate = new Date(System.currentTimeMillis() + EXPIRE_TIME); + return JWT.create() + .withClaim("id", id) + .withClaim("type", type) + .withAudience() + .withExpiresAt(expireDate) + .withIssuedAt(new Date()) + .sign(Algorithm.HMAC256(SECRET)); + } + + /** + * 检验token是否正确 + * @param token + * @return + */ + public static boolean verifyToken(String token) { + try { + Algorithm algorithm = Algorithm.HMAC256(SECRET); + JWTVerifier verifier = JWT.require(algorithm).build(); + verifier.verify(token); + return true; + } catch (Exception e) { + return false; + } + } + + /** + * 获取用户自定义Claim集合 + * @param token + * @return + */ + public static Map getClaims(String token) { + Algorithm algorithm = Algorithm.HMAC256(SECRET); + JWTVerifier verifier = JWT.require(algorithm).build(); + Map claims = verifier.verify(token).getClaims(); + return claims; + } + + /** + * 获取过期时间 + * @param token + * @return + */ + public static Date getExpiresAt(String token) { + Algorithm algorithm = Algorithm.HMAC256(SECRET); + return JWT + .require(algorithm) + .build() + .verify(token) + .getExpiresAt(); + } + + /** + * 验证token是否失效 + * @param token + * @return true: 过期, false: 没过期 + */ + public static boolean isExpired(String token) { + try { + final Date expiration = getExpiresAt(token); + return expiration.before(new Date()); + } catch (Exception e) { + return true; + } + } +} diff --git a/src/main/java/com/subsidy/util/Localstorage.java b/src/main/java/com/subsidy/util/Localstorage.java new file mode 100644 index 0000000..4cc65bd --- /dev/null +++ b/src/main/java/com/subsidy/util/Localstorage.java @@ -0,0 +1,21 @@ +package com.subsidy.util; + +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class Localstorage { + + private static final ThreadLocal local = ThreadLocal.withInitial(() -> null); + + public static void setUser(Object admin) { + Localstorage.local.set(admin); + } + + public static Object getUser() { + return Localstorage.local.get(); + } + + public static void remove() { + Localstorage.local.remove(); + } +} diff --git a/src/main/java/com/subsidy/util/MathUtil.java b/src/main/java/com/subsidy/util/MathUtil.java new file mode 100644 index 0000000..79275a8 --- /dev/null +++ b/src/main/java/com/subsidy/util/MathUtil.java @@ -0,0 +1,174 @@ +package com.subsidy.util; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.Random; + +public class MathUtil { + + public static String getRandomCode(int randomLength) { + StringBuilder str = new StringBuilder(); + Random random = new Random(); + for (int i = 0; i < randomLength; i++) { + str.append(random.nextInt(10)); + } + return str.toString(); + } + + public static String getRandomString(int length) { + StringBuilder val = new StringBuilder(); + Random random = new Random(); + for (int i = 0; i < length; ++i) { + String charOrNum = random.nextInt(3) % 3 == 0 ? "num" : "char"; + if ("char".equalsIgnoreCase(charOrNum)) { + int temp = random.nextInt(2) % 2 == 0 ? 65 : 97; + val.append((char) (random.nextInt(26) + temp)); + } else { + val.append(random.nextInt(10)); + } + } + return val.toString(); + } + + //习题/视频 ==> 秒钟向上取整 + public static String ceilSecond(int length) { + return String.valueOf((int) Math.ceil((double) length / 60)); + } + + //习题/视频 ==> 秒钟向下取整 + public static String floorSecond(int length) { + return String.valueOf((int) Math.floor((double) length / 60)); + } + + //视频秒数处理 + public static String vodLength(int i) { + if (i > 60) { + if (i % 60 >= 10) { + return i / 60 + ":" + i % 60; + } else { + return i / 60 + ":0" + i % 60; + } + } else { + if (i % 60 >= 10) { + return "00:" + i; + } else { + return "00:0" + i; + } + } + } + + //文件大小处理 + public static String fileUnit(int i) { + if (i / 1024 > 1024) { + return String.format("%.2f", (double) i / 1024 / 1024) + "M"; + } else { + return String.format("%.2f", (double) i / 1024) + "K"; + } + } + + //单个题目秒数处理 + public static String exerciseLength(int i) { + if (i >= 60 * 60) { + return i / 60 / 60 + "时" + (i - 60 * 60) / 60 + "分" + i % 60 + "秒"; + } else if (i >= 60) { + return i / 60 + "分" + i % 60 + "秒"; + } else { + return i % 60 + "秒"; + } + } + + // 除法取整 + public static String getAvgIndex(BigDecimal counts, BigDecimal total) { + if (BigDecimal.ZERO.equals(total)) { + return "0"; + } else { + return counts.divide(total, RoundingMode.CEILING).stripTrailingZeros().toPlainString(); + } + } + + //百分比 取整 返回字符串 + public static String getPercentAvgIndex(BigDecimal counts, BigDecimal total) { + if (BigDecimal.ZERO.equals(total) || BigDecimal.ZERO.equals(counts)) { + return "0%"; + } else { + return counts.multiply(new BigDecimal(100)).divide(total, RoundingMode.CEILING).stripTrailingZeros().toPlainString() + "%"; + } + } + + //百分比 不带%输出 + public static String getPercentAvgIndexWithPercent(BigDecimal counts, BigDecimal total) { + if (BigDecimal.ZERO.equals(total) || BigDecimal.ZERO.equals(counts)) { + return "0"; + } else { + return counts.multiply(new BigDecimal(100)).divide(total, 2, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString(); + } + } + + //百分比 不带%输出 + public static String getPercentAvgIndexCeil(BigDecimal counts, BigDecimal total) { + if (BigDecimal.ZERO.equals(total) || BigDecimal.ZERO.equals(counts)) { + return "0"; + } else { + return counts.multiply(new BigDecimal(100)).divide(total, 2, BigDecimal.ROUND_CEILING).stripTrailingZeros().toPlainString(); + } + } + + + //习题序号生成规则 sid 从数据取出某科目某知识点的最大的序号 + public static String getExeCode(String sid) { + Integer integer = Integer.valueOf(sid.substring(9)); + return sid.substring(0, 9) + (++integer); + } + + // 整型a 整型b a/b 向上取整 + public static Integer intDivCeil(long a, int b) { + return (int) Math.ceil((double) a / b); + } + + // 整型a 整型b a/b 向下取整 + public static Integer intDivFloorPercent(long a, int b) { + return (int) Math.floor((double) a * 100 / b); + } + + public static Integer getRandomNum(Integer i) { + Random random = new Random(); + return random.nextInt(i); + } + +// public static void main(String[] args) { +// for (int i= 1;i<100;i++){ +// System.out.println(getRandomNum(2)); +// } +// } + + public static String secToTime(int time) { + String timeStr ; + int hour; + int minute; + int second; + if (time <= 0) { + return "00:00:00"; + } else { + minute = time / 60; + if (minute < 60) { + second = time % 60; + timeStr = "00:"+unitFormat(minute) + ":" + unitFormat(second); + } else { + hour = minute / 60; + minute = minute % 60; + second = time - hour * 3600 - minute * 60; + timeStr = unitFormat(hour) + ":" + unitFormat(minute) + ":" + unitFormat(second); + } + } + return timeStr; + } + public static String unitFormat(int i) { + String retStr = null; + if (i >= 0 && i < 10) { + retStr = "0" + i; + } else { + retStr = "" + i; + } + return retStr; + } +} diff --git a/src/main/java/com/subsidy/util/MongoUtil.java b/src/main/java/com/subsidy/util/MongoUtil.java new file mode 100644 index 0000000..6c53fbc --- /dev/null +++ b/src/main/java/com/subsidy/util/MongoUtil.java @@ -0,0 +1,52 @@ +//package com.subsidy.util; +// +//import lombok.Data; +//import org.springframework.stereotype.Component; +// +//import java.util.List; +//import java.util.regex.Pattern; +// +//@Data +//@Component +//public class MongoUtil { +// public Integer pageSize; +// private Integer currentPage; +// +// +// public void start(Integer currentPage, Integer pageSize, Query query) { +// pageSize = pageSize == 0 ? 10 : pageSize; +// query.limit(pageSize); +// query.skip((currentPage - 1) * pageSize); +// this.pageSize = pageSize; +// this.currentPage = currentPage; +// } +// +// public PageHelper pageHelper(long total, List list) { +// return new PageHelper(this.currentPage, total, this.pageSize, list); +// } +// +// public PageHelper pageHelper(List list) { +// return new PageHelper(this.currentPage, this.pageSize, list); +// } +// +// public PageHelper pageHelper(long currentPage, long total, long pageSize, List list) { +// return new PageHelper(currentPage, total, pageSize, list); +// } +// +// public PageHelper pageHelper(long currentPage, long pageSize, List list) { +// return new PageHelper(currentPage, pageSize, list); +// } +// +// +// /** +// * 用于模糊查询忽略大小写 +// * +// * @param string +// * @return +// */ +// public Pattern getPattern(String string) { +// Pattern pattern = Pattern.compile("^.*" + string + ".*$", Pattern.CASE_INSENSITIVE); +// return pattern; +// } +// +//} diff --git a/src/main/java/com/subsidy/util/MyBeanUtils.java b/src/main/java/com/subsidy/util/MyBeanUtils.java new file mode 100644 index 0000000..919f1fd --- /dev/null +++ b/src/main/java/com/subsidy/util/MyBeanUtils.java @@ -0,0 +1,29 @@ +package com.subsidy.util; + +import org.springframework.beans.BeanWrapper; +import org.springframework.beans.BeanWrapperImpl; + +import java.beans.PropertyDescriptor; +import java.util.HashSet; +import java.util.Set; + +public class MyBeanUtils { + + public static String[] getNullPropertyNames (Object source) { + final BeanWrapper src = new BeanWrapperImpl(source); + PropertyDescriptor[] pds = src.getPropertyDescriptors(); + + Set emptyNames = new HashSet<>(); + for(PropertyDescriptor pd : pds) { + Object srcValue = src.getPropertyValue(pd.getName()); + // 此处判断可根据需求修改 + if (srcValue == null) { + emptyNames.add(pd.getName()); + } + } + String[] result = new String[emptyNames.size()]; + return emptyNames.toArray(result); + } + + +} diff --git a/src/main/java/com/subsidy/util/MyStringUtils.java b/src/main/java/com/subsidy/util/MyStringUtils.java new file mode 100644 index 0000000..4cbbc16 --- /dev/null +++ b/src/main/java/com/subsidy/util/MyStringUtils.java @@ -0,0 +1,30 @@ +package com.subsidy.util; + +import java.util.List; + +public class MyStringUtils { + + + /** + * 把集合改成字符串 去掉逗号 + */ + public static String changeListToString(List list) { + + StringBuffer buffer = new StringBuffer(); + if (list.size() > 0) { + int i= 0 ; + for (String s : list) { + buffer.append(s); + if (i != list.size()-1){ + buffer.append(","); + } + } + } + return buffer.toString(); + } + + + + + +} diff --git a/src/main/java/com/subsidy/util/OSSUtils.java b/src/main/java/com/subsidy/util/OSSUtils.java new file mode 100644 index 0000000..d42c59f --- /dev/null +++ b/src/main/java/com/subsidy/util/OSSUtils.java @@ -0,0 +1,121 @@ +package com.subsidy.util; + +import cn.hutool.core.codec.Base64; +import cn.hutool.core.date.DateTime; +import com.aliyun.oss.ClientException; +import com.aliyun.oss.OSS; +import com.aliyun.oss.OSSClientBuilder; +import com.aliyun.oss.OSSException; +import com.aliyun.oss.model.PutObjectRequest; +import com.aliyun.oss.model.PutObjectResult; + +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.UUID; + +public class OSSUtils { + + // @Value("${aliyun.oss.accessKeyId}") + private static String accessKeyId = "LTAI5tPAH7P7WQVeowo517BE"; + + // @Value("${aliyun.oss.accessKeySecret}") + private static String secretAccessKey = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY"; + + // @Value("${aliyun.oss.endpoint}") + private static String endPoint = "oss-cn-beijing.aliyuncs.com"; + + // @Value("${aliyun.oss.bucketName}") +// private static String bucketName = "shixischool"; + private static String bucketName = "ykhl-bigger"; + + public static String uploadOneFile(String file) throws IOException { + + // 创建OSSClient实例。 + OSS ossClient = new OSSClientBuilder().build(endPoint, accessKeyId, secretAccessKey); + + // 设置文件名 + String fileName = new DateTime().toString("yyyy-MM-dd") + + UUID.randomUUID().toString() + ".jpg"; + + // 获取文件后缀名 +// int originalFilenameStartIndex = file.indexOf('/'); +// int originalFilenameEndIndex = file.indexOf(';'); +// String originalFilename = file.substring(originalFilenameStartIndex+1,originalFilenameEndIndex); + + // 获取base64的文件 +// file = file.split(",")[1]; + + byte[] bytesFile = Base64.decode(file); + try { + // 创建PutObject请求。 + InputStream inputStream = new ByteArrayInputStream(bytesFile); + ossClient.putObject(bucketName, fileName, inputStream); + + String url = "http://" + bucketName + "." + endPoint + "/" + fileName+"?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg"; + // System.out.println(url); + return url; + } catch (Exception e) { + e.printStackTrace(); + return null; + } finally { + if (ossClient != null) { + ossClient.shutdown(); + } + } + } + + + public static String image2Base64(String imgUrl) { + URL url = null; + InputStream is = null; + ByteArrayOutputStream outStream = null; + HttpURLConnection httpUrl = null; + + try { + url = new URL(imgUrl); + httpUrl = (HttpURLConnection) url.openConnection(); + httpUrl.connect(); + httpUrl.getInputStream(); + is = httpUrl.getInputStream(); + outStream = new ByteArrayOutputStream(); + // 创建一个Buffer字符串 + byte[] buffer = new byte[1024]; + // 每次读取的字符串长度,如果为-1,代表全部读取完毕 + int len = 0; + // 使用一个输入流从buffer里把数据读取出来 + while ((len = is.read(buffer)) != -1) { + // 用输出流往buffer里写入数据,中间参数代表从哪个位置开始读,len代表读取的长度 + outStream.write(buffer, 0, len); + } + // 对字节数组Base64编码 + return Base64Util.encode(outStream.toByteArray()); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (is != null) { + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (outStream != null) { + try { + outStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (httpUrl != null) { + httpUrl.disconnect(); + } + } + return imgUrl; + } + + public static void main(String[] args) { +// System.out.println(image2Base64("https://shixischool.oss-cn-beijing.aliyuncs.com/2022-12-219df5b721-99b7-48c4-916e-e474a4eca946.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg")); + System.out.println(image2Base64("http://ykhl-bigger.oss-cn-beijing.aliyuncs.com/2023-02-1618cb936b-4825-429c-9fdd-dd9d0de97ed7.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg")); + } +} diff --git a/src/main/java/com/subsidy/util/PageHelper.java b/src/main/java/com/subsidy/util/PageHelper.java new file mode 100644 index 0000000..bf37716 --- /dev/null +++ b/src/main/java/com/subsidy/util/PageHelper.java @@ -0,0 +1,30 @@ +package com.subsidy.util; + +import lombok.Data; +import org.apache.poi.ss.formula.functions.T; + +import java.util.List; + +@Data +public class PageHelper { + + private long currentPage; + private long total; + private long pageSize; + private List list; + + public PageHelper(long pageNum, long total, long pageSize, List list) { + this.currentPage = pageNum; + this.total = total; + this.pageSize = pageSize; + this.list = list; + } + + public PageHelper(long pageNum, long pageSize, List list) { + this.currentPage = pageNum; + this.pageSize = pageSize; + this.list = list; + } + + +} diff --git a/src/main/java/com/subsidy/util/PolyvUtils.java b/src/main/java/com/subsidy/util/PolyvUtils.java new file mode 100644 index 0000000..111a943 --- /dev/null +++ b/src/main/java/com/subsidy/util/PolyvUtils.java @@ -0,0 +1,31 @@ +package com.subsidy.util; + +import net.polyv.live.v1.util.LiveSignUtil; + +import java.io.UnsupportedEncodingException; +import java.security.NoSuchAlgorithmException; + +public class PolyvUtils { + + /** + * 学生端--生成保利威视直播观看地址 + */ + public static String liveSign(String userId, String channelId){ + + //根据实际情况设置userid + String ts = String.valueOf(System.currentTimeMillis()); + String url = "https://live.polyv.cn/watch/"+channelId; + String signText = "03sqxr97fo"+ userId +"03sqxr97fo"+ts; + try { + String sign = LiveSignUtil.md5Hex(signText); + url += "?userid="+userId+"&ts="+ts+"&sign="+sign; + return url; + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + return null; + } + +} diff --git a/src/main/java/com/subsidy/util/QuartzUtil.java b/src/main/java/com/subsidy/util/QuartzUtil.java new file mode 100644 index 0000000..7f67070 --- /dev/null +++ b/src/main/java/com/subsidy/util/QuartzUtil.java @@ -0,0 +1,114 @@ +package com.subsidy.util; + +import com.subsidy.common.exception.HttpException; +import org.quartz.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +import static org.quartz.DateBuilder.futureDate; + +@Component +public class QuartzUtil { + + @Autowired + private Scheduler scheduler; + + public static void main(String[] args) { + System.out.println(DateFormatUtil.parse("2022-06-28 11:30:47", "yyyy-MM-dd HH:mm:ss").getTime() -System.currentTimeMillis()); + } + + /** + * 添加定时任务,只执行一次的定时任务 + * + * @param cls 执行类 + * @param date 时间 + * @param params 参数 + * @param name 定时器名称 + * @param group 定时器组名 + */ + public void addSimpleJob(Class cls, Date date, Map params, String name, String group) { + try { + JobKey key = new JobKey(name, group); + List triggers = (List) scheduler.getTriggersOfJob(key); + if (triggers.size() == 0) { + Long time = (date.getTime() - System.currentTimeMillis()) / 1000; + JobDataMap jobDataMap = new JobDataMap(); + jobDataMap.put("params", params); + JobDetail jobDetail = JobBuilder.newJob(cls) + .withIdentity(name, group) + .usingJobData(jobDataMap) + .build(); + SimpleTrigger trigger = (SimpleTrigger) TriggerBuilder.newTrigger() + .withIdentity(name, group) + .startAt(futureDate(Math.toIntExact(time), DateBuilder.IntervalUnit.SECOND)) + .build(); + scheduler.scheduleJob(jobDetail, trigger); + if (!scheduler.isShutdown()) { + scheduler.start(); + } + } + } catch (Exception e) { + e.printStackTrace(); + throw new HttpException(70002); + } + } + + /** + * 添加定时任务,循环不断执行的定时任务 + * + * @param cls 执行类 + * @param cron cron 表达式 + * @param params 参数 + * @param name 定时器名称 + * @param group 定时器组名 + */ + public void addCronJob(Class cls, String cron, Map params, String name, String group) { + try { + JobKey key = new JobKey(name, group); + List triggers = (List) scheduler.getTriggersOfJob(key); + if (triggers.size() == 0) { + JobDataMap jobDataMap = new JobDataMap(); + jobDataMap.put("params", params); + JobDetail jobDetail = JobBuilder.newJob(cls) + .withIdentity(name, group) + .usingJobData(jobDataMap) + .build(); + CronTrigger trigger = TriggerBuilder.newTrigger() + .withIdentity(name, group) + .withSchedule(CronScheduleBuilder.cronSchedule(cron)) + .build(); + scheduler.scheduleJob(jobDetail, trigger); + if (!scheduler.isShutdown()) { + scheduler.start(); + } + } + } catch (Exception e) { + throw new HttpException(70002); + } + } + + /** + * 删除定时器 + * + * @param name 定时器名称 + * @param group 定时器组名 + */ + public void deleteJob(String name, String group) { + try { + JobKey key = new JobKey(name, group); + List triggers = (List) scheduler.getTriggersOfJob(key); + if (triggers.size() > 0) { + TriggerKey triggerKey = TriggerKey.triggerKey(name, group); + scheduler.pauseTrigger(triggerKey); + scheduler.unscheduleJob(triggerKey); + scheduler.deleteJob(JobKey.jobKey(name, group)); + } + } catch (Exception e) { + throw new HttpException(70003); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/util/RandomUtil.java b/src/main/java/com/subsidy/util/RandomUtil.java new file mode 100644 index 0000000..c11970d --- /dev/null +++ b/src/main/java/com/subsidy/util/RandomUtil.java @@ -0,0 +1,34 @@ +package com.subsidy.util; + +import cn.hutool.core.lang.UUID; + +import java.util.Random; + +public class RandomUtil { + + public static int getCode() { + return (int)((Math.random() * 9 + 1) * 100000); + } + + public static String getRandomCode(int randomLength) { + StringBuilder str = new StringBuilder(); + Random random = new Random(); + for (int i = 0; i < randomLength; i++) { + str.append(random.nextInt(10)); + } + return str.toString(); + } + + + /** + * 随机生成订单号 + */ + public static String randomOrderNumber(){ + return UUID.fastUUID().toString().replace("-","").substring(0,29); + } + + public static void main(String[] args) { + System.out.println(randomOrderNumber()); + } + +} diff --git a/src/main/java/com/subsidy/util/RedisUtil.java b/src/main/java/com/subsidy/util/RedisUtil.java new file mode 100644 index 0000000..0b7e9dc --- /dev/null +++ b/src/main/java/com/subsidy/util/RedisUtil.java @@ -0,0 +1,620 @@ +package com.subsidy.util; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.BoundListOperations; +import org.springframework.data.redis.core.Cursor; +import org.springframework.data.redis.core.RedisCallback; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.ScanOptions; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +/** + *

+ * redisTemplate封装 + *

+ * + * @author DengMin + * @since 2020/12/17 + */ + +@Component +public class RedisUtil { + + @Autowired + private RedisTemplate redisTemplate; + + public RedisUtil(RedisTemplate redisTemplate) { + this.redisTemplate = redisTemplate; + } + + /** + * 指定缓存失效时间 + * @param key 键 + * @param time 时间(秒) + * @return + */ + public boolean expire(String key,long time){ + try { + if(time>0){ + redisTemplate.expire(key, time, TimeUnit.SECONDS); + } + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 根据key 获取过期时间 + * @param key 键 不能为null + * @return 时间(秒) 返回0代表为永久有效 + */ + public long getExpire(String key){ + return redisTemplate.getExpire(key,TimeUnit.SECONDS); + } + + /** + * 判断key是否存在 + * @param key 键 + * @return true 存在 false不存在 + */ + public boolean hasKey(String key){ + try { + return redisTemplate.hasKey(key); + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 删除缓存 + * @param key 可以传一个值 或多个 + */ + @SuppressWarnings("unchecked") + public void del(String ... key){ + if(key!=null&&key.length>0){ + if(key.length==1){ + redisTemplate.delete(key[0]); + }else{ + redisTemplate.delete(CollectionUtils.arrayToList(key)); + } + } + } + + /** + * 删除缓存 + * @param key 集合数据 + */ + public void del(Set key) { + if (key != null && key.size() > 0) { + redisTemplate.delete(key); + } + } + + //============================String============================= + /** + * 普通缓存获取 + * @param key 键 + * @return 值 + */ + public Object get(String key){ + return key==null?null:redisTemplate.opsForValue().get(key); + } + + /** + * 普通缓存放入 + * @param key 键 + * @param value 值 + * @return true成功 false失败 + */ + public boolean set(String key,Object value) { + try { + redisTemplate.opsForValue().set(key, value); + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 普通缓存放入并设置时间 + * @param key 键 + * @param value 值 + * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期 + * @return true成功 false 失败 + */ + public boolean set(String key,Object value,long time){ + try { + if(time>0){ + redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS); + }else{ + set(key, value); + } + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 递增 + * @param key 键 + * @param delta 要增加几(大于0) + * @return + */ + public long incr(String key, long delta){ + if(delta<0){ + throw new RuntimeException("递增因子必须大于0"); + } + return redisTemplate.opsForValue().increment(key, delta); + } + + /** + * 递减 + * @param key 键 + * @param delta 要减少几(小于0) + * @return + */ + public long decr(String key, long delta){ + if(delta<0){ + throw new RuntimeException("递减因子必须大于0"); + } + return redisTemplate.opsForValue().increment(key, -delta); + } + + //================================Map================================= + /** + * HashGet + * @param key 键 不能为null + * @param item 项 不能为null + * @return 值 + */ + public Object hget(String key,String item){ + return redisTemplate.opsForHash().get(key, item); + } + + /** + * 获取hashKey对应的所有键值 + * @param key 键 + * @return 对应的多个键值 + */ + public Map hmget(String key){ + return redisTemplate.opsForHash().entries(key); + } + + /** + * HashSet + * @param key 键 + * @param map 对应多个键值 + * @return true 成功 false 失败 + */ + public boolean hmset(String key, Map map){ + try { + redisTemplate.opsForHash().putAll(key, map); + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * HashSet 并设置时间 + * @param key 键 + * @param map 对应多个键值 + * @param time 时间(秒) + * @return true成功 false失败 + */ + public boolean hmset(String key, Map map, long time){ + try { + redisTemplate.opsForHash().putAll(key, map); + if(time>0){ + expire(key, time); + } + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 向一张hash表中放入数据,如果不存在将创建 + * @param key 键 + * @param item 项 + * @param value 值 + * @return true 成功 false失败 + */ + public boolean hset(String key,String item,Object value) { + try { + redisTemplate.opsForHash().put(key, item, value); + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 向一张hash表中放入数据,如果不存在将创建 + * @param key 键 + * @param item 项 + * @param value 值 + * @param time 时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间 + * @return true 成功 false失败 + */ + public boolean hset(String key,String item,Object value,long time) { + try { + redisTemplate.opsForHash().put(key, item, value); + if(time>0){ + expire(key, time); + } + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 删除hash表中的值 + * @param key 键 不能为null + * @param item 项 可以使多个 不能为null + */ + public void hdel(String key, Object... item){ + redisTemplate.opsForHash().delete(key,item); + } + + /** + * 判断hash表中是否有该项的值 + * @param key 键 不能为null + * @param item 项 不能为null + * @return true 存在 false不存在 + */ + public boolean hHasKey(String key, String item){ + return redisTemplate.opsForHash().hasKey(key, item); + } + + /** + * hash递增 如果不存在,就会创建一个 并把新增后的值返回 + * @param key 键 + * @param item 项 + * @param by 要增加几(大于0) + * @return + */ + public double hincr(String key, String item,double by){ + return redisTemplate.opsForHash().increment(key, item, by); + } + + /** + * hash递减 + * @param key 键 + * @param item 项 + * @param by 要减少记(小于0) + * @return + */ + public double hdecr(String key, String item,double by){ + return redisTemplate.opsForHash().increment(key, item,-by); + } + + //============================set============================= + /** + * 根据key获取Set中的所有值 + * @param key 键 + * @return + */ + public Set sGet(String key){ + try { + return redisTemplate.opsForSet().members(key); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + /** + * 根据value从一个set中查询,是否存在 + * @param key 键 + * @param value 值 + * @return true 存在 false不存在 + */ + public boolean sHasKey(String key,Object value){ + try { + return redisTemplate.opsForSet().isMember(key, value); + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 将数据放入set缓存 + * @param key 键 + * @param values 值 可以是多个 + * @return 成功个数 + */ + public long sSet(String key, Object...values) { + try { + return redisTemplate.opsForSet().add(key, values); + } catch (Exception e) { + e.printStackTrace(); + return 0; + } + } + + /** + * 将set数据放入缓存 + * @param key 键 + * @param time 时间(秒) + * @param values 值 可以是多个 + * @return 成功个数 + */ + public long sSetAndTime(String key,long time,Object...values) { + try { + Long count = redisTemplate.opsForSet().add(key, values); + if(time>0) { + expire(key, time); + } + return count; + } catch (Exception e) { + e.printStackTrace(); + return 0; + } + } + + /** + * 获取set缓存的长度 + * @param key 键 + * @return + */ + public long sGetSetSize(String key){ + try { + return redisTemplate.opsForSet().size(key); + } catch (Exception e) { + e.printStackTrace(); + return 0; + } + } + + /** + * 移除值为value的 + * @param key 键 + * @param values 值 可以是多个 + * @return 移除的个数 + */ + public long setRemove(String key, Object ...values) { + try { + Long count = redisTemplate.opsForSet().remove(key, values); + return count; + } catch (Exception e) { + e.printStackTrace(); + return 0; + } + } + //===============================list================================= + + /** + * 获取list缓存的内容 + * @param key 键 + * @param start 开始 + * @param end 结束 0 到 -1代表所有值 + * @return + */ + public List lGet(String key, long start, long end){ + try { + return redisTemplate.opsForList().range(key, start, end); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + /** + * 获取list缓存的长度 + * @param key 键 + * @return + */ + public long lGetListSize(String key){ + try { + return redisTemplate.opsForList().size(key); + } catch (Exception e) { + e.printStackTrace(); + return 0; + } + } + + /** + * 通过索引 获取list中的值 + * @param key 键 + * @param index 索引 index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推 + * @return + */ + public Object lGetIndex(String key,long index){ + try { + return redisTemplate.opsForList().index(key, index); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + /** + * 将list放入缓存 + * @param key 键 + * @param value 值 + * @return + */ + public boolean lSet(String key, Object value) { + try { + redisTemplate.opsForList().rightPush(key, value); + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 将list放入缓存 + * @param key 键 + * @param value 值 + * @param time 时间(秒) + * @return + */ + public boolean lSet(String key, Object value, long time) { + try { + redisTemplate.opsForList().rightPush(key, value); + if (time > 0) { + expire(key, time); + } + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 将list放入缓存 + * @param key 键 + * @param value 值 + * @return + */ + public boolean lSet(String key, List value) { + try { + redisTemplate.opsForList().rightPushAll(key, value); + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 将list放入缓存 + * @param key 键 + * @param value 值 + * @param time 时间(秒) + * @return + */ + public boolean lSet(String key, List value, long time) { + try { + redisTemplate.opsForList().rightPushAll(key, value); + if (time > 0) { + expire(key, time); + } + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 根据索引修改list中的某条数据 + * @param key 键 + * @param index 索引 + * @param value 值 + * @return + */ + public boolean lUpdateIndex(String key, long index,Object value) { + try { + redisTemplate.opsForList().set(key, index, value); + return true; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + /** + * 移除N个值为value + * @param key 键 + * @param count 移除多少个 + * @param value 值 + * @return 移除的个数 + */ + public long lRemove(String key,long count,Object value) { + try { + Long remove = redisTemplate.opsForList().remove(key, count, value); + return remove; + } catch (Exception e) { + e.printStackTrace(); + return 0; + } + } + + ///** + // * 模糊查询获取key值 + // * @param pattern + // * @return + // */ + public Set keys(String pattern){ + return redisTemplate.keys(pattern); + } + + /** + * 模糊查询 + * @param pattern + * @return + */ + public Set scan(String pattern) { + return redisTemplate.execute((RedisCallback>) redisConnection -> { + Set keys = new HashSet<>(); + Cursor cursor = redisConnection.scan(new ScanOptions.ScanOptionsBuilder().match(pattern).count(Integer.MAX_VALUE).build()); + while (cursor.hasNext()) { + keys.add(new String(cursor.next())); + } + return keys; + }); + } + + /** + * 使用Redis的消息队列 + * @param channel + * @param message 消息内容 + */ + public void convertAndSend(String channel, Object message){ + redisTemplate.convertAndSend(channel,message); + } + + + //=========BoundListOperations 用法 start============ + + + /** + * 根据起始结束序号遍历Redis中的list + * @param listKey + * @param start 起始序号 + * @param end 结束序号 + * @return + */ + public List rangeList(String listKey, long start, long end) { + //绑定操作 + BoundListOperations boundValueOperations = redisTemplate.boundListOps(listKey); + //查询数据 + return boundValueOperations.range(start, end); + } + /** + * 弹出右边的值 --- 并且移除这个值 + * @param listKey + */ + public Object rifhtPop(String listKey){ + //绑定操作 + BoundListOperations boundValueOperations = redisTemplate.boundListOps(listKey); + return boundValueOperations.rightPop(); + } + + //=========BoundListOperations 用法 End============ + +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/util/RenSheJuConstant.java b/src/main/java/com/subsidy/util/RenSheJuConstant.java new file mode 100644 index 0000000..8e16e6d --- /dev/null +++ b/src/main/java/com/subsidy/util/RenSheJuConstant.java @@ -0,0 +1,69 @@ +package com.subsidy.util; + +public class RenSheJuConstant { + + /** + * POST-2:班级基本信息信息采集接口 + */ + public static final String POST_3 = "POST3_班级基本信息"; + + /** + * POST-3:学时信息采集接口 + */ + public static final String POST_4 = "POST4_学时信息"; + + /** + * POST-4:考试信息采集接口 + */ + public static final String POST_5 = "POST5_考试信息"; + + /** + * POST-5:答疑辅导采集接口 + */ + public static final String POST_6 = "POST6_答疑辅导"; + + /** + * POST-6 班级活跃度/实名认证照片信息采集接口 + */ + public static final String POST_7 = "POST7_实名认证/活跃度"; + + /** + * POST-7 获取培训待绑定的(班级编号,项目编号)列表 + */ +// public static final String POST_7 = "POST_7_getClassCodeByPrivateKey"; + + /** + * POST-8 上下游班级数据绑定接口 + */ + public static final String POST_8 = "POST8_待绑定的班级"; + + /** + * POST-9 获取推送失败班级列表 + */ + public static final String POST_9 = "POST_9_getErrorClass"; + + /** + * POST-10 清除推送失败班级缓存 + */ + public static final String POST_10 = "POST_10_clear"; + + /** + * 调取失败 + */ + public static final String API_ERROR = "调取失败"; + + /** + * 当天没数据 + */ + public static final String NO_DATA = "NO_DATA"; + + /** + * 推送失败 + */ + public static final String PUSH_FAIL = "推送失败"; + + /** + * 推送成功 + */ + public static final String PUSH_SUCCESS = "推送成功"; +} diff --git a/src/main/java/com/subsidy/util/ResultMode.java b/src/main/java/com/subsidy/util/ResultMode.java new file mode 100644 index 0000000..91c758b --- /dev/null +++ b/src/main/java/com/subsidy/util/ResultMode.java @@ -0,0 +1,56 @@ +package com.subsidy.util; + +public class ResultMode { + + /** + * 成功:true,失败:false + */ + private boolean success; + + /** + * 返回编码 + */ + private int resultCode; + + /** + * 返回消息 + */ + private String msg; + + /** + * 结果数据 + */ + private Object data; + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public int getResultCode() { + return resultCode; + } + + public void setResultCode(int resultCode) { + this.resultCode = resultCode; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } +} diff --git a/src/main/java/com/subsidy/util/SMSUtils.java b/src/main/java/com/subsidy/util/SMSUtils.java new file mode 100644 index 0000000..2ef8917 --- /dev/null +++ b/src/main/java/com/subsidy/util/SMSUtils.java @@ -0,0 +1,206 @@ +package com.subsidy.util; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.aliyuncs.CommonRequest; +import com.aliyuncs.CommonResponse; +import com.aliyuncs.DefaultAcsClient; +import com.aliyuncs.IAcsClient; +import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest; +import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; +import com.aliyuncs.http.MethodType; +import com.aliyuncs.profile.DefaultProfile; +import com.aliyuncs.profile.IClientProfile; +import com.subsidy.common.configure.AliyunSmsProperties; +import com.subsidy.common.exception.HttpException; +import net.sourceforge.pinyin4j.PinyinHelper; +import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; +import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; +import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; +import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * 短信发送工具类 + */ + +@Component +public class SMSUtils { + + + + @Autowired + private AliyunSmsProperties aliyunSmsProperties; + + public SendSmsResponse send(String phone, String code) { + try { + System.setProperty("sun.net.client.defaultConnectTimeout", "10000"); + System.setProperty("sun.net.client.defaultReadTimeout", "10000"); + + //初始化acsClient,暂不支持region化 + IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", aliyunSmsProperties.getAccessKeyId(), aliyunSmsProperties.getAccessKeySecret()); + DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", aliyunSmsProperties.getProduct(), aliyunSmsProperties.getDomain()); + IAcsClient acsClient = new DefaultAcsClient(profile); + + //组装请求对象-具体描述见控制台-文档部分内容 + SendSmsRequest request = new SendSmsRequest(); + //必填:待发送手机号 + request.setPhoneNumbers(phone); + //必填:短信签名-可在短信控制台中找到 + request.setSignName("有课互联"); + //必填:短信模板-可在短信控制台中找到 + request.setTemplateCode("SMS_190945394"); + //可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 + request.setTemplateParam("{\"code\":\""+ code +"\"}"); + + //hint 此处可能会抛出异常,注意catch + SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request); + if(sendSmsResponse != null && sendSmsResponse.getCode().equals("OK")) { + return sendSmsResponse; + } + + throw new Exception(sendSmsResponse.getMessage()); + } catch (Exception e) { + e.printStackTrace(); + throw new HttpException(70011); + } + } + + + /** + * 发送验证码短信 + * @param templateId 短信模板id + * @param telephone 手机号 + * @return + */ + public String sendVerifySMS(String templateId,String telephone,String param){ + + try { + System.setProperty("sun.net.client.defaultConnectTimeout", "10000"); + System.setProperty("sun.net.client.defaultReadTimeout", "10000"); + + //初始化acsClient,暂不支持region化 + IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", aliyunSmsProperties.getAccessKeyId(), aliyunSmsProperties.getAccessKeySecret()); + DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", aliyunSmsProperties.getProduct(), aliyunSmsProperties.getDomain()); + IAcsClient acsClient = new DefaultAcsClient(profile); + + //组装请求对象-具体描述见控制台-文档部分内容 + SendSmsRequest request = new SendSmsRequest(); + //必填:待发送手机号 + request.setPhoneNumbers(telephone); + //必填:短信签名-可在短信控制台中找到 + request.setSignName("有课互联"); + //必填:短信模板-可在短信控制台中找到 + request.setTemplateCode(templateId); + //可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 + request.setTemplateParam("{\"code\":\""+ param +"\"}"); + + //hint 此处可能会抛出异常,注意catch + SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request); + if(sendSmsResponse != null && sendSmsResponse.getCode().equals("OK")) { + return ConstantUtils.SUCCESS_SEND_OUT; + } + + throw new Exception(sendSmsResponse.getMessage()); + } catch(Exception e) { + e.printStackTrace(); + return ConstantUtils.FAIL_SEND_OUT; + } + } + + public String sendWarning(String templateId,String telephone,String param){ + try { + System.setProperty("sun.net.client.defaultConnectTimeout", "10000"); + System.setProperty("sun.net.client.defaultReadTimeout", "10000"); + + //初始化acsClient,暂不支持region化 + IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", aliyunSmsProperties.getAccessKeyId(), aliyunSmsProperties.getAccessKeySecret()); + DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", aliyunSmsProperties.getProduct(), aliyunSmsProperties.getDomain()); + IAcsClient acsClient = new DefaultAcsClient(profile); + + //组装请求对象-具体描述见控制台-文档部分内容 + SendSmsRequest request = new SendSmsRequest(); + //必填:待发送手机号 + request.setPhoneNumbers(telephone); + //必填:短信签名-可在短信控制台中找到 + request.setSignName("有课互联科技"); + //必填:短信模板-可在短信控制台中找到 + request.setTemplateCode(templateId); + //可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 + request.setTemplateParam("{\"ids\":\""+ param +"\"}"); + + //hint 此处可能会抛出异常,注意catch + SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request); + if(sendSmsResponse != null && sendSmsResponse.getCode().equals("OK")) { + return ConstantUtils.SUCCESS_SEND_OUT; + } + + throw new Exception(sendSmsResponse.getMessage()); + } catch(Exception e) { + e.printStackTrace(); + return ConstantUtils.FAIL_SEND_OUT; + } + } + + /** + * 发送通知短信 + * @param templateId 短信模板id + * @param telephone 手机号 + * @return + */ + public static String sendNoticeSMS(String templateId,String telephone,String param){ + DefaultProfile profile = DefaultProfile.getProfile(ConstantUtils.REGION_ID, ConstantUtils.ACCESS_KEY_ID, ConstantUtils.SECRET); + IAcsClient client = new DefaultAcsClient(profile); + + CommonRequest request = new CommonRequest(); + request.setSysMethod(MethodType.POST); + request.setSysDomain("dysmsapi.aliyuncs.com"); + request.setSysVersion("2017-05-25"); + request.setSysAction("SendSms"); + request.putQueryParameter("RegionId",ConstantUtils.REGION_ID); + request.putQueryParameter("PhoneNumbers",telephone); + request.putQueryParameter("SignName",ConstantUtils.TECH_NAME); + request.putQueryParameter("TemplateCode",templateId); +// if (StringUtils.isEmpty(param)){ +// request.putQueryParameter("TemplateParam","{ \"code\":\""+verifyCode +"\"}"); +// } + request.putQueryParameter("TemplateParam",param); + CommonResponse response = null; + try { + response = client.getCommonResponse(request); + if(response != null) { + JSONObject data = JSON.parseObject(response.getData()); + if(data.get("Code").equals("OK")) { + return ConstantUtils.SUCCESS_SEND_OUT; + } + throw new HttpException(1000, data.get("Message").toString()); + } + return ConstantUtils.FAIL_SEND_OUT; + } catch(Exception e) { + e.printStackTrace(); + return ConstantUtils.FAIL_SEND_OUT; + } + } + + //public static void main(String[] args) { + // String param = "{ \"course\":\""+"语文课"+ "\",\"time\":\""+"2020-01-02" +"\",\"address\":\""+"上海市" +"\"}"; + // sendNoticeSMS("SMS_215336604","15201936167,18201963812",param); + //} + + public static void main(String[] args) throws BadHanyuPinyinOutputFormatCombination { + HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); + //拼音小写 + format.setCaseType(HanyuPinyinCaseType.LOWERCASE); + //不带声调 + format.setToneType(HanyuPinyinToneType.WITHOUT_TONE); + + //format.setVCharType(); + //要转换的中文,格式,转换之后的拼音的分隔符,遇到不能转换的是否保留 wo,shi,zhong,guo,ren,,hello + System.out.println(PinyinHelper.toHanYuPinyinString("我是中国人", format, "", false)); + } + + +} diff --git a/src/main/java/com/subsidy/util/SecretUtils.java b/src/main/java/com/subsidy/util/SecretUtils.java new file mode 100644 index 0000000..46e3976 --- /dev/null +++ b/src/main/java/com/subsidy/util/SecretUtils.java @@ -0,0 +1,159 @@ +package com.subsidy.util; + +import org.apache.commons.codec.digest.DigestUtils; +import org.apache.commons.lang3.StringUtils; + +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.util.Arrays; +import java.util.Random; +import java.util.UUID; + +public class SecretUtils { + + /** + * 对用户登录密码进行MD5加密 + * + * @param str + * @return + */ + + public static String getMD5String(String str) { + try { + // 生成一个MD5加密计算摘要 + return DigestUtils.md5Hex(str).toUpperCase(); + // MessageDigest md = MessageDigest.getInstance("MD5"); + // 计算md5函数 +// md.update(str.getBytes("utf-8")); + // digest()最后确定返回md5 hash值,返回值为8位字符串。因为md5 hash值是16位的hex值,实际上就是8位的字符 + // BigInteger函数则将8位的字符串转换成16位hex值,用字符串来表示;得到字符串形式的hash值 + //一个byte是八位二进制,也就是2位十六进制字符(2的8次方等于16的2次方) +// byte[] digest = md.digest(str.getBytes("utf-8")); +// return new BigInteger(1, digest).toString(16); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + /** + * 对字符串进行SHA加密 + * + * @param + */ + public static String getSHAString(String str) { + try { + MessageDigest sha = MessageDigest.getInstance("SHA-1"); + + byte[] byteArray = str.getBytes(StandardCharsets.UTF_8); + byte[] md5Bytes = sha.digest(byteArray); + StringBuffer hexValue = new StringBuffer(); + for (int i = 0; i < md5Bytes.length; i++) { + int val = ((int) md5Bytes[i]) & 0xff; + if (val < 16) { + hexValue.append("0"); + } + hexValue.append(Integer.toHexString(val)); + } + + return hexValue.toString(); + } catch (Exception e) { + return null; + } + + } + + /** + * Q学友SHA加密 + * @param arr + * @return + */ + public static String gen(String... arr) { + if (StringUtils.isAnyEmpty(arr)) { + throw new IllegalArgumentException("非法请求参数,有部分参数为空 : " + Arrays.toString(arr)); + } else { + Arrays.sort(arr); + StringBuilder sb = new StringBuilder(); + String[] var2 = arr; + int var3 = arr.length; + + for (int var4 = 0; var4 < var3; ++var4) { + String a = var2[var4]; + sb.append(a); + } + + return DigestUtils.sha1Hex(sb.toString()); + } + } + + public static String getNonce(int length) { + String val = ""; + Random random = new Random(); + //参数length,表示生成几位随机数 + for (int i = 0; i < length; i++) { + val += String.valueOf(random.nextInt(10)); + } + return val; + } + + private static byte[] md5(String s) + { + MessageDigest algorithm; + try + { + algorithm = MessageDigest.getInstance("MD5"); + algorithm.reset(); + algorithm.update(s.getBytes(StandardCharsets.UTF_8)); + byte[] messageDigest = algorithm.digest(); + return messageDigest; + } + catch (Exception e) + { + + } + return null; + } + + private static final String toHex(byte[] hash) + { + if (hash == null) + { + return null; + } + StringBuffer buf = new StringBuffer(hash.length * 2); + int i; + + for (i = 0; i < hash.length; i++) + { + if ((hash[i] & 0xff) < 0x10) + { + buf.append("0"); + } + buf.append(Long.toString(hash[i] & 0xff, 16)); + } + return buf.toString(); + } + + public static String hash(String s) + { + try + { + return new String(toHex(md5(s)).getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8); + } + catch (Exception e) + { + return s; + } + } + + + + + public static void main(String[] args) { + String uuid = UUID.randomUUID().toString(); + System.out.println(uuid.replace("-","")); +// System.out.println(hash(uuid+"ixihs")); +// System.out.println(System.currentTimeMillis()); + } +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/util/ShehuihuaConstant.java b/src/main/java/com/subsidy/util/ShehuihuaConstant.java new file mode 100644 index 0000000..00797cb --- /dev/null +++ b/src/main/java/com/subsidy/util/ShehuihuaConstant.java @@ -0,0 +1,66 @@ +package com.subsidy.util; + +public class ShehuihuaConstant { + + + /** + * 获取培训正在进行中的(班级编号,项目编号)列表 + */ + public static final String POST_2 = "Shehuihua_2_getClassCodeByPrivateKey"; + + /** + * POST-3:班级基本信息信息采集接口 + */ + public static final String POST_3 = "Shehuihua_3_uploadClass"; + + /** + * POST-4:学时信息采集接口 + */ + public static final String POST_4 = "Shehuihua_4_classHourBehavior"; + + /** + * POST-5:考试信息采集接口 + */ + public static final String POST_5 = "Shehuihua_5_uploadChapterBehavior"; + + + /** + * POST-6:答疑辅导采集接口 + */ + public static final String POST_6 = "Shehuihua_6_uploadClassAnswerQuestionBehavior"; + + /** + * POST-7 班级活跃度/实名认证照片信息采集接口 + */ + public static final String POST_7 = "Shehuihua_7_import/downstream/social/uploadImage"; + + /** + * POST-8 获取推送失败班级列表 + */ + public static final String POST_8 = "Shehuihua_8_getErrorClass"; + + /** + * POST-9 清除推送失败班级缓存 + */ + public static final String POST_9 = "Shehuihua_9_clear"; + + /** + * 调取失败 + */ + public static final String API_ERROR = "调取失败"; + + /** + * 当天没数据 + */ + public static final String NO_DATA = "NO_DATA"; + + /** + * 推送失败 + */ + public static final String PUSH_FAIL = "推送失败"; + + /** + * 推送成功 + */ + public static final String PUSH_SUCCESS = "推送成功"; +} diff --git a/src/main/java/com/subsidy/util/Signature.java b/src/main/java/com/subsidy/util/Signature.java new file mode 100644 index 0000000..c96dbbc --- /dev/null +++ b/src/main/java/com/subsidy/util/Signature.java @@ -0,0 +1,85 @@ +package com.subsidy.util; + +import sun.misc.BASE64Encoder; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import java.nio.charset.StandardCharsets; + +/** + * @author: tuyp + * @create: 2020-07-29 12:42 + */ +public class Signature { + + private String secretId; + private String secretKey; + private long currentTime; + private int random; + private int signValidDuration; + private int classId; + + private static final String HMAC_ALGORITHM = "HmacSHA1"; + private static final String CONTENT_CHARSET = "UTF-8"; + + public static byte[] byteMerger(byte[] byte1, byte[] byte2) { + byte[] byte3 = new byte[byte1.length + byte2.length]; + System.arraycopy(byte1, 0, byte3, 0, byte1.length); + System.arraycopy(byte2, 0, byte3, byte1.length, byte2.length); + return byte3; + } + + public String getUploadSignature() throws Exception { + String strSign = ""; + String contextStr = ""; + + long endTime = (currentTime + signValidDuration); + contextStr += "secretId=" + java.net.URLEncoder.encode(secretId, "utf8"); + contextStr += "¤tTimeStamp=" + currentTime; + contextStr += "&expireTime=" + endTime; + contextStr += "&random=" + random; + contextStr += "&classId=" + classId; + + try { + Mac mac = Mac.getInstance(HMAC_ALGORITHM); + SecretKeySpec secretKey = new SecretKeySpec(this.secretKey.getBytes(CONTENT_CHARSET), mac.getAlgorithm()); + mac.init(secretKey); + + byte[] hash = mac.doFinal(contextStr.getBytes(CONTENT_CHARSET)); + byte[] sigBuf = byteMerger(hash, contextStr.getBytes(StandardCharsets.UTF_8)); + strSign = base64Encode(sigBuf); + strSign = strSign.replace(" ", "").replace("\n", "").replace("\r", ""); + } catch (Exception e) { + throw e; + } + return strSign; + } + + private String base64Encode(byte[] buffer) { + BASE64Encoder encoder = new BASE64Encoder(); + return encoder.encode(buffer); + } + + public void setSecretId(String secretId) { + this.secretId = secretId; + } + + public void setSecretKey(String secretKey) { + this.secretKey = secretKey; + } + + public void setCurrentTime(long currentTime) { + this.currentTime = currentTime; + } + + public void setRandom(int random) { + this.random = random; + } + + public void setSignValidDuration(int signValidDuration) { + this.signValidDuration = signValidDuration; + } + + public void setClassId(int classId){this.classId = classId;} + +} diff --git a/src/main/java/com/subsidy/util/TestMain.java b/src/main/java/com/subsidy/util/TestMain.java new file mode 100644 index 0000000..50f955c --- /dev/null +++ b/src/main/java/com/subsidy/util/TestMain.java @@ -0,0 +1,124 @@ +package com.subsidy.util; + +import org.apache.commons.codec.binary.Base64; + +import java.io.FileOutputStream; +import java.io.OutputStream; +import java.security.MessageDigest; +import java.util.Random; + +public class TestMain { + + + + /** + * 对字节数组字符串进行Base64解码并生成图片 + * @param imgStr 图片数据 + * @param imgFilePath 保存图片全路径地址 + * @return + */ + public static boolean generateImage(String imgStr,String imgFilePath){ + // + if (imgStr == null) //图像数据为空 + { + return false; + } + try + { + //Base64解码 + byte[] b = Base64.decodeBase64(imgStr); + for(int i=0;i { +// System.out.println("thread1"); +// }); +// Thread thread2 = new Thread(() -> { +// System.out.println("thread2"); +// }); +// Thread thread3 = new Thread(() -> { +// System.out.println("thread3"); +// }); +// thread1.start(); +// thread1.join(); +// thread2.start(); +// thread2.join(); +// thread3.start(); +// thread3.join(); + + } + + public static String encrypt(String string) { + + String encryptedString = string; + char[] hexDigits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + try { + byte[] btInput = string.getBytes(); + MessageDigest mdInst = MessageDigest.getInstance("MD5"); + mdInst.update(btInput); + byte[] md = mdInst.digest(); + int j = md.length; + char[] str = new char[j * 2]; + int k = 0; + for (int i = 0; i < j; i++) { + byte byte0 = md[i]; + str[k++] = hexDigits[byte0 >>> 4 & 0xf]; + str[k++] = hexDigits[byte0 & 0xf]; + } + encryptedString = new String(str); + return encryptedString; + } catch (Exception e) { + e.printStackTrace(); + return encryptedString; + } + } + + /** + * 获取随机字母数字组合 + * + * @param length + * 字符串长度 + * @return + */ + public static String getRandomCharAndNumr(Integer length) { + String str = ""; + Random random = new Random(); + for (int i = 0; i < length; i++) { + boolean b = random.nextBoolean(); + if (b) { // 字符串 + // int choice = random.nextBoolean() ? 65 : 97; 取得65大写字母还是97小写字母 + str += (char) (97 + random.nextInt(26));// 取得大写字母 + } else { // 数字 + str += String.valueOf(random.nextInt(10)); + } + } + return str; + } +} diff --git a/src/main/java/com/subsidy/util/VodUtil.java b/src/main/java/com/subsidy/util/VodUtil.java new file mode 100644 index 0000000..79c3da0 --- /dev/null +++ b/src/main/java/com/subsidy/util/VodUtil.java @@ -0,0 +1,123 @@ +package com.subsidy.util; + +import com.subsidy.common.configure.VODConfig; +import com.subsidy.common.exception.HttpException; +import com.tencentcloudapi.common.Credential; +import com.tencentcloudapi.common.exception.TencentCloudSDKException; +import com.tencentcloudapi.common.profile.ClientProfile; +import com.tencentcloudapi.common.profile.HttpProfile; +import com.tencentcloudapi.vod.v20180717.VodClient; +import com.tencentcloudapi.vod.v20180717.models.DeleteMediaRequest; +import com.tencentcloudapi.vod.v20180717.models.DescribeCDNUsageDataRequest; +import com.tencentcloudapi.vod.v20180717.models.DescribeCDNUsageDataResponse; +import com.tencentcloudapi.vod.v20180717.models.MediaProcessTaskInput; +import com.tencentcloudapi.vod.v20180717.models.ProcessMediaRequest; +import com.tencentcloudapi.vod.v20180717.models.ProcessMediaResponse; +import com.tencentcloudapi.vod.v20180717.models.StatDataItem; +import com.tencentcloudapi.vod.v20180717.models.TranscodeTaskInput; +import org.springframework.stereotype.Component; + +/** + *

+ * 腾讯云 - 云点播API + *

+ * + * @author DengMin + * @since 2022/8/1 + */ +@Component +public class VodUtil { + + private static String endpoint = "vod.tencentcloudapi.com"; + + /** + * 根据视频模版进行转码 + * @param vodCode + * @return + */ + public static ProcessMediaResponse processMedia(VODConfig vodConfig, String vodCode) { + try { + //上传后直接转码 + Credential cred = new Credential(vodConfig.getSecretId(), vodConfig.getSecretKey()); + HttpProfile httpProfile = new HttpProfile(); + httpProfile.setEndpoint(endpoint); + + ClientProfile clientProfile = new ClientProfile(); + clientProfile.setHttpProfile(httpProfile); + + VodClient client = new VodClient(cred, "", clientProfile); + + ProcessMediaRequest processMediaRequest = new ProcessMediaRequest(); + MediaProcessTaskInput mediaProcessTaskInput1 = new MediaProcessTaskInput(); + TranscodeTaskInput[] transcodeTaskInputs1 = new TranscodeTaskInput[1]; + TranscodeTaskInput transcodeTaskInput1 = new TranscodeTaskInput(); + transcodeTaskInput1.setDefinition(ConstantUtils.TEMPLATE_VOD); + transcodeTaskInputs1[0] = transcodeTaskInput1; + mediaProcessTaskInput1.setTranscodeTaskSet(transcodeTaskInputs1); + processMediaRequest.setMediaProcessTask(mediaProcessTaskInput1); + processMediaRequest.setFileId(vodCode); + return client.ProcessMedia(processMediaRequest); + } catch (Exception ex) { + throw new HttpException(50001); + } + } + + /** + * 删除腾讯云上原视频 + * @param vodCode + */ + public static void deleteMedia(VODConfig vodConfig, String vodCode) { + try { + //删除原视频 + Credential cred = new Credential(vodConfig.getSecretId(), vodConfig.getSecretKey()); + HttpProfile httpProfile = new HttpProfile(); + httpProfile.setEndpoint(endpoint); + + ClientProfile clientProfile = new ClientProfile(); + clientProfile.setHttpProfile(httpProfile); + + VodClient client = new VodClient(cred, "", clientProfile); + // 实例化一个请求对象,每个接口都会对应一个request对象 + DeleteMediaRequest req = new DeleteMediaRequest(); + req.setFileId(vodCode); + // 返回的resp是一个DeleteMediaResponse的实例,与请求对象对应 + client.DeleteMedia(req); + } catch (TencentCloudSDKException e) { + throw new HttpException(99999, e.getMessage()); + } + } + + /** + * 云点播域名的CDN统计数据 + * @param vodConfig + * @param DataType + * @param startTime + * @param endTime + * @return + */ + public static StatDataItem[] DescribeCDNStatDetails(VODConfig vodConfig, String DataType, String startTime, String endTime) { + try { + Credential cred = new Credential(vodConfig.getSecretId(), vodConfig.getSecretKey()); + // 实例化一个http选项,可选的,没有特殊需求可以跳过 + HttpProfile httpProfile = new HttpProfile(); + httpProfile.setEndpoint(endpoint); + // 实例化一个client选项,可选的,没有特殊需求可以跳过 + ClientProfile clientProfile = new ClientProfile(); + clientProfile.setHttpProfile(httpProfile); + // 实例化要请求产品的client对象,clientProfile是可选的 + VodClient client = new VodClient(cred, "", clientProfile); + // 实例化一个请求对象,每个接口都会对应一个request对象 + DescribeCDNUsageDataRequest req = new DescribeCDNUsageDataRequest(); + req.setStartTime(startTime); + req.setEndTime(endTime); + req.setDataType(DataType); + // 返回的resp是一个DescribeCDNUsageDataResponse的实例,与请求对象对应 + DescribeCDNUsageDataResponse resp = client.DescribeCDNUsageData(req); + // 返回的resp是一个DescribeCDNStatDetailsResponse的实例,与请求对象对应 + return resp.getData(); + } catch (TencentCloudSDKException e) { + e.printStackTrace(); + throw new HttpException(99999, e.getMessage()); + } + } +} diff --git a/src/main/java/com/subsidy/util/excel/ExcelColumn.java b/src/main/java/com/subsidy/util/excel/ExcelColumn.java new file mode 100644 index 0000000..4f76159 --- /dev/null +++ b/src/main/java/com/subsidy/util/excel/ExcelColumn.java @@ -0,0 +1,14 @@ +package com.subsidy.util.excel; + + +import java.lang.annotation.*; + +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ExcelColumn { + + String value() default ""; + + int col() default 1; +} diff --git a/src/main/java/com/subsidy/util/excel/ExcelColumnUtil.java b/src/main/java/com/subsidy/util/excel/ExcelColumnUtil.java new file mode 100644 index 0000000..aa4e3ab --- /dev/null +++ b/src/main/java/com/subsidy/util/excel/ExcelColumnUtil.java @@ -0,0 +1,22 @@ +package com.subsidy.util.excel; + + +import java.lang.annotation.*; + +/** + *

+ * excel 字段 + *

+ * + * @author DengMin + * @date Created in 2020/08/28 + */ +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ExcelColumnUtil { + + String value() default ""; + + int col() default 0; +} diff --git a/src/main/java/com/subsidy/util/excel/ExcelUtil.java b/src/main/java/com/subsidy/util/excel/ExcelUtil.java new file mode 100644 index 0000000..1c0e358 --- /dev/null +++ b/src/main/java/com/subsidy/util/excel/ExcelUtil.java @@ -0,0 +1,503 @@ +package com.subsidy.util.excel; + +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.CharUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.math.NumberUtils; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.hssf.util.CellRangeAddress; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.xssf.streaming.SXSSFCell; +import org.apache.poi.xssf.streaming.SXSSFRow; +import org.apache.poi.xssf.streaming.SXSSFSheet; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * Excel工具 + * + * @author DengMin + * @date 2019/08/27 13:57 + **/ +@Slf4j +public class ExcelUtil { + + private final static String EXCEL2003 = "xls"; + + private final static String EXCEL2007 = "xlsx"; + + /** + * 导入excel文件 + * + * @param path + * @param cls + * @param file + * @param + * @return + */ + public static List readExcel(String path, Class cls, MultipartFile file) { + String fileName = file.getOriginalFilename(); + if (!fileName.matches("^.+\\.(?i)(xls)$") && !fileName.matches("^.+\\.(?i)(xlsx)$")) { + log.info("上传文件格式不正确"); +// throw new HTTPException(10022); + } + + List dataList = new ArrayList<>(); + Workbook workbook = null; + try { + InputStream is = file.getInputStream(); + if (fileName.endsWith(EXCEL2007)) { + // FileInputStream is = new FileInputStream(new File(path)); + workbook = new XSSFWorkbook(is); + } + + if (fileName.endsWith(EXCEL2003)) { + // FileInputStream is = new FileInputStream(new File(path)); + workbook = new HSSFWorkbook(is); + } + + if (workbook != null) { + Map> classMap = new HashMap<>(); + List fields = Stream.of(cls.getDeclaredFields()).collect(Collectors.toList()); + fields.forEach(field -> { + ExcelColumnUtil annotation = field.getAnnotation(ExcelColumnUtil.class); + if (annotation != null) { + String value = annotation.value(); + if (StringUtils.isBlank(value)) { + return; + } + + if (!classMap.containsKey(value)) { + classMap.put(value, new ArrayList<>()); + } + + field.setAccessible(true); + classMap.get(value).add(field); + } + }); + //索引-->columns + Map> reflectionMap = new HashMap<>(); + //默认读取第一个sheet + Sheet sheet = workbook.getSheetAt(0); + + boolean firstRow = true; + for (int i = 0; i <= sheet.getLastRowNum(); i++) { + Row row = sheet.getRow(i); + //提取标题 + if (firstRow) { + for (int j = 0; j <= row.getLastCellNum(); j++) { + Cell cell = row.getCell(j); + String cellValue = getCellValue(cell); + if (classMap.containsKey(cellValue)) { + reflectionMap.put(j, classMap.get(cellValue)); + } + } + + firstRow = false; + } else { + //忽略空白行 + if (row == null) { + continue; + } + + try { + T t = cls.newInstance(); + //判断是否为空白行 + boolean allBlank = true; + for (int j = 0; j <= row.getLastCellNum(); j++) { + if (reflectionMap.containsKey(j)) { + Cell cell = row.getCell(j); + String cellValue = getCellValue(cell); + if (StringUtils.isNotBlank(cellValue)) { + allBlank = false; + } + List fieldList = reflectionMap.get(j); + fieldList.forEach(x -> { + try { + handleField(t, cellValue, x); + } catch (Exception e) { + e.printStackTrace(); + log.error(String.format("reflect field:%s value:%s exception!", x.getName(), cellValue), e); + } + }); + } + } + + if (!allBlank) { + dataList.add(t); + } + } catch (Exception e) { + e.printStackTrace(); + log.error(String.format("parse row:%s exception!", i), e); + } + } + } + } + } catch (Exception e) { + e.printStackTrace(); + log.error(String.format("parse excel exception!"), e); + } finally { + if (workbook != null) { + try { + workbook.close(); + } catch (Exception e) { + e.printStackTrace(); + log.error(String.format("parse excel exception!"), e); + } + } + } + return dataList; + } + + /** + * 导入excel文件 + * + * @param path + * @param cls + * @param file + * @param + * @return + */ + public static List readExcelWithoutTitle(String path, Class cls, MultipartFile file) { + String fileName = file.getOriginalFilename(); + if (!fileName.matches("^.+\\.(?i)(xls)$") && !fileName.matches("^.+\\.(?i)(xlsx)$")) { + log.info("上传文件格式不正确"); +// throw new HTTPException(10022); + } + + List dataList = new ArrayList<>(); + Workbook workbook = null; + try { + InputStream is = file.getInputStream(); + if (fileName.endsWith(EXCEL2007)) { + // FileInputStream is = new FileInputStream(new File(path)); + workbook = new XSSFWorkbook(is); + } + + if (fileName.endsWith(EXCEL2003)) { + // FileInputStream is = new FileInputStream(new File(path)); + workbook = new HSSFWorkbook(is); + } + + if (workbook != null) { + Map> classMap = new HashMap<>(); + List fields = Stream.of(cls.getDeclaredFields()).collect(Collectors.toList()); + fields.forEach(field -> { + ExcelColumnUtil annotation = field.getAnnotation(ExcelColumnUtil.class); + if (annotation != null) { + String value = annotation.value(); + if (StringUtils.isBlank(value)) { + return; + } + + if (!classMap.containsKey(value)) { + classMap.put(value, new ArrayList<>()); + } + + field.setAccessible(true); + classMap.get(value).add(field); + } + }); + //索引-->columns + Map> reflectionMap = new HashMap<>(); + //默认读取第一个sheet + Sheet sheet = workbook.getSheetAt(0); + + boolean firstRow = true; + for (int i = 1; i <= sheet.getLastRowNum(); i++) { + Row row = sheet.getRow(i); + //提取标题 + if (firstRow) { + for (int j = 0; j <= row.getLastCellNum(); j++) { + Cell cell = row.getCell(j); + String cellValue = getCellValue(cell); + if (classMap.containsKey(cellValue)) { + reflectionMap.put(j, classMap.get(cellValue)); + } + } + + firstRow = false; + } else { + //忽略空白行 + if (row == null) { + continue; + } + + try { + T t = cls.newInstance(); + //判断是否为空白行 + boolean allBlank = true; + for (int j = 0; j <= row.getLastCellNum(); j++) { + if (reflectionMap.containsKey(j)) { + Cell cell = row.getCell(j); + String cellValue = getCellValue(cell); + if (StringUtils.isNotBlank(cellValue)) { + allBlank = false; + } + List fieldList = reflectionMap.get(j); + fieldList.forEach(x -> { + try { + handleField(t, cellValue, x); + } catch (Exception e) { + e.printStackTrace(); + log.error(String.format("reflect field:%s value:%s exception!", x.getName(), cellValue), e); + } + }); + } + } + + if (!allBlank) { + dataList.add(t); + } + } catch (Exception e) { + e.printStackTrace(); + log.error(String.format("parse row:%s exception!", i), e); + } + } + } + } + } catch (Exception e) { + e.printStackTrace(); + log.error(String.format("parse excel exception!"), e); + } finally { + if (workbook != null) { + try { + workbook.close(); + } catch (Exception e) { + e.printStackTrace(); + log.error(String.format("parse excel exception!"), e); + } + } + } + return dataList; + } + + /** + * 导出excel文件 + * + * @param list + * @param cls + * @param + */ + public static void writeExcel(List list, Class cls) { + ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + HttpServletResponse response = servletRequestAttributes.getResponse(); + Field[] fields = cls.getDeclaredFields(); + List fieldList = Arrays.stream(fields).filter(field -> { + ExcelColumn annotation = field.getAnnotation(ExcelColumn.class); + if (annotation != null) { + field.setAccessible(true); + return true; + } + return false; + }).sorted(Comparator.comparing(field -> { + int col = 0; + ExcelColumn annotation = field.getAnnotation(ExcelColumn.class); + if (annotation != null) { + col = annotation.col(); + } + return col; + })).collect(Collectors.toList()); + + Workbook wb = new XSSFWorkbook(); + Sheet sheet = wb.createSheet(); + AtomicInteger ai = new AtomicInteger(); + { + Row row = sheet.createRow(ai.getAndIncrement()); + AtomicInteger at = new AtomicInteger(); + fieldList.forEach(field -> { + ExcelColumn annotation = field.getAnnotation(ExcelColumn.class); + String columnName = ""; + if (annotation != null) { + columnName = annotation.value(); + } + Cell cell = row.createCell(at.getAndIncrement()); + CellStyle cellStyle = wb.createCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); + Font font = wb.createFont(); + font.setBoldweight(Font.BOLDWEIGHT_BOLD); + cellStyle.setFont(font); + cell.setCellStyle(cellStyle); + cell.setCellValue(columnName); + }); + + if (list != null) { + list.forEach(data -> { + Row r = sheet.createRow(ai.getAndIncrement()); + AtomicInteger a = new AtomicInteger(); + fieldList.forEach(field -> { + try { + Class type = field.getType(); + Object value = field.get(data); + Cell cell = r.createCell(a.getAndIncrement()); + if (value != null) { + cell.setCellValue(value.toString()); + } + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + }); + }); + for (int i = 0; i < list.size(); i++) { + sheet.autoSizeColumn(i); + } + } + String fileName = String.valueOf(new Date().getTime()); + buildExcelDocument(fileName + "." + EXCEL2007, wb, response); + } + } + + private static void setStyle(CellStyle cellStyle) { + // 水平居中 + cellStyle.setAlignment(CellStyle.ALIGN_CENTER); + // 垂直居中 + cellStyle.setVerticalAlignment(CellStyle.ALIGN_CENTER); + // 边框 + cellStyle.setBorderTop(CellStyle.BORDER_THIN); + // 边框 + cellStyle.setBorderLeft(CellStyle.BORDER_THIN); + // 边框 + cellStyle.setBorderRight(CellStyle.BORDER_THIN); + // 边框 + cellStyle.setBorderBottom(CellStyle.BORDER_THIN); + } + + //也可用以下方法 + public static void setBorderStyle(int border, CellRangeAddress region, SXSSFSheet sheet, SXSSFWorkbook wb) { + CellStyle cs = wb.createCellStyle(); // 样式对象 + cs.setBorderBottom((short) border); + cs.setBorderTop((short) border); + cs.setBorderLeft((short) border); + cs.setBorderRight((short) border); + + setRegionStyle(cs, region, sheet); + } + + private static void setRegionStyle(CellStyle cs, CellRangeAddress region, SXSSFSheet sheet) { + for (int i = region.getFirstRow(); i <= region.getLastRow(); i++) { + SXSSFRow row = sheet.getRow(i); + if (row == null) { + row = sheet.createRow(i); + } + for (int j = region.getFirstColumn(); j <= region.getLastColumn(); j++) { + SXSSFCell cell = row.getCell(j); + if (cell == null) { + cell = row.createCell(j); + cell.setCellValue(""); + } + cell.setCellStyle(cs); + } + } + } + + + private static void handleField(T t, String value, Field field) throws Exception { + Class type = field.getType(); + if (type == null || type == void.class || StringUtils.isBlank(value)) { + return; + } + if (type == Object.class) { + field.set(t, value); + //数字类型 + } else if (type.getSuperclass() == null || type.getSuperclass() == Number.class) { + if (type == int.class || type == Integer.class) { + field.set(t, NumberUtils.toInt(value)); + } else if (type == long.class || type == Long.class) { + field.set(t, NumberUtils.toLong(value)); + } else if (type == byte.class || type == Byte.class) { + field.set(t, NumberUtils.toByte(value)); + } else if (type == short.class || type == Short.class) { + field.set(t, NumberUtils.toShort(value)); + } else if (type == double.class || type == Double.class) { + field.set(t, NumberUtils.toDouble(value)); + } else if (type == float.class || type == Float.class) { + field.set(t, NumberUtils.toFloat(value)); + } else if (type == char.class || type == Character.class) { + field.set(t, CharUtils.toChar(value)); + } else if (type == boolean.class) { + field.set(t, BooleanUtils.toBoolean(value)); + } else if (type == BigDecimal.class) { + field.set(t, new BigDecimal(value)); + } + } else if (type == Boolean.class) { + field.set(t, BooleanUtils.toBoolean(value)); + } else if (type == Date.class) { + // + field.set(t, value); + } else if (type == String.class) { + field.set(t, value); + } else { + Constructor constructor = type.getConstructor(String.class); + field.set(t, constructor.newInstance(value)); + } + } + + private static String getCellValue(Cell cell) { + if (cell == null) { + return ""; + } + + if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) { + if (DateUtil.isCellDateFormatted(cell)) { + return HSSFDateUtil.getJavaDate(cell.getNumericCellValue()).toString(); + } else { + return new BigDecimal(cell.getNumericCellValue()).toString(); + } + } else if (cell.getCellType() == Cell.CELL_TYPE_STRING) { + return StringUtils.trimToEmpty(cell.getStringCellValue()); + } else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) { + return StringUtils.trimToEmpty(cell.getCellFormula()); + } else if (cell.getCellType() == Cell.CELL_TYPE_BLANK) { + return ""; + } else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) { + return String.valueOf(cell.getBooleanCellValue()); + } else if (cell.getCellType() == Cell.CELL_TYPE_ERROR) { + return "ERROR"; + } else { + return cell.toString().trim(); + } + } + + private static void buildExcelDocument(String fileName, Workbook wb, HttpServletResponse response) { + try { + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "utf-8")); + response.flushBuffer(); + wb.write(response.getOutputStream()); + } catch (IOException e) { + log.error(String.format("downLoad excel exception"), e); + } + } + + private static void buildExcelFile(String path, Workbook wb) { + File file = new File(path); + if (file.exists()) { + file.delete(); + } + + try { + wb.write(new FileOutputStream(file)); + } catch (Exception e) { + log.error(String.format("downLoad excel exception"), e); + } + } +} diff --git a/src/main/java/com/subsidy/util/tree/Node.java b/src/main/java/com/subsidy/util/tree/Node.java new file mode 100644 index 0000000..bf53d6e --- /dev/null +++ b/src/main/java/com/subsidy/util/tree/Node.java @@ -0,0 +1,42 @@ +package com.subsidy.util.tree; + +import lombok.Data; + +@Data +public class Node implements Comparable { + + //主键 + private String id; + + //同级节点第几个元素 + private String number; + + //1.1 + private String text; + + //父节点 + private String parentId; + + private int level; + + public Node(String id, String number, String parentId, int level) { + this.id = id; + this.number = number; + this.parentId = parentId; + this.level = level; + } + + @Override + public int compareTo(Node o) { + if (this.level != o.level) { + return o.level - this.level; + } else { + if(this.number==null){ + return -1; + } + return this.number.compareTo(o.number); + } + } + + +} diff --git a/src/main/java/com/subsidy/util/tree/NumberTree.java b/src/main/java/com/subsidy/util/tree/NumberTree.java new file mode 100644 index 0000000..d051a9f --- /dev/null +++ b/src/main/java/com/subsidy/util/tree/NumberTree.java @@ -0,0 +1,212 @@ +package com.subsidy.util.tree; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class NumberTree { + + private String id; + + private List nodeList; + + private String separator; + + private int idSeq; + + private SerialNumber number; + + public NumberTree(String separator, SerialNumber number) { + init(); + this.separator = separator; + this.number = number; + + } + + public void init() { + idSeq = 1; + this.separator = "."; + if (this.nodeList == null) { + nodeList = new ArrayList(); + } + } + + + /** + *

功能描述:根据父节点获取所有子节点。

+ */ + public List getChildNodes(Node pNode) { + String pId = pNode.getId(); + return getChildNodes(pId); + } + + /** + *

功能描述:根据父节点获取所有子节点。

+ */ + public List getChildNodes(String pId) { + List childNodes = new ArrayList(); + for (Node n : nodeList) { + if (pId.equals(n.getParentId())) { + childNodes.add(n); + } + } + + return childNodes; + } + + /** + *

功能描述:获取本级值最大的节点。

+ */ + public Node getMaxNodeForThisLevel(Node pNode) { + List childList = getChildNodes(pNode); + Node root = getRoot(nodeList); + if (childList.size() <= 0) { + return null; + } + Node maxNode = root; + for (Node node : childList) { + if (maxNode.getNumber().compareTo(node.getNumber()) < 0) { + maxNode = node; + } + } + return maxNode; + } + + /** + *

功能描述:生成下一个子节点。

+ */ + public Node generateNextChildNode(Node node) { + Node newNode = null; + Node maxNode = getMaxNodeForThisLevel(node); + String nextNumber = number.firstNumber(); + int level = node.getLevel(); + if (maxNode != null && !"0".equals(maxNode.getId())) {//本级存在子节点,且非根节点 + nextNumber = number.produceNext(maxNode.getNumber()); + level = maxNode.getLevel(); + } + newNode = new Node(String.valueOf(++idSeq), nextNumber, node.getId(), level); + + generateNodeText(newNode, nextNumber); + + return newNode; + } + + + /** + * + *

功能描述:获取父节点。

+ */ + public Node getParentNode(Node node) { + for (Node n : nodeList) { + if (node.getParentId() == n.getId()) { + return n; + } + } + return node; + } + + /** + *

功能描述:生成节点路径。

+ */ + public void generateNodeText(Node node, String text) { + + if (node == null || "0".equals(node.getId())) { + return; + } + + Node pNode = getParentNode(node); + + if (!"0".equals(pNode.getId())) { + text = pNode.getText() + separator + text; + } + + node.setText(text); + } + + /** + *

功能描述:遍历所有树节点。

+ */ + public void traverseNodeList(Node node) { + if(node==null){ + node = getRoot(nodeList); + } + List childNodes = getChildNodes(node); + System.out.println(node.getText()); + if (childNodes.size() > 0) { + for (Node n : childNodes) { + traverseNodeList(n); + } + } + } + public static void main(String[] args) { + SerialNumber number = new SerialNumber(); + NumberTree treeNode = new NumberTree(".", number); + + addSomeNodes(treeNode); + treeNode.traverseNodeList(null); + } + + /** + *

功能描述:获取根节点。

+ */ + public Node getRoot(List nodeList) { + Node root = null; + if (nodeList.size() <= 0 || (root = getNodeById(nodeList, "0")) == null) { + root = createRoot(); + nodeList.add(root); + } + return root; + } + + private Node getNodeById(List nodeList, String id) { + Node node = null; + if(id!=null){ + for (Node n : nodeList) { + if (id.equals(n.getId())) { + node = n; + break; + } + } + } + return node; + } + + private Node createRoot() { + Node root = new Node("0", number.rootNumber(), "-1", 0); + root.setText("0"); + return root; + } + + /** + *

功能描述:测试添加节点。

+ */ + private static Node addSomeNodes(NumberTree tree) { + Node root = tree.getRoot(tree.nodeList); + Node node1 = getNextNode(tree, root);//1 + Node node2 = getNextNode(tree, root);//2 + Node node3 = getNextNode(tree, root);//3 + Node node11 = getNextNode(tree, node1);//1.1 + Node node12 = getNextNode(tree, node1);//1.2 + Node node21 = getNextNode(tree, node2);//2.1 + Node node211 = getNextNode(tree, node21);//2.1.1 + Node node212 = getNextNode(tree, node21);//2.1.2 + Node node22 = getNextNode(tree, node2);//2.2 + Node node221 = getNextNode(tree, node22);//2.2.1 + Node node31 = getNextNode(tree, node3); + Node node32 = getNextNode(tree, node3); + Node node311 = getNextNode(tree, node31); + Node node3111 = getNextNode(tree, node311); + return root; + } + + public static Node getNextNode(NumberTree tree, Node pNode) { + Node node = tree.generateNextChildNode(pNode); + if (node != null) { + tree.nodeList.add(node); + } + return node; + } + +} diff --git a/src/main/java/com/subsidy/util/tree/SerialNumber.java b/src/main/java/com/subsidy/util/tree/SerialNumber.java new file mode 100644 index 0000000..02a5e31 --- /dev/null +++ b/src/main/java/com/subsidy/util/tree/SerialNumber.java @@ -0,0 +1,28 @@ +package com.subsidy.util.tree; + +public class SerialNumber{ + + public String produceNext(String crrnt) { + + String next = "0"; + if (crrnt != null) { + try { + int crrntNum = Integer.parseInt(crrnt); + next = String.valueOf(crrntNum + 1); + } catch (Exception e) { + System.err.println("非数字类型的字符串!"); + } + } + return next; + } + + public String rootNumber() { + return "0"; + } + + public String firstNumber() { + return "1"; + } + + +} diff --git a/src/main/java/com/subsidy/vo/administer/UserRoleVO.java b/src/main/java/com/subsidy/vo/administer/UserRoleVO.java new file mode 100644 index 0000000..c3a2110 --- /dev/null +++ b/src/main/java/com/subsidy/vo/administer/UserRoleVO.java @@ -0,0 +1,36 @@ +package com.subsidy.vo.administer; + +import lombok.Data; + +@Data +public class UserRoleVO { + + private Long id; + + private String telephone; + + private String userName; + + private String accountName; + + private String image; + + private String status; + + private Integer firstLogin; + + private String companyName; + + private Boolean qxyStatus; + + private Long companyId; + + private String logo; + +// private List rotationImgDictDOS; + + private String token; + + private String superviseName; + +} diff --git a/src/main/java/com/subsidy/vo/labor/BankInfoVO.java b/src/main/java/com/subsidy/vo/labor/BankInfoVO.java new file mode 100644 index 0000000..66f2e5a --- /dev/null +++ b/src/main/java/com/subsidy/vo/labor/BankInfoVO.java @@ -0,0 +1,16 @@ +package com.subsidy.vo.labor; + +import lombok.Data; + +@Data +public class BankInfoVO { + + private Long id; + + private String userName; + + private String bank; + + private String payrollAccount; + +} diff --git a/src/main/java/com/subsidy/vo/labor/CurrentProjectVO.java b/src/main/java/com/subsidy/vo/labor/CurrentProjectVO.java new file mode 100644 index 0000000..5e715e6 --- /dev/null +++ b/src/main/java/com/subsidy/vo/labor/CurrentProjectVO.java @@ -0,0 +1,16 @@ +package com.subsidy.vo.labor; + +import lombok.Data; + +@Data +public class CurrentProjectVO { + + private Long id; + + private Long companyId; + + private String companyName; + + private String jobName; + +} diff --git a/src/main/java/com/subsidy/vo/labor/HistoryProjectsVO.java b/src/main/java/com/subsidy/vo/labor/HistoryProjectsVO.java new file mode 100644 index 0000000..f734934 --- /dev/null +++ b/src/main/java/com/subsidy/vo/labor/HistoryProjectsVO.java @@ -0,0 +1,20 @@ +package com.subsidy.vo.labor; + +import lombok.Data; + +@Data +public class HistoryProjectsVO { + + private Long id; + + private String companyName; + + private String jobName; + + private String startDate; + + private String salaryDate; + + private String laborServiceName; + +} diff --git a/src/main/java/com/subsidy/vo/labor/IdCardInfoVO.java b/src/main/java/com/subsidy/vo/labor/IdCardInfoVO.java new file mode 100644 index 0000000..ce10ea8 --- /dev/null +++ b/src/main/java/com/subsidy/vo/labor/IdCardInfoVO.java @@ -0,0 +1,14 @@ +package com.subsidy.vo.labor; + +import lombok.Data; + +@Data +public class IdCardInfoVO { + + private Long id; + + private String userName; + + private String idCard; + +} diff --git a/src/main/java/com/subsidy/vo/labor/LoginVO.java b/src/main/java/com/subsidy/vo/labor/LoginVO.java new file mode 100644 index 0000000..0996cc6 --- /dev/null +++ b/src/main/java/com/subsidy/vo/labor/LoginVO.java @@ -0,0 +1,57 @@ +package com.subsidy.vo.labor; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +@Data +public class LoginVO { + + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 公司名称 + */ + private Long companyId; + + /** + * 账号 + */ + private String accountName; + + /** + * 手机号/企业账号 + */ + private String telephone; + + /** + * 成员名称 + */ + private String userName; + + /** + * 头像 + */ + private String img; + + /** + * 1:启用 0:禁用 + */ + private String status; + + /** + * role 0:平台运营者 1:超级管理员 2:普通成员 + */ + private Integer role; + + /** + * 备注 + */ + private String remark; + +} diff --git a/src/main/java/com/subsidy/vo/labor/SalaryListSumVO.java b/src/main/java/com/subsidy/vo/labor/SalaryListSumVO.java new file mode 100644 index 0000000..43105f1 --- /dev/null +++ b/src/main/java/com/subsidy/vo/labor/SalaryListSumVO.java @@ -0,0 +1,12 @@ +package com.subsidy.vo.labor; + +import lombok.Data; + +@Data +public class SalaryListSumVO { + + private Integer cnt; + + private String salary; + +} diff --git a/src/main/java/com/subsidy/vo/labor/SalaryListVO.java b/src/main/java/com/subsidy/vo/labor/SalaryListVO.java new file mode 100644 index 0000000..f349fc2 --- /dev/null +++ b/src/main/java/com/subsidy/vo/labor/SalaryListVO.java @@ -0,0 +1,21 @@ +package com.subsidy.vo.labor; + +import lombok.Data; + +@Data +public class SalaryListVO { + + private Long id; + + private String bank; + + private String salary; + + private String salaryMark; + + private String createDate; + + private String payrollAccount; + + +} diff --git a/src/main/java/com/subsidy/vo/oss/GetSecretVO.java b/src/main/java/com/subsidy/vo/oss/GetSecretVO.java new file mode 100644 index 0000000..f47d06e --- /dev/null +++ b/src/main/java/com/subsidy/vo/oss/GetSecretVO.java @@ -0,0 +1,12 @@ +package com.subsidy.vo.oss; + +import lombok.Data; + +@Data +public class GetSecretVO { + + private String key; + + private String secret; + +} diff --git a/src/main/java/com/subsidy/vo/oss/UploadFileVO.java b/src/main/java/com/subsidy/vo/oss/UploadFileVO.java new file mode 100644 index 0000000..28cb3fa --- /dev/null +++ b/src/main/java/com/subsidy/vo/oss/UploadFileVO.java @@ -0,0 +1,10 @@ +package com.subsidy.vo.oss; + +import lombok.Data; + +@Data +public class UploadFileVO { + + private String url; + +} diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties new file mode 100644 index 0000000..5142509 --- /dev/null +++ b/src/main/resources/application-dev.properties @@ -0,0 +1,69 @@ +# 本地环境配置 +spring.server.port=23507 + +# 数据源配置 +#spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +##spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +#spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +##spring.datasource.username=ykadmin_new +##spring.datasource.password=youkedb608@good +#spring.datasource.username=devloper +#spring.datasource.password=dev@1553$ + +# 数据源配置 +spring.datasource.url=jdbc:mysql://139.224.253.21:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.username=root +spring.datasource.password=ykhladmin302 + +spring.datasource.druid.initialSize=5 +spring.datasource.druid.minIdle=5 +spring.datasource.druid.maxActive=200 +spring.datasource.druid.maxWait=60000 +spring.datasource.druid.timeBetweenEvictionRunsMillis=60000 +spring.datasource.druid.minEvictableIdleTimeMillis=300000 +spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL +spring.datasource.druid.testWhileIdle=true +spring.datasource.druid.testOnBorrow=false +spring.datasource.druid.testOnReturn=false +spring.datasource.druid.poolPreparedStatements=true +spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20 +spring.datasource.druid.useGlobalDataSourceStat=true + +# 控制台日志打印 +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl + +#spring.redis.host=r-uf6meywj6ysuehg148pd.redis.rds.aliyuncs.com +#spring.redis.password=r-uf6meywj6ysuehg148:Ykhl@208 +#spring.redis.port=6379 +#spring.redis.lettuce.pool.max-idle=16 +#spring.redis.lettuce.pool.max-active=32 +#spring.redis.lettuce.pool.min-idle=8 + +#spring.application.name=spring-boot-mongodb +## mongodb +##spring.data.mongodb.uri=mongodb://47.97.19.66:27017/subsidy +#spring.data.mongodb.username=root +#spring.data.mongodb.password=123456 +##spring.data.mongodb.authentication-database=subsidy +#spring.data.mongodb.database=subsidy +#spring.data.mongodb.host=47.97.19.66 +#spring.data.mongodb.port=27017 + +spring.redis.host=47.97.19.66 +spring.redis.password=Ykhl@208 +spring.redis.port=6389 +spring.redis.lettuce.pool.max-idle=16 +spring.redis.lettuce.pool.max-active=32 +spring.redis.lettuce.pool.min-idle=8 + +qxueyou.appId=qxywz5nnWMI77CM3Tx +qxueyou.securityKey=626737T1-65K0-5xC2-0Y0V-2Aq95qxy +qxueyou.url=https://dev.qxueyou.com/auth/user/token + +renshe.url = https://test.shzypxy.com +renshe.secretKey = ad927f0b-6a39-43a7-bac7-163baef1fff7 +renshe.putuo = http://180.167.195.117:18015/ddproject + diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties new file mode 100644 index 0000000..214c8e0 --- /dev/null +++ b/src/main/resources/application-prod.properties @@ -0,0 +1,53 @@ +# 生产环境配置 +spring.server.port=23507 + +# 数据源配置 +spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.username=ykadmin_new +spring.datasource.password=youkedb608@good + +spring.datasource.druid.initialSize=5 +spring.datasource.druid.minIdle=5 +spring.datasource.druid.maxActive=20 +spring.datasource.druid.maxWait=60000 +spring.datasource.druid.timeBetweenEvictionRunsMillis=60000 +spring.datasource.druid.minEvictableIdleTimeMillis=300000 +spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL +spring.datasource.druid.testWhileIdle=true +spring.datasource.druid.testOnBorrow=false +spring.datasource.druid.testOnReturn=false +spring.datasource.druid.poolPreparedStatements=true +spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20 +spring.datasource.druid.useGlobalDataSourceStat=true +spring.datasource.druid.kill-when-socket-read-timeout=true +# 控制台日志打印 +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl + +#wechat.appId= wx7785293ff5e31f14 +#wechat.appSecret= 25d57cad61fc1b45b3afa46d4c35e8f6 +#wechat.msgUrl= https://teachai.youkehulian.com/login +#wechat.templateId= Z1HNPLOrKiHEjfR1KMP-cC-uH3BWqDJIHv365Ev20yQ + +#spring.redis.cluster.nodes=47.97.19.66:6377,47.97.19.66:6378,47.97.16.66:6379 +#spring.redis.password=Ykhl@208 +#spring.redis.lettuce.pool.max-idle=16 +#spring.redis.lettuce.pool.max-active=32 +#spring.redis.lettuce.pool.min-idle=8 + +spring.redis.host=sh-crs-hq5xbrsq.sql.tencentcdb.com +spring.redis.password=Ykhl@302 +spring.redis.port=20260 +spring.redis.lettuce.pool.max-idle=16 +spring.redis.lettuce.pool.max-active=32 +spring.redis.lettuce.pool.min-idle=8 + +qxueyou.appId=qxy1a2n6h16012nJ6x +qxueyou.securityKey=44420Tlu-P463-9041-2h1q-29Z59qxy +qxueyou.url=https://www.qxueyou.com/auth/user/token + +renshe.url = https://api.shzypxy.com +#renshe.url = http://trial.shzypxy.com/api +renshe.secretKey = ad927f0b-6a39-43a7-bac7-163baef1fff7 +renshe.putuo = http://180.167.195.117:18025/ddproject \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties new file mode 100644 index 0000000..4e554b7 --- /dev/null +++ b/src/main/resources/application.properties @@ -0,0 +1,84 @@ +# 环境配置 顶岗实习 +spring.profiles.active=dev +#和CPU数 +spring.server.acceptorThreadCount=600 +spring.server.minSpareThreads=100 +spring.server.maxSpareThreads=500 +spring.server.maxThreads=500 +spring.server.maxConnections=1000 +#10秒超时 +spring.server.connectionTimeout=20000 +spring.server.protocol=org.apache.coyote.http11.Http11AprProtocol +spring.server.redirectPort=8443 +spring.server.compression=on +#文件请求大小 +spring.server.MaxFileSize=300MB +spring.server.MaxRequestSize=500MB +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=50MB +# 文件编码 UTF8 +spring.mandatory-file-encoding=UTF-8 +spring.jackson.time-zone=GMT+8 +# 404 交给异常处理器处理 +spring.mvc.throw-exception-if-no-handler-found=true +# 关闭静态资源的映射 +spring.resources.add-mappings=false +# 关闭banner打印 +mybatis-plus.global-config.banner=false +# mybatis-plus相关配置 +mybatis-plus.mapper-locations=classpath:mapper/*.xml +# 是否开启自动驼峰命名规则映射 +mybatis-plus.configuration.map-underscore-to-camel-case=true +# 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段 +mybatis-plus.configuration.call-setters-on-nulls=true +# 逻辑删除 +mybatis-plus.global-config.db-config.logic-delete-value=NOW() +mybatis-plus.global-config.db-config.logic-not-delete-value=NULL +#日志配置 +logging.config=classpath:logback-spring.xml +#ehcache缓存配置 +spring.cache.type=ehcache +spring.cache.ehcache.config=classpath:ehcache.xml +# 阿里云短信 +sms.product=Dysmsapi +sms.domain=dysmsapi.aliyuncs.com +sms.accessKeyId=LTAI5tPAH7P7WQVeowo517BE +sms.accessKeySecret=0ueqhIfdAZyw5lWlBVSLpAxTtx37RY +#wechat.app-id=wx7785293ff5e31f14 +#wechat.app-secret=25d57cad61fc1b45b3afa46d4c35e8f6 +#wechat.agentId=1000008 +vod.appId=1302252447 +vod.secretId=AKIDOcePHvZ2C5VeYHQGSO5aqtlNxJQLqfz2 +vod.secretKey=vjHYRmrfDbw0rWxA7oFcj7F8lDPKCm8E +vod.api=vod.tencentcloudapi.com +vod.region=ap-shanghai +vod.classId=848920 +# quartz +# 数据持久化方式 +spring.quartz.job-store-type=jdbc +# 初始化后是否自动启动计划程序 +spring.quartz.auto-startup=true +# 初始化完成后启动计划程序的延迟时间 +spring.quartz.startup-delay=10s +# 配置的作业是否应覆盖现有的作业定义 +spring.quartz.overwrite-existing-jobs=false +# 自动建表,如果已经存在表请勿使用,会覆盖数据表 +#spring.quartz.jdbc.initialize-schema=always +#spring.datasource.initialization-mode=embedded +#spring.redis.host=r-uf6m4cpkjrgpzywjm3pd.redis.rds.aliyuncs.com +#spring.redis.port=6379 +#spring.redis.password=r-uf6m4cpkjrgpzywjm3:Ykhl@208 +wechat= +#pro +appId=wx5e1ecb9c9bd33451 +appSecret=4f5e1abb6fb4f68f5273820b6295ec6b + +#保利威视 +polyv.userId=b8f2d3bfdc +polyv.appId=g3lrxnzd75 +polyv.appSecret=ef9cdcbbb9184b61aca301ba8114d570 +polyv.secretKey=03sqxr97fo + +subsidy.appId=qxywz5nnWMI7ABCS +subsidy.securityKey=626737T1-65K0-5xC2-0Y0V-2Aq9QUAJ +subsidy.url=http://subsidy.youkehulian.cn/auth/user/token \ No newline at end of file diff --git a/src/main/resources/mapper/AdministerMapper.xml b/src/main/resources/mapper/AdministerMapper.xml new file mode 100644 index 0000000..0ce8477 --- /dev/null +++ b/src/main/resources/mapper/AdministerMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, telephone, account_name, password, company_id, user_name, img, status, role, remark + + + diff --git a/src/main/resources/mapper/ProjectMemberMappingMapper.xml b/src/main/resources/mapper/ProjectMemberMappingMapper.xml new file mode 100644 index 0000000..a0ad3ca --- /dev/null +++ b/src/main/resources/mapper/ProjectMemberMappingMapper.xml @@ -0,0 +1,45 @@ + + + + + + + + + diff --git a/src/main/resources/mapper/ProjectSalaryHistoryMapper.xml b/src/main/resources/mapper/ProjectSalaryHistoryMapper.xml new file mode 100644 index 0000000..fb49b49 --- /dev/null +++ b/src/main/resources/mapper/ProjectSalaryHistoryMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + diff --git a/src/main/resources/mapper/SmsVerifyCodeMapper.xml b/src/main/resources/mapper/SmsVerifyCodeMapper.xml new file mode 100644 index 0000000..76cd02e --- /dev/null +++ b/src/main/resources/mapper/SmsVerifyCodeMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/target/classes/META-INF/spring-configuration-metadata.json b/target/classes/META-INF/spring-configuration-metadata.json new file mode 100644 index 0000000..c5f8850 --- /dev/null +++ b/target/classes/META-INF/spring-configuration-metadata.json @@ -0,0 +1,177 @@ +{ + "groups": [ + { + "name": "meishu", + "type": "com.subsidy.common.configure.RemoteProperties", + "sourceType": "com.subsidy.common.configure.RemoteProperties" + }, + { + "name": "polyv", + "type": "com.subsidy.common.configure.PolyvConfig", + "sourceType": "com.subsidy.common.configure.PolyvConfig" + }, + { + "name": "qxueyou", + "type": "com.subsidy.common.configure.QXueYouConfig", + "sourceType": "com.subsidy.common.configure.QXueYouConfig" + }, + { + "name": "renshe", + "type": "com.subsidy.common.configure.RenSheConfig", + "sourceType": "com.subsidy.common.configure.RenSheConfig" + }, + { + "name": "sms", + "type": "com.subsidy.common.configure.AliyunSmsProperties", + "sourceType": "com.subsidy.common.configure.AliyunSmsProperties" + }, + { + "name": "subsidy", + "type": "com.subsidy.common.configure.SubsidyConfig", + "sourceType": "com.subsidy.common.configure.SubsidyConfig" + }, + { + "name": "vod", + "type": "com.subsidy.common.configure.VODConfig", + "sourceType": "com.subsidy.common.configure.VODConfig" + }, + { + "name": "wechat", + "type": "com.subsidy.common.configure.WechatConfig", + "sourceType": "com.subsidy.common.configure.WechatConfig" + } + ], + "properties": [ + { + "name": "meishu.code-message", + "type": "java.util.Map", + "sourceType": "com.subsidy.common.configure.RemoteProperties" + }, + { + "name": "polyv.app-id", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.PolyvConfig" + }, + { + "name": "polyv.app-secret", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.PolyvConfig" + }, + { + "name": "polyv.secret-key", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.PolyvConfig" + }, + { + "name": "polyv.user-id", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.PolyvConfig" + }, + { + "name": "qxueyou.app-id", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.QXueYouConfig" + }, + { + "name": "qxueyou.security-key", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.QXueYouConfig" + }, + { + "name": "qxueyou.url", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.QXueYouConfig" + }, + { + "name": "renshe.putuo", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.RenSheConfig" + }, + { + "name": "renshe.secret-key", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.RenSheConfig" + }, + { + "name": "renshe.url", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.RenSheConfig" + }, + { + "name": "sms.access-key-id", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.AliyunSmsProperties" + }, + { + "name": "sms.access-key-secret", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.AliyunSmsProperties" + }, + { + "name": "sms.domain", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.AliyunSmsProperties" + }, + { + "name": "sms.product", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.AliyunSmsProperties" + }, + { + "name": "subsidy.app-id", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.SubsidyConfig" + }, + { + "name": "subsidy.security-key", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.SubsidyConfig" + }, + { + "name": "subsidy.url", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.SubsidyConfig" + }, + { + "name": "vod.api", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.VODConfig" + }, + { + "name": "vod.app-id", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.VODConfig" + }, + { + "name": "vod.class-id", + "type": "java.lang.Integer", + "sourceType": "com.subsidy.common.configure.VODConfig" + }, + { + "name": "vod.region", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.VODConfig" + }, + { + "name": "vod.secret-id", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.VODConfig" + }, + { + "name": "vod.secret-key", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.VODConfig" + }, + { + "name": "wechat.app-id", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.WechatConfig" + }, + { + "name": "wechat.app-secret", + "type": "java.lang.String", + "sourceType": "com.subsidy.common.configure.WechatConfig" + } + ], + "hints": [] +} \ No newline at end of file diff --git a/target/classes/application-dev.properties b/target/classes/application-dev.properties new file mode 100644 index 0000000..5142509 --- /dev/null +++ b/target/classes/application-dev.properties @@ -0,0 +1,69 @@ +# 本地环境配置 +spring.server.port=23507 + +# 数据源配置 +#spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +##spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +#spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +##spring.datasource.username=ykadmin_new +##spring.datasource.password=youkedb608@good +#spring.datasource.username=devloper +#spring.datasource.password=dev@1553$ + +# 数据源配置 +spring.datasource.url=jdbc:mysql://139.224.253.21:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.username=root +spring.datasource.password=ykhladmin302 + +spring.datasource.druid.initialSize=5 +spring.datasource.druid.minIdle=5 +spring.datasource.druid.maxActive=200 +spring.datasource.druid.maxWait=60000 +spring.datasource.druid.timeBetweenEvictionRunsMillis=60000 +spring.datasource.druid.minEvictableIdleTimeMillis=300000 +spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL +spring.datasource.druid.testWhileIdle=true +spring.datasource.druid.testOnBorrow=false +spring.datasource.druid.testOnReturn=false +spring.datasource.druid.poolPreparedStatements=true +spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20 +spring.datasource.druid.useGlobalDataSourceStat=true + +# 控制台日志打印 +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl + +#spring.redis.host=r-uf6meywj6ysuehg148pd.redis.rds.aliyuncs.com +#spring.redis.password=r-uf6meywj6ysuehg148:Ykhl@208 +#spring.redis.port=6379 +#spring.redis.lettuce.pool.max-idle=16 +#spring.redis.lettuce.pool.max-active=32 +#spring.redis.lettuce.pool.min-idle=8 + +#spring.application.name=spring-boot-mongodb +## mongodb +##spring.data.mongodb.uri=mongodb://47.97.19.66:27017/subsidy +#spring.data.mongodb.username=root +#spring.data.mongodb.password=123456 +##spring.data.mongodb.authentication-database=subsidy +#spring.data.mongodb.database=subsidy +#spring.data.mongodb.host=47.97.19.66 +#spring.data.mongodb.port=27017 + +spring.redis.host=47.97.19.66 +spring.redis.password=Ykhl@208 +spring.redis.port=6389 +spring.redis.lettuce.pool.max-idle=16 +spring.redis.lettuce.pool.max-active=32 +spring.redis.lettuce.pool.min-idle=8 + +qxueyou.appId=qxywz5nnWMI77CM3Tx +qxueyou.securityKey=626737T1-65K0-5xC2-0Y0V-2Aq95qxy +qxueyou.url=https://dev.qxueyou.com/auth/user/token + +renshe.url = https://test.shzypxy.com +renshe.secretKey = ad927f0b-6a39-43a7-bac7-163baef1fff7 +renshe.putuo = http://180.167.195.117:18015/ddproject + diff --git a/target/classes/application-prod.properties b/target/classes/application-prod.properties new file mode 100644 index 0000000..214c8e0 --- /dev/null +++ b/target/classes/application-prod.properties @@ -0,0 +1,53 @@ +# 生产环境配置 +spring.server.port=23507 + +# 数据源配置 +spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.username=ykadmin_new +spring.datasource.password=youkedb608@good + +spring.datasource.druid.initialSize=5 +spring.datasource.druid.minIdle=5 +spring.datasource.druid.maxActive=20 +spring.datasource.druid.maxWait=60000 +spring.datasource.druid.timeBetweenEvictionRunsMillis=60000 +spring.datasource.druid.minEvictableIdleTimeMillis=300000 +spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL +spring.datasource.druid.testWhileIdle=true +spring.datasource.druid.testOnBorrow=false +spring.datasource.druid.testOnReturn=false +spring.datasource.druid.poolPreparedStatements=true +spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20 +spring.datasource.druid.useGlobalDataSourceStat=true +spring.datasource.druid.kill-when-socket-read-timeout=true +# 控制台日志打印 +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl + +#wechat.appId= wx7785293ff5e31f14 +#wechat.appSecret= 25d57cad61fc1b45b3afa46d4c35e8f6 +#wechat.msgUrl= https://teachai.youkehulian.com/login +#wechat.templateId= Z1HNPLOrKiHEjfR1KMP-cC-uH3BWqDJIHv365Ev20yQ + +#spring.redis.cluster.nodes=47.97.19.66:6377,47.97.19.66:6378,47.97.16.66:6379 +#spring.redis.password=Ykhl@208 +#spring.redis.lettuce.pool.max-idle=16 +#spring.redis.lettuce.pool.max-active=32 +#spring.redis.lettuce.pool.min-idle=8 + +spring.redis.host=sh-crs-hq5xbrsq.sql.tencentcdb.com +spring.redis.password=Ykhl@302 +spring.redis.port=20260 +spring.redis.lettuce.pool.max-idle=16 +spring.redis.lettuce.pool.max-active=32 +spring.redis.lettuce.pool.min-idle=8 + +qxueyou.appId=qxy1a2n6h16012nJ6x +qxueyou.securityKey=44420Tlu-P463-9041-2h1q-29Z59qxy +qxueyou.url=https://www.qxueyou.com/auth/user/token + +renshe.url = https://api.shzypxy.com +#renshe.url = http://trial.shzypxy.com/api +renshe.secretKey = ad927f0b-6a39-43a7-bac7-163baef1fff7 +renshe.putuo = http://180.167.195.117:18025/ddproject \ No newline at end of file diff --git a/target/classes/application-quartz.properties b/target/classes/application-quartz.properties new file mode 100644 index 0000000..0d1f6b6 --- /dev/null +++ b/target/classes/application-quartz.properties @@ -0,0 +1,7 @@ +spring.quartz.properties.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX +spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate +spring.quartz.properties.org.quartz.jobStore.tablePrefix=QRTZ_ +spring.quartz.properties.org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool +spring.quartz.properties.org.quartz.threadPool.threadCount=15 +spring.quartz.properties.org.quartz.threadPool.threadPriority=5 +spring.quartz.properties.org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true \ No newline at end of file diff --git a/target/classes/application.properties b/target/classes/application.properties new file mode 100644 index 0000000..4e554b7 --- /dev/null +++ b/target/classes/application.properties @@ -0,0 +1,84 @@ +# 环境配置 顶岗实习 +spring.profiles.active=dev +#和CPU数 +spring.server.acceptorThreadCount=600 +spring.server.minSpareThreads=100 +spring.server.maxSpareThreads=500 +spring.server.maxThreads=500 +spring.server.maxConnections=1000 +#10秒超时 +spring.server.connectionTimeout=20000 +spring.server.protocol=org.apache.coyote.http11.Http11AprProtocol +spring.server.redirectPort=8443 +spring.server.compression=on +#文件请求大小 +spring.server.MaxFileSize=300MB +spring.server.MaxRequestSize=500MB +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=50MB +# 文件编码 UTF8 +spring.mandatory-file-encoding=UTF-8 +spring.jackson.time-zone=GMT+8 +# 404 交给异常处理器处理 +spring.mvc.throw-exception-if-no-handler-found=true +# 关闭静态资源的映射 +spring.resources.add-mappings=false +# 关闭banner打印 +mybatis-plus.global-config.banner=false +# mybatis-plus相关配置 +mybatis-plus.mapper-locations=classpath:mapper/*.xml +# 是否开启自动驼峰命名规则映射 +mybatis-plus.configuration.map-underscore-to-camel-case=true +# 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段 +mybatis-plus.configuration.call-setters-on-nulls=true +# 逻辑删除 +mybatis-plus.global-config.db-config.logic-delete-value=NOW() +mybatis-plus.global-config.db-config.logic-not-delete-value=NULL +#日志配置 +logging.config=classpath:logback-spring.xml +#ehcache缓存配置 +spring.cache.type=ehcache +spring.cache.ehcache.config=classpath:ehcache.xml +# 阿里云短信 +sms.product=Dysmsapi +sms.domain=dysmsapi.aliyuncs.com +sms.accessKeyId=LTAI5tPAH7P7WQVeowo517BE +sms.accessKeySecret=0ueqhIfdAZyw5lWlBVSLpAxTtx37RY +#wechat.app-id=wx7785293ff5e31f14 +#wechat.app-secret=25d57cad61fc1b45b3afa46d4c35e8f6 +#wechat.agentId=1000008 +vod.appId=1302252447 +vod.secretId=AKIDOcePHvZ2C5VeYHQGSO5aqtlNxJQLqfz2 +vod.secretKey=vjHYRmrfDbw0rWxA7oFcj7F8lDPKCm8E +vod.api=vod.tencentcloudapi.com +vod.region=ap-shanghai +vod.classId=848920 +# quartz +# 数据持久化方式 +spring.quartz.job-store-type=jdbc +# 初始化后是否自动启动计划程序 +spring.quartz.auto-startup=true +# 初始化完成后启动计划程序的延迟时间 +spring.quartz.startup-delay=10s +# 配置的作业是否应覆盖现有的作业定义 +spring.quartz.overwrite-existing-jobs=false +# 自动建表,如果已经存在表请勿使用,会覆盖数据表 +#spring.quartz.jdbc.initialize-schema=always +#spring.datasource.initialization-mode=embedded +#spring.redis.host=r-uf6m4cpkjrgpzywjm3pd.redis.rds.aliyuncs.com +#spring.redis.port=6379 +#spring.redis.password=r-uf6m4cpkjrgpzywjm3:Ykhl@208 +wechat= +#pro +appId=wx5e1ecb9c9bd33451 +appSecret=4f5e1abb6fb4f68f5273820b6295ec6b + +#保利威视 +polyv.userId=b8f2d3bfdc +polyv.appId=g3lrxnzd75 +polyv.appSecret=ef9cdcbbb9184b61aca301ba8114d570 +polyv.secretKey=03sqxr97fo + +subsidy.appId=qxywz5nnWMI7ABCS +subsidy.securityKey=626737T1-65K0-5xC2-0Y0V-2Aq9QUAJ +subsidy.url=http://subsidy.youkehulian.cn/auth/user/token \ No newline at end of file diff --git a/target/classes/code.properties b/target/classes/code.properties new file mode 100644 index 0000000..7ff6610 --- /dev/null +++ b/target/classes/code.properties @@ -0,0 +1,85 @@ +meishu.code-message[0]=成功 + +meishu.code-message[1010]=无效的令牌 +meishu.code-message[1011]=当前账户已在其他设备登录 +meishu.code-message[1012]=你已掉线,请重新登录 + +meishu.code-message[10003]=验证码错误 +meishu.code-message[10004]=账号或密码错误 +meishu.code-message[10010]=学生信息不存在 +meishu.code-message[10011]=成员信息不存在 +meishu.code-message[10012]=该账号不存在 +meishu.code-message[10013]=账户已冻结,请联系账户管理员 +meishu.code-message[10014]=该成员已存在,请勿重复添加 +meishu.code-message[10015]=首次登录请使用验证码登录 +meishu.code-message[10016]=密码输入错误,请稍后再试 +meishu.code-message[10017]=该公司不存在该员工 +meishu.code-message[10021]=密码输入错误,您还可以输入1次密码 +meishu.code-message[10022]=密码输入错误,您还可以输入2次密码 +meishu.code-message[10023]=密码输入错误,您还可以输入3次密码 +meishu.code-message[10024]=密码输入错误,您还可以输入4次密码 +meishu.code-message[10025]=身份证识别错误 +meishu.code-message[10026]=姓名或身份证号格式不正确 +meishu.code-message[10027]=该手机号已注册 +meishu.code-message[10028]=该成员已在其他公司入职 +meishu.code-message[10029]=密码输入错误 +meishu.code-message[10030]=该账号未被授权 + + +meishu.code-message[20001]=该课程已存在 +meishu.code-message[20002]=该成员已存在 + +meishu.code-message[30001]=该部门已存在 + +meishu.code-message[40001]=该目录已存在 + +meishu.code-message[50001]=该试卷已存在 + +meishu.code-message[60001]=已超过最大测试次数 + + +meishu.code-message[70010]=验证码错误 +meishu.code-message[70011]=验证码发送频繁 +meishu.code-message[70012]=手机号未注册 +meishu.code-message[70013]=您今天已报名了同类型的场次 +meishu.code-message[70014]=取消报名失败 + +meishu.code-message[80001]=uuid已过期 +meishu.code-message[80002]=uuid验证失败 + +meishu.code-message[90001]=该类目已存在 + +meishu.code-message[10001]=导入失败 + +meishu.code-message[11001]=该行业已存在 + +meishu.code-message[70001]=添加通知失败,通知时间不能小于一小时 +meishu.code-message[70002]=定时任务创建失败 +meishu.code-message[70003]=定时任务删除失败 + +meishu.code-message[12001]=该职级已存在 + +meishu.code-message[13001]=已达到当日最大时长 + +meishu.code-message[14001]=认证失败,签名不通过 +meishu.code-message[14002]=认证失败,签名已过期 + +meishu.code-message[15001]=类型已存在 +meishu.code-message[15002]=类型已存在证书,删除失败 + +meishu.code-message[16001]=该条件已存在 + + +meishu.code-message[17001]=系统不支持23:30:00~06:00:00学习 + + +meishu.code-message[18001]=已超过当日验证次数上线 + + +meishu.code-message[19001]=验证失败 + +meishu.code-message[20003]=提交时间过短,请稍后尝试 + +meishu.code-message[30002]=该产品已存在 +meishu.code-message[31001]=该类别已存在 +meishu.code-message[31002]=该项目已存在 diff --git a/target/classes/com/subsidy/MeishuApplication.class b/target/classes/com/subsidy/MeishuApplication.class new file mode 100644 index 0000000..4f0c939 Binary files /dev/null and b/target/classes/com/subsidy/MeishuApplication.class differ diff --git a/target/classes/com/subsidy/common/ResponseData.class b/target/classes/com/subsidy/common/ResponseData.class new file mode 100644 index 0000000..522c7a6 Binary files /dev/null and b/target/classes/com/subsidy/common/ResponseData.class differ diff --git a/target/classes/com/subsidy/common/ResponseVO$ResponseVOBuilder.class b/target/classes/com/subsidy/common/ResponseVO$ResponseVOBuilder.class new file mode 100644 index 0000000..e822f4a Binary files /dev/null and b/target/classes/com/subsidy/common/ResponseVO$ResponseVOBuilder.class differ diff --git a/target/classes/com/subsidy/common/ResponseVO.class b/target/classes/com/subsidy/common/ResponseVO.class new file mode 100644 index 0000000..ae93279 Binary files /dev/null and b/target/classes/com/subsidy/common/ResponseVO.class differ diff --git a/target/classes/com/subsidy/common/configure/AliyunSmsProperties.class b/target/classes/com/subsidy/common/configure/AliyunSmsProperties.class new file mode 100644 index 0000000..8694e40 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/AliyunSmsProperties.class differ diff --git a/target/classes/com/subsidy/common/configure/JobFactory.class b/target/classes/com/subsidy/common/configure/JobFactory.class new file mode 100644 index 0000000..8c54386 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/JobFactory.class differ diff --git a/target/classes/com/subsidy/common/configure/MyTomcat$GwsTomcatConnectionCustomizer.class b/target/classes/com/subsidy/common/configure/MyTomcat$GwsTomcatConnectionCustomizer.class new file mode 100644 index 0000000..cf3bc30 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/MyTomcat$GwsTomcatConnectionCustomizer.class differ diff --git a/target/classes/com/subsidy/common/configure/MyTomcat.class b/target/classes/com/subsidy/common/configure/MyTomcat.class new file mode 100644 index 0000000..733cc83 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/MyTomcat.class differ diff --git a/target/classes/com/subsidy/common/configure/MybatisPlusConfig.class b/target/classes/com/subsidy/common/configure/MybatisPlusConfig.class new file mode 100644 index 0000000..bd54fa0 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/MybatisPlusConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/PolyvConfig.class b/target/classes/com/subsidy/common/configure/PolyvConfig.class new file mode 100644 index 0000000..2711b0f Binary files /dev/null and b/target/classes/com/subsidy/common/configure/PolyvConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/QXueYouConfig.class b/target/classes/com/subsidy/common/configure/QXueYouConfig.class new file mode 100644 index 0000000..d113eed Binary files /dev/null and b/target/classes/com/subsidy/common/configure/QXueYouConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/QuartzConfig.class b/target/classes/com/subsidy/common/configure/QuartzConfig.class new file mode 100644 index 0000000..e84b055 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/QuartzConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/RedisConfig.class b/target/classes/com/subsidy/common/configure/RedisConfig.class new file mode 100644 index 0000000..9e74e3c Binary files /dev/null and b/target/classes/com/subsidy/common/configure/RedisConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/RemoteProperties.class b/target/classes/com/subsidy/common/configure/RemoteProperties.class new file mode 100644 index 0000000..5be7af1 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/RemoteProperties.class differ diff --git a/target/classes/com/subsidy/common/configure/RenSheConfig.class b/target/classes/com/subsidy/common/configure/RenSheConfig.class new file mode 100644 index 0000000..d3b5c52 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/RenSheConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/RestTemplateConfig$WxMappingJackson2HttpMessageConverter.class b/target/classes/com/subsidy/common/configure/RestTemplateConfig$WxMappingJackson2HttpMessageConverter.class new file mode 100644 index 0000000..1cad572 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/RestTemplateConfig$WxMappingJackson2HttpMessageConverter.class differ diff --git a/target/classes/com/subsidy/common/configure/RestTemplateConfig.class b/target/classes/com/subsidy/common/configure/RestTemplateConfig.class new file mode 100644 index 0000000..4c0c960 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/RestTemplateConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/SubsidyConfig.class b/target/classes/com/subsidy/common/configure/SubsidyConfig.class new file mode 100644 index 0000000..1c514fe Binary files /dev/null and b/target/classes/com/subsidy/common/configure/SubsidyConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/SwaggerConfig.class b/target/classes/com/subsidy/common/configure/SwaggerConfig.class new file mode 100644 index 0000000..f817f2f Binary files /dev/null and b/target/classes/com/subsidy/common/configure/SwaggerConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/VODConfig.class b/target/classes/com/subsidy/common/configure/VODConfig.class new file mode 100644 index 0000000..be9790a Binary files /dev/null and b/target/classes/com/subsidy/common/configure/VODConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/WebConfig.class b/target/classes/com/subsidy/common/configure/WebConfig.class new file mode 100644 index 0000000..137d389 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/WebConfig.class differ diff --git a/target/classes/com/subsidy/common/configure/WebLogAspect.class b/target/classes/com/subsidy/common/configure/WebLogAspect.class new file mode 100644 index 0000000..ff990db Binary files /dev/null and b/target/classes/com/subsidy/common/configure/WebLogAspect.class differ diff --git a/target/classes/com/subsidy/common/configure/WechatConfig.class b/target/classes/com/subsidy/common/configure/WechatConfig.class new file mode 100644 index 0000000..3028ff7 Binary files /dev/null and b/target/classes/com/subsidy/common/configure/WechatConfig.class differ diff --git a/target/classes/com/subsidy/common/constant/AttendanceConstant.class b/target/classes/com/subsidy/common/constant/AttendanceConstant.class new file mode 100644 index 0000000..b9a5d91 Binary files /dev/null and b/target/classes/com/subsidy/common/constant/AttendanceConstant.class differ diff --git a/target/classes/com/subsidy/common/constant/Code.class b/target/classes/com/subsidy/common/constant/Code.class new file mode 100644 index 0000000..eba1935 Binary files /dev/null and b/target/classes/com/subsidy/common/constant/Code.class differ diff --git a/target/classes/com/subsidy/common/constant/CourseNotification.class b/target/classes/com/subsidy/common/constant/CourseNotification.class new file mode 100644 index 0000000..5a6cc97 Binary files /dev/null and b/target/classes/com/subsidy/common/constant/CourseNotification.class differ diff --git a/target/classes/com/subsidy/common/constant/SmsCode.class b/target/classes/com/subsidy/common/constant/SmsCode.class new file mode 100644 index 0000000..5c9076f Binary files /dev/null and b/target/classes/com/subsidy/common/constant/SmsCode.class differ diff --git a/target/classes/com/subsidy/common/constant/VodConstant.class b/target/classes/com/subsidy/common/constant/VodConstant.class new file mode 100644 index 0000000..842305b Binary files /dev/null and b/target/classes/com/subsidy/common/constant/VodConstant.class differ diff --git a/target/classes/com/subsidy/common/constant/WxConstant.class b/target/classes/com/subsidy/common/constant/WxConstant.class new file mode 100644 index 0000000..2cd0238 Binary files /dev/null and b/target/classes/com/subsidy/common/constant/WxConstant.class differ diff --git a/target/classes/com/subsidy/common/exception/GlobalExceptionHandler.class b/target/classes/com/subsidy/common/exception/GlobalExceptionHandler.class new file mode 100644 index 0000000..819e745 Binary files /dev/null and b/target/classes/com/subsidy/common/exception/GlobalExceptionHandler.class differ diff --git a/target/classes/com/subsidy/common/exception/HttpException.class b/target/classes/com/subsidy/common/exception/HttpException.class new file mode 100644 index 0000000..34f28c9 Binary files /dev/null and b/target/classes/com/subsidy/common/exception/HttpException.class differ diff --git a/target/classes/com/subsidy/common/handler/MetaHandler.class b/target/classes/com/subsidy/common/handler/MetaHandler.class new file mode 100644 index 0000000..4c735cf Binary files /dev/null and b/target/classes/com/subsidy/common/handler/MetaHandler.class differ diff --git a/target/classes/com/subsidy/common/interceptor/AuthenticationInterceptor.class b/target/classes/com/subsidy/common/interceptor/AuthenticationInterceptor.class new file mode 100644 index 0000000..7e451b4 Binary files /dev/null and b/target/classes/com/subsidy/common/interceptor/AuthenticationInterceptor.class differ diff --git a/target/classes/com/subsidy/common/interceptor/LoginRequired.class b/target/classes/com/subsidy/common/interceptor/LoginRequired.class new file mode 100644 index 0000000..888c6fb Binary files /dev/null and b/target/classes/com/subsidy/common/interceptor/LoginRequired.class differ diff --git a/target/classes/com/subsidy/common/interceptor/TimeRequired.class b/target/classes/com/subsidy/common/interceptor/TimeRequired.class new file mode 100644 index 0000000..f8311fc Binary files /dev/null and b/target/classes/com/subsidy/common/interceptor/TimeRequired.class differ diff --git a/target/classes/com/subsidy/controller/AdministerController.class b/target/classes/com/subsidy/controller/AdministerController.class new file mode 100644 index 0000000..f9f01b8 Binary files /dev/null and b/target/classes/com/subsidy/controller/AdministerController.class differ diff --git a/target/classes/com/subsidy/controller/AdministerProjectMappingController.class b/target/classes/com/subsidy/controller/AdministerProjectMappingController.class new file mode 100644 index 0000000..e946533 Binary files /dev/null and b/target/classes/com/subsidy/controller/AdministerProjectMappingController.class differ diff --git a/target/classes/com/subsidy/controller/MemberController.class b/target/classes/com/subsidy/controller/MemberController.class new file mode 100644 index 0000000..8d42cc4 Binary files /dev/null and b/target/classes/com/subsidy/controller/MemberController.class differ diff --git a/target/classes/com/subsidy/controller/OssController.class b/target/classes/com/subsidy/controller/OssController.class new file mode 100644 index 0000000..479168c Binary files /dev/null and b/target/classes/com/subsidy/controller/OssController.class differ diff --git a/target/classes/com/subsidy/controller/ProjectController.class b/target/classes/com/subsidy/controller/ProjectController.class new file mode 100644 index 0000000..e29400c Binary files /dev/null and b/target/classes/com/subsidy/controller/ProjectController.class differ diff --git a/target/classes/com/subsidy/controller/ProjectMemberMappingController.class b/target/classes/com/subsidy/controller/ProjectMemberMappingController.class new file mode 100644 index 0000000..7c42628 Binary files /dev/null and b/target/classes/com/subsidy/controller/ProjectMemberMappingController.class differ diff --git a/target/classes/com/subsidy/dto/administer/VerifyCodeDTO.class b/target/classes/com/subsidy/dto/administer/VerifyCodeDTO.class new file mode 100644 index 0000000..f637809 Binary files /dev/null and b/target/classes/com/subsidy/dto/administer/VerifyCodeDTO.class differ diff --git a/target/classes/com/subsidy/dto/labor/SalaryListSumDTO.class b/target/classes/com/subsidy/dto/labor/SalaryListSumDTO.class new file mode 100644 index 0000000..8668067 Binary files /dev/null and b/target/classes/com/subsidy/dto/labor/SalaryListSumDTO.class differ diff --git a/target/classes/com/subsidy/dto/labor/UpdateTelephoneDTO.class b/target/classes/com/subsidy/dto/labor/UpdateTelephoneDTO.class new file mode 100644 index 0000000..2429674 Binary files /dev/null and b/target/classes/com/subsidy/dto/labor/UpdateTelephoneDTO.class differ diff --git a/target/classes/com/subsidy/mapper/AdministerMapper.class b/target/classes/com/subsidy/mapper/AdministerMapper.class new file mode 100644 index 0000000..956146a Binary files /dev/null and b/target/classes/com/subsidy/mapper/AdministerMapper.class differ diff --git a/target/classes/com/subsidy/mapper/AdministerProjectMappingMapper.class b/target/classes/com/subsidy/mapper/AdministerProjectMappingMapper.class new file mode 100644 index 0000000..0037562 Binary files /dev/null and b/target/classes/com/subsidy/mapper/AdministerProjectMappingMapper.class differ diff --git a/target/classes/com/subsidy/mapper/MemberMapper.class b/target/classes/com/subsidy/mapper/MemberMapper.class new file mode 100644 index 0000000..2b1851e Binary files /dev/null and b/target/classes/com/subsidy/mapper/MemberMapper.class differ diff --git a/target/classes/com/subsidy/mapper/ProjectMapper.class b/target/classes/com/subsidy/mapper/ProjectMapper.class new file mode 100644 index 0000000..ad92021 Binary files /dev/null and b/target/classes/com/subsidy/mapper/ProjectMapper.class differ diff --git a/target/classes/com/subsidy/mapper/ProjectMemberMappingMapper.class b/target/classes/com/subsidy/mapper/ProjectMemberMappingMapper.class new file mode 100644 index 0000000..41dabea Binary files /dev/null and b/target/classes/com/subsidy/mapper/ProjectMemberMappingMapper.class differ diff --git a/target/classes/com/subsidy/mapper/ProjectSalaryHistoryMapper.class b/target/classes/com/subsidy/mapper/ProjectSalaryHistoryMapper.class new file mode 100644 index 0000000..a0db427 Binary files /dev/null and b/target/classes/com/subsidy/mapper/ProjectSalaryHistoryMapper.class differ diff --git a/target/classes/com/subsidy/mapper/SmsVerifyCodeMapper.class b/target/classes/com/subsidy/mapper/SmsVerifyCodeMapper.class new file mode 100644 index 0000000..112e63f Binary files /dev/null and b/target/classes/com/subsidy/mapper/SmsVerifyCodeMapper.class differ diff --git a/target/classes/com/subsidy/model/AdministerDO.class b/target/classes/com/subsidy/model/AdministerDO.class new file mode 100644 index 0000000..0245381 Binary files /dev/null and b/target/classes/com/subsidy/model/AdministerDO.class differ diff --git a/target/classes/com/subsidy/model/AdministerProjectMappingDO.class b/target/classes/com/subsidy/model/AdministerProjectMappingDO.class new file mode 100644 index 0000000..7c0c767 Binary files /dev/null and b/target/classes/com/subsidy/model/AdministerProjectMappingDO.class differ diff --git a/target/classes/com/subsidy/model/MemberDO.class b/target/classes/com/subsidy/model/MemberDO.class new file mode 100644 index 0000000..28acea5 Binary files /dev/null and b/target/classes/com/subsidy/model/MemberDO.class differ diff --git a/target/classes/com/subsidy/model/ProjectDO.class b/target/classes/com/subsidy/model/ProjectDO.class new file mode 100644 index 0000000..d9ef427 Binary files /dev/null and b/target/classes/com/subsidy/model/ProjectDO.class differ diff --git a/target/classes/com/subsidy/model/ProjectMemberMappingDO.class b/target/classes/com/subsidy/model/ProjectMemberMappingDO.class new file mode 100644 index 0000000..b072aba Binary files /dev/null and b/target/classes/com/subsidy/model/ProjectMemberMappingDO.class differ diff --git a/target/classes/com/subsidy/model/ProjectSalaryHistoryDO.class b/target/classes/com/subsidy/model/ProjectSalaryHistoryDO.class new file mode 100644 index 0000000..3826512 Binary files /dev/null and b/target/classes/com/subsidy/model/ProjectSalaryHistoryDO.class differ diff --git a/target/classes/com/subsidy/model/SmsVerifyCodeDO.class b/target/classes/com/subsidy/model/SmsVerifyCodeDO.class new file mode 100644 index 0000000..66fa070 Binary files /dev/null and b/target/classes/com/subsidy/model/SmsVerifyCodeDO.class differ diff --git a/target/classes/com/subsidy/service/AdministerProjectMappingService.class b/target/classes/com/subsidy/service/AdministerProjectMappingService.class new file mode 100644 index 0000000..6654b63 Binary files /dev/null and b/target/classes/com/subsidy/service/AdministerProjectMappingService.class differ diff --git a/target/classes/com/subsidy/service/AdministerService.class b/target/classes/com/subsidy/service/AdministerService.class new file mode 100644 index 0000000..63f922c Binary files /dev/null and b/target/classes/com/subsidy/service/AdministerService.class differ diff --git a/target/classes/com/subsidy/service/MemberService.class b/target/classes/com/subsidy/service/MemberService.class new file mode 100644 index 0000000..77a1266 Binary files /dev/null and b/target/classes/com/subsidy/service/MemberService.class differ diff --git a/target/classes/com/subsidy/service/ProjectMemberMappingService.class b/target/classes/com/subsidy/service/ProjectMemberMappingService.class new file mode 100644 index 0000000..164cee2 Binary files /dev/null and b/target/classes/com/subsidy/service/ProjectMemberMappingService.class differ diff --git a/target/classes/com/subsidy/service/ProjectService.class b/target/classes/com/subsidy/service/ProjectService.class new file mode 100644 index 0000000..9d45e26 Binary files /dev/null and b/target/classes/com/subsidy/service/ProjectService.class differ diff --git a/target/classes/com/subsidy/service/impl/AdministerProjectMappingServiceImpl.class b/target/classes/com/subsidy/service/impl/AdministerProjectMappingServiceImpl.class new file mode 100644 index 0000000..33b5955 Binary files /dev/null and b/target/classes/com/subsidy/service/impl/AdministerProjectMappingServiceImpl.class differ diff --git a/target/classes/com/subsidy/service/impl/AdministerServiceImpl.class b/target/classes/com/subsidy/service/impl/AdministerServiceImpl.class new file mode 100644 index 0000000..6552354 Binary files /dev/null and b/target/classes/com/subsidy/service/impl/AdministerServiceImpl.class differ diff --git a/target/classes/com/subsidy/service/impl/MemberServiceImpl.class b/target/classes/com/subsidy/service/impl/MemberServiceImpl.class new file mode 100644 index 0000000..f140f44 Binary files /dev/null and b/target/classes/com/subsidy/service/impl/MemberServiceImpl.class differ diff --git a/target/classes/com/subsidy/service/impl/ProjectMemberMappingServiceImpl.class b/target/classes/com/subsidy/service/impl/ProjectMemberMappingServiceImpl.class new file mode 100644 index 0000000..38d72b3 Binary files /dev/null and b/target/classes/com/subsidy/service/impl/ProjectMemberMappingServiceImpl.class differ diff --git a/target/classes/com/subsidy/service/impl/ProjectServiceImpl.class b/target/classes/com/subsidy/service/impl/ProjectServiceImpl.class new file mode 100644 index 0000000..b2c9145 Binary files /dev/null and b/target/classes/com/subsidy/service/impl/ProjectServiceImpl.class differ diff --git a/target/classes/com/subsidy/util/ActivityDetectionUtils.class b/target/classes/com/subsidy/util/ActivityDetectionUtils.class new file mode 100644 index 0000000..bbb116c Binary files /dev/null and b/target/classes/com/subsidy/util/ActivityDetectionUtils.class differ diff --git a/target/classes/com/subsidy/util/Base64Util.class b/target/classes/com/subsidy/util/Base64Util.class new file mode 100644 index 0000000..f509e5e Binary files /dev/null and b/target/classes/com/subsidy/util/Base64Util.class differ diff --git a/target/classes/com/subsidy/util/BaseModel.class b/target/classes/com/subsidy/util/BaseModel.class new file mode 100644 index 0000000..9b17dc0 Binary files /dev/null and b/target/classes/com/subsidy/util/BaseModel.class differ diff --git a/target/classes/com/subsidy/util/CodeGenerator$1.class b/target/classes/com/subsidy/util/CodeGenerator$1.class new file mode 100644 index 0000000..3d01de4 Binary files /dev/null and b/target/classes/com/subsidy/util/CodeGenerator$1.class differ diff --git a/target/classes/com/subsidy/util/CodeGenerator$2.class b/target/classes/com/subsidy/util/CodeGenerator$2.class new file mode 100644 index 0000000..515afaa Binary files /dev/null and b/target/classes/com/subsidy/util/CodeGenerator$2.class differ diff --git a/target/classes/com/subsidy/util/CodeGenerator.class b/target/classes/com/subsidy/util/CodeGenerator.class new file mode 100644 index 0000000..04d98f5 Binary files /dev/null and b/target/classes/com/subsidy/util/CodeGenerator.class differ diff --git a/target/classes/com/subsidy/util/ConstantUtils.class b/target/classes/com/subsidy/util/ConstantUtils.class new file mode 100644 index 0000000..a422e97 Binary files /dev/null and b/target/classes/com/subsidy/util/ConstantUtils.class differ diff --git a/target/classes/com/subsidy/util/DateFormatUtil.class b/target/classes/com/subsidy/util/DateFormatUtil.class new file mode 100644 index 0000000..5eeaa8e Binary files /dev/null and b/target/classes/com/subsidy/util/DateFormatUtil.class differ diff --git a/target/classes/com/subsidy/util/DudaoConstant.class b/target/classes/com/subsidy/util/DudaoConstant.class new file mode 100644 index 0000000..ffa1340 Binary files /dev/null and b/target/classes/com/subsidy/util/DudaoConstant.class differ diff --git a/target/classes/com/subsidy/util/EhCacheUtil.class b/target/classes/com/subsidy/util/EhCacheUtil.class new file mode 100644 index 0000000..51ab06e Binary files /dev/null and b/target/classes/com/subsidy/util/EhCacheUtil.class differ diff --git a/target/classes/com/subsidy/util/ExcelFormatUtils.class b/target/classes/com/subsidy/util/ExcelFormatUtils.class new file mode 100644 index 0000000..2fea93d Binary files /dev/null and b/target/classes/com/subsidy/util/ExcelFormatUtils.class differ diff --git a/target/classes/com/subsidy/util/HttpUtil$1.class b/target/classes/com/subsidy/util/HttpUtil$1.class new file mode 100644 index 0000000..8b4b147 Binary files /dev/null and b/target/classes/com/subsidy/util/HttpUtil$1.class differ diff --git a/target/classes/com/subsidy/util/HttpUtil$2.class b/target/classes/com/subsidy/util/HttpUtil$2.class new file mode 100644 index 0000000..ebbcc43 Binary files /dev/null and b/target/classes/com/subsidy/util/HttpUtil$2.class differ diff --git a/target/classes/com/subsidy/util/HttpUtil$4.class b/target/classes/com/subsidy/util/HttpUtil$4.class new file mode 100644 index 0000000..a30b377 Binary files /dev/null and b/target/classes/com/subsidy/util/HttpUtil$4.class differ diff --git a/target/classes/com/subsidy/util/HttpUtil$DataParse.class b/target/classes/com/subsidy/util/HttpUtil$DataParse.class new file mode 100644 index 0000000..6a8ad07 Binary files /dev/null and b/target/classes/com/subsidy/util/HttpUtil$DataParse.class differ diff --git a/target/classes/com/subsidy/util/HttpUtil.class b/target/classes/com/subsidy/util/HttpUtil.class new file mode 100644 index 0000000..25aa442 Binary files /dev/null and b/target/classes/com/subsidy/util/HttpUtil.class differ diff --git a/target/classes/com/subsidy/util/ImageCheckUtil.class b/target/classes/com/subsidy/util/ImageCheckUtil.class new file mode 100644 index 0000000..51aefbf Binary files /dev/null and b/target/classes/com/subsidy/util/ImageCheckUtil.class differ diff --git a/target/classes/com/subsidy/util/IpAddressUtil.class b/target/classes/com/subsidy/util/IpAddressUtil.class new file mode 100644 index 0000000..58378eb Binary files /dev/null and b/target/classes/com/subsidy/util/IpAddressUtil.class differ diff --git a/target/classes/com/subsidy/util/JwtUtil.class b/target/classes/com/subsidy/util/JwtUtil.class new file mode 100644 index 0000000..05dbf93 Binary files /dev/null and b/target/classes/com/subsidy/util/JwtUtil.class differ diff --git a/target/classes/com/subsidy/util/Localstorage.class b/target/classes/com/subsidy/util/Localstorage.class new file mode 100644 index 0000000..8c4639c Binary files /dev/null and b/target/classes/com/subsidy/util/Localstorage.class differ diff --git a/target/classes/com/subsidy/util/MathUtil.class b/target/classes/com/subsidy/util/MathUtil.class new file mode 100644 index 0000000..2ca2d6a Binary files /dev/null and b/target/classes/com/subsidy/util/MathUtil.class differ diff --git a/target/classes/com/subsidy/util/MyBeanUtils.class b/target/classes/com/subsidy/util/MyBeanUtils.class new file mode 100644 index 0000000..71b19c1 Binary files /dev/null and b/target/classes/com/subsidy/util/MyBeanUtils.class differ diff --git a/target/classes/com/subsidy/util/OSSUtils.class b/target/classes/com/subsidy/util/OSSUtils.class new file mode 100644 index 0000000..54e75b5 Binary files /dev/null and b/target/classes/com/subsidy/util/OSSUtils.class differ diff --git a/target/classes/com/subsidy/util/PageHelper.class b/target/classes/com/subsidy/util/PageHelper.class new file mode 100644 index 0000000..f04693f Binary files /dev/null and b/target/classes/com/subsidy/util/PageHelper.class differ diff --git a/target/classes/com/subsidy/util/PolyvUtils.class b/target/classes/com/subsidy/util/PolyvUtils.class new file mode 100644 index 0000000..90df7ce Binary files /dev/null and b/target/classes/com/subsidy/util/PolyvUtils.class differ diff --git a/target/classes/com/subsidy/util/QuartzUtil.class b/target/classes/com/subsidy/util/QuartzUtil.class new file mode 100644 index 0000000..aa8b2f6 Binary files /dev/null and b/target/classes/com/subsidy/util/QuartzUtil.class differ diff --git a/target/classes/com/subsidy/util/RandomUtil.class b/target/classes/com/subsidy/util/RandomUtil.class new file mode 100644 index 0000000..d21cc9c Binary files /dev/null and b/target/classes/com/subsidy/util/RandomUtil.class differ diff --git a/target/classes/com/subsidy/util/RedisUtil.class b/target/classes/com/subsidy/util/RedisUtil.class new file mode 100644 index 0000000..0aa7ee1 Binary files /dev/null and b/target/classes/com/subsidy/util/RedisUtil.class differ diff --git a/target/classes/com/subsidy/util/RenSheJuConstant.class b/target/classes/com/subsidy/util/RenSheJuConstant.class new file mode 100644 index 0000000..dd7cf9b Binary files /dev/null and b/target/classes/com/subsidy/util/RenSheJuConstant.class differ diff --git a/target/classes/com/subsidy/util/ResultMode.class b/target/classes/com/subsidy/util/ResultMode.class new file mode 100644 index 0000000..1e45856 Binary files /dev/null and b/target/classes/com/subsidy/util/ResultMode.class differ diff --git a/target/classes/com/subsidy/util/SMSUtils.class b/target/classes/com/subsidy/util/SMSUtils.class new file mode 100644 index 0000000..dba8755 Binary files /dev/null and b/target/classes/com/subsidy/util/SMSUtils.class differ diff --git a/target/classes/com/subsidy/util/SecretUtils.class b/target/classes/com/subsidy/util/SecretUtils.class new file mode 100644 index 0000000..4a30ea0 Binary files /dev/null and b/target/classes/com/subsidy/util/SecretUtils.class differ diff --git a/target/classes/com/subsidy/util/ShehuihuaConstant.class b/target/classes/com/subsidy/util/ShehuihuaConstant.class new file mode 100644 index 0000000..2ce1461 Binary files /dev/null and b/target/classes/com/subsidy/util/ShehuihuaConstant.class differ diff --git a/target/classes/com/subsidy/util/Signature.class b/target/classes/com/subsidy/util/Signature.class new file mode 100644 index 0000000..12fbea2 Binary files /dev/null and b/target/classes/com/subsidy/util/Signature.class differ diff --git a/target/classes/com/subsidy/util/TestMain.class b/target/classes/com/subsidy/util/TestMain.class new file mode 100644 index 0000000..56a3273 Binary files /dev/null and b/target/classes/com/subsidy/util/TestMain.class differ diff --git a/target/classes/com/subsidy/util/VodUtil.class b/target/classes/com/subsidy/util/VodUtil.class new file mode 100644 index 0000000..70da455 Binary files /dev/null and b/target/classes/com/subsidy/util/VodUtil.class differ diff --git a/target/classes/com/subsidy/util/excel/ExcelColumn.class b/target/classes/com/subsidy/util/excel/ExcelColumn.class new file mode 100644 index 0000000..286e2ff Binary files /dev/null and b/target/classes/com/subsidy/util/excel/ExcelColumn.class differ diff --git a/target/classes/com/subsidy/util/excel/ExcelColumnUtil.class b/target/classes/com/subsidy/util/excel/ExcelColumnUtil.class new file mode 100644 index 0000000..ab1fd30 Binary files /dev/null and b/target/classes/com/subsidy/util/excel/ExcelColumnUtil.class differ diff --git a/target/classes/com/subsidy/util/excel/ExcelUtil.class b/target/classes/com/subsidy/util/excel/ExcelUtil.class new file mode 100644 index 0000000..2f992c4 Binary files /dev/null and b/target/classes/com/subsidy/util/excel/ExcelUtil.class differ diff --git a/target/classes/com/subsidy/util/tree/Node.class b/target/classes/com/subsidy/util/tree/Node.class new file mode 100644 index 0000000..8f73552 Binary files /dev/null and b/target/classes/com/subsidy/util/tree/Node.class differ diff --git a/target/classes/com/subsidy/util/tree/NumberTree.class b/target/classes/com/subsidy/util/tree/NumberTree.class new file mode 100644 index 0000000..70fc55b Binary files /dev/null and b/target/classes/com/subsidy/util/tree/NumberTree.class differ diff --git a/target/classes/com/subsidy/util/tree/SerialNumber.class b/target/classes/com/subsidy/util/tree/SerialNumber.class new file mode 100644 index 0000000..ae044aa Binary files /dev/null and b/target/classes/com/subsidy/util/tree/SerialNumber.class differ diff --git a/target/classes/com/subsidy/vo/administer/UserRoleVO.class b/target/classes/com/subsidy/vo/administer/UserRoleVO.class new file mode 100644 index 0000000..5de4d3e Binary files /dev/null and b/target/classes/com/subsidy/vo/administer/UserRoleVO.class differ diff --git a/target/classes/com/subsidy/vo/labor/BankInfoVO.class b/target/classes/com/subsidy/vo/labor/BankInfoVO.class new file mode 100644 index 0000000..0201b97 Binary files /dev/null and b/target/classes/com/subsidy/vo/labor/BankInfoVO.class differ diff --git a/target/classes/com/subsidy/vo/labor/CurrentProjectVO.class b/target/classes/com/subsidy/vo/labor/CurrentProjectVO.class new file mode 100644 index 0000000..deba3d5 Binary files /dev/null and b/target/classes/com/subsidy/vo/labor/CurrentProjectVO.class differ diff --git a/target/classes/com/subsidy/vo/labor/HistoryProjectsVO.class b/target/classes/com/subsidy/vo/labor/HistoryProjectsVO.class new file mode 100644 index 0000000..8720727 Binary files /dev/null and b/target/classes/com/subsidy/vo/labor/HistoryProjectsVO.class differ diff --git a/target/classes/com/subsidy/vo/labor/IdCardInfoVO.class b/target/classes/com/subsidy/vo/labor/IdCardInfoVO.class new file mode 100644 index 0000000..a18cde7 Binary files /dev/null and b/target/classes/com/subsidy/vo/labor/IdCardInfoVO.class differ diff --git a/target/classes/com/subsidy/vo/labor/LoginVO.class b/target/classes/com/subsidy/vo/labor/LoginVO.class new file mode 100644 index 0000000..fa3116c Binary files /dev/null and b/target/classes/com/subsidy/vo/labor/LoginVO.class differ diff --git a/target/classes/com/subsidy/vo/labor/SalaryListSumVO.class b/target/classes/com/subsidy/vo/labor/SalaryListSumVO.class new file mode 100644 index 0000000..49158ba Binary files /dev/null and b/target/classes/com/subsidy/vo/labor/SalaryListSumVO.class differ diff --git a/target/classes/com/subsidy/vo/labor/SalaryListVO.class b/target/classes/com/subsidy/vo/labor/SalaryListVO.class new file mode 100644 index 0000000..ee87c23 Binary files /dev/null and b/target/classes/com/subsidy/vo/labor/SalaryListVO.class differ diff --git a/target/classes/com/subsidy/vo/oss/UploadFileVO.class b/target/classes/com/subsidy/vo/oss/UploadFileVO.class new file mode 100644 index 0000000..7f9e7bd Binary files /dev/null and b/target/classes/com/subsidy/vo/oss/UploadFileVO.class differ diff --git a/target/classes/ehcache.xml b/target/classes/ehcache.xml new file mode 100644 index 0000000..7a297bc --- /dev/null +++ b/target/classes/ehcache.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/target/classes/logback-spring.xml b/target/classes/logback-spring.xml new file mode 100644 index 0000000..0006c90 --- /dev/null +++ b/target/classes/logback-spring.xml @@ -0,0 +1,74 @@ + + + + + ${APP_NAME} + + + + + info + + + %d [%t] %5p %c:%L - %m%n + UTF-8 + + + + ${LOG_PATH}${APP_NAME}-info.log + + %d [%t] %5p %c:%L - %m%n + + + + 100MB + + ${LOG_PATH}${APP_NAME}/info/%d{yyyy-MM-dd}-%i.log.gz + + 30 + + + + ${LOG_PATH}${APP_NAME}-error.log + + error + + + %d [%t] %5p %c:%L - %m%n + + + + 256MB + + ${LOG_PATH}${APP_NAME}/error/%d{yyyy-MM-dd}-%i.log.gz + + 180 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/target/classes/mapper/AdministerMapper.xml b/target/classes/mapper/AdministerMapper.xml new file mode 100644 index 0000000..0ce8477 --- /dev/null +++ b/target/classes/mapper/AdministerMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, telephone, account_name, password, company_id, user_name, img, status, role, remark + + + diff --git a/target/classes/mapper/AdministerProjectMappingMapper.xml b/target/classes/mapper/AdministerProjectMappingMapper.xml new file mode 100644 index 0000000..c88b840 --- /dev/null +++ b/target/classes/mapper/AdministerProjectMappingMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, administer_id, project_id + + + diff --git a/target/classes/mapper/MemberMapper.xml b/target/classes/mapper/MemberMapper.xml new file mode 100644 index 0000000..170dcd1 --- /dev/null +++ b/target/classes/mapper/MemberMapper.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, academy_id, company_id, user_name, account_name, account_name_en, email, work_no, induction_date, telephone, password, gender, image, check_image, check_time, id_card, id_card_photo, status, first_login, qq_no, wechat, practice_status, college_id, major, enrollment_year, payroll_account, bank, member_type + + + diff --git a/target/classes/mapper/ProjectMapper.xml b/target/classes/mapper/ProjectMapper.xml new file mode 100644 index 0000000..7d9def8 --- /dev/null +++ b/target/classes/mapper/ProjectMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, project_name, company_id, labor_service_id, salary_date, start_date, end_date + + + diff --git a/target/classes/mapper/ProjectMemberMappingMapper.xml b/target/classes/mapper/ProjectMemberMappingMapper.xml new file mode 100644 index 0000000..a0ad3ca --- /dev/null +++ b/target/classes/mapper/ProjectMemberMappingMapper.xml @@ -0,0 +1,45 @@ + + + + + + + + + diff --git a/target/classes/mapper/ProjectSalaryHistoryMapper.xml b/target/classes/mapper/ProjectSalaryHistoryMapper.xml new file mode 100644 index 0000000..fb49b49 --- /dev/null +++ b/target/classes/mapper/ProjectSalaryHistoryMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + diff --git a/target/classes/mapper/SmsVerifyCodeMapper.xml b/target/classes/mapper/SmsVerifyCodeMapper.xml new file mode 100644 index 0000000..76cd02e --- /dev/null +++ b/target/classes/mapper/SmsVerifyCodeMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/target/classes/mybatis-plus.properties b/target/classes/mybatis-plus.properties new file mode 100644 index 0000000..bb9710a --- /dev/null +++ b/target/classes/mybatis-plus.properties @@ -0,0 +1,12 @@ +# 此处为本项目src所在路径(代码生成器输出路径) +outputDir=/src/main/java +author=Tuyp +# 父的包名 +setParent=com.subsidy +# mapper.xml文件生成路径 +mapperPath=/src/main/resources/mapper/ +# 数据库地址 +url=jdbc:mysql://139.224.253.21:3306/subsidy?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&useAffectedRows=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true +driverName=com.mysql.cj.jdbc.Driver +userName=root +password=ykhladmin302 \ No newline at end of file diff --git a/target/classes/mybatis.xml b/target/classes/mybatis.xml new file mode 100644 index 0000000..f4495b4 --- /dev/null +++ b/target/classes/mybatis.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/target/classes/templates/controller.java.ftl b/target/classes/templates/controller.java.ftl new file mode 100644 index 0000000..28e7070 --- /dev/null +++ b/target/classes/templates/controller.java.ftl @@ -0,0 +1,41 @@ +package ${package.Controller}; + + +import org.springframework.web.bind.annotation.RequestMapping; + +<#if restControllerStyle> +import org.springframework.web.bind.annotation.RestController; +<#else> +import org.springframework.stereotype.Controller; + +<#if superControllerClassPackage??> +import ${superControllerClassPackage}; + +import io.swagger.annotations.Api; + +/** + *

+ * ${table.comment!} 前端控制器 + *

+ * + * @author ${author} + * @since ${date} + */ +<#if restControllerStyle> +@RestController +@Api(tags = "${table.comment!}") +<#else> +@Controller + +@RequestMapping("<#if package.ModuleName?? && package.ModuleName != "">/${package.ModuleName}/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}") +<#if kotlin> +class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}() +<#else> +<#if superControllerClass??> +public class ${table.controllerName} extends ${superControllerClass} { +<#else> +public class ${table.controllerName} { + + +} + diff --git a/target/classes/templates/entity.java.ftl b/target/classes/templates/entity.java.ftl new file mode 100644 index 0000000..c63bcc4 --- /dev/null +++ b/target/classes/templates/entity.java.ftl @@ -0,0 +1,156 @@ +package ${package.Entity}; + +<#list table.importPackages as pkg> +import ${pkg}; + +<#if swagger2> +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +<#if entityLombokModel> +import lombok.Data; +import lombok.EqualsAndHashCode; + <#if chainModel> +import lombok.experimental.Accessors; + + + +/** + *

+ * ${table.comment!} + *

+ * + * @author ${author} + * @since ${date} + */ +<#if entityLombokModel> +@Data + <#if superEntityClass??> +@EqualsAndHashCode(callSuper = true) + <#else> +@EqualsAndHashCode(callSuper = false) + + <#if chainModel> +@Accessors(chain = true) + + +<#if table.convert> +@TableName("${table.name}") + +<#if swagger2> +@ApiModel(value="${entity}对象", description="${table.comment!}") + +<#if superEntityClass??> +public class ${entity} extends ${superEntityClass}<#if activeRecord><${entity}> { +<#elseif activeRecord> +public class ${entity} extends Model<${entity}> { +<#else> +public class ${entity} implements Serializable { + + +<#if entitySerialVersionUID> + private static final long serialVersionUID = 1L; + +<#-- ---------- BEGIN 字段循环遍历 ----------> +<#list table.fields as field> + <#if field.keyFlag> + <#assign keyPropertyName="${field.propertyName}"/> + + + <#if field.comment!?length gt 0> + <#if swagger2> + @ApiModelProperty(value = "${field.comment}") + <#else> + /** + * ${field.comment} + */ + + + <#if field.keyFlag> + <#-- 主键 --> + <#if field.keyIdentityFlag> + @TableId(value = "${field.annotationColumnName}", type = IdType.AUTO) + <#elseif idType??> + @TableId(value = "${field.annotationColumnName}", type = IdType.${idType}) + <#elseif field.convert> + @TableId("${field.annotationColumnName}") + + <#-- 普通字段 --> + <#elseif field.fill??> + <#-- ----- 存在字段填充设置 -----> + <#if field.convert> + @TableField(value = "${field.annotationColumnName}", fill = FieldFill.${field.fill}) + <#else> + @TableField(fill = FieldFill.${field.fill}) + + <#elseif field.convert> + @TableField("${field.annotationColumnName}") + + <#-- 乐观锁注解 --> + <#if (versionFieldName!"") == field.name> + @Version + + <#-- 逻辑删除注解 --> + <#if (logicDeleteFieldName!"") == field.name> + @TableLogic + + private ${field.propertyType} ${field.propertyName}; + +<#------------ END 字段循环遍历 ----------> + +<#if !entityLombokModel> + <#list table.fields as field> + <#if field.propertyType == "boolean"> + <#assign getprefix="is"/> + <#else> + <#assign getprefix="get"/> + + public ${field.propertyType} ${getprefix}${field.capitalName}() { + return ${field.propertyName}; + } + + <#if chainModel> + public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + <#else> + public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + + this.${field.propertyName} = ${field.propertyName}; + <#if chainModel> + return this; + + } + + + +<#if entityColumnConstant> + <#list table.fields as field> + public static final String ${field.name?upper_case} = "${field.name}"; + + + +<#if activeRecord> + @Override + protected Serializable pkVal() { + <#if keyPropertyName??> + return this.${keyPropertyName}; + <#else> + return null; + + } + + +<#if !entityLombokModel> + @Override + public String toString() { + return "${entity}{" + + <#list table.fields as field> + <#if field_index==0> + "${field.propertyName}=" + ${field.propertyName} + + <#else> + ", ${field.propertyName}=" + ${field.propertyName} + + + + "}"; + } + +} diff --git a/target/classes/templates/mapper.java.ftl b/target/classes/templates/mapper.java.ftl new file mode 100644 index 0000000..be08c59 --- /dev/null +++ b/target/classes/templates/mapper.java.ftl @@ -0,0 +1,22 @@ +package ${package.Mapper}; + +import ${package.Entity}.${entity}; +import ${superMapperClassPackage}; +import org.springframework.stereotype.Repository; + +/** + *

+ * ${table.comment!} Mapper 接口 + *

+ * + * @author ${author} + * @since ${date} + */ +<#if kotlin> +interface ${table.mapperName} : ${superMapperClass}<${entity}> +<#else> + @Repository +public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { + +} + diff --git a/target/classes/templates/mapper.xml.ftl b/target/classes/templates/mapper.xml.ftl new file mode 100644 index 0000000..04c2359 --- /dev/null +++ b/target/classes/templates/mapper.xml.ftl @@ -0,0 +1,39 @@ + + + + +<#if enableCache> + + + + +<#if baseResultMap> + + +<#list table.fields as field> +<#if field.keyFlag><#--生成主键排在第一位--> + + + +<#list table.commonFields as field><#--生成公共字段 --> + + +<#list table.fields as field> +<#if !field.keyFlag><#--生成普通字段 --> + + + + + + +<#if baseColumnList> + + +<#list table.commonFields as field> + ${field.columnName}, + + ${table.fieldNames} + + + + diff --git a/target/classes/templates/service.java.ftl b/target/classes/templates/service.java.ftl new file mode 100644 index 0000000..e3232f3 --- /dev/null +++ b/target/classes/templates/service.java.ftl @@ -0,0 +1,20 @@ +package ${package.Service}; + +import ${package.Entity}.${entity}; +import ${superServiceClassPackage}; + +/** + *

+ * ${table.comment!} 服务类 + *

+ * + * @author ${author} + * @since ${date} + */ +<#if kotlin> +interface ${table.serviceName} : ${superServiceClass}<${entity}> +<#else> +public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { + +} + diff --git a/target/classes/templates/serviceImpl.java.ftl b/target/classes/templates/serviceImpl.java.ftl new file mode 100644 index 0000000..aeebd14 --- /dev/null +++ b/target/classes/templates/serviceImpl.java.ftl @@ -0,0 +1,26 @@ +package ${package.ServiceImpl}; + +import ${package.Entity}.${entity}; +import ${package.Mapper}.${table.mapperName}; +import ${package.Service}.${table.serviceName}; +import ${superServiceImplClassPackage}; +import org.springframework.stereotype.Service; + +/** + *

+ * ${table.comment!} 服务实现类 + *

+ * + * @author ${author} + * @since ${date} + */ +@Service +<#if kotlin> +open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { + +} +<#else> +public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { + +} + diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties new file mode 100644 index 0000000..25cf287 --- /dev/null +++ b/target/maven-archiver/pom.properties @@ -0,0 +1,3 @@ +version=0.0.1 +groupId=com.subsidy +artifactId=subsidy diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..88acf39 --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,89 @@ +com\subsidy\util\BaseModel.class +com\subsidy\common\constant\CourseNotification.class +com\subsidy\util\JwtUtil.class +com\subsidy\util\HttpUtil$2.class +com\subsidy\controller\CompanyDictController.class +com\subsidy\common\configure\MyTomcat.class +com\subsidy\common\configure\RemoteProperties.class +com\subsidy\mapper\CompanyDictMapper.class +com\subsidy\util\RandomUtil.class +com\subsidy\util\ExcelFormatUtils.class +com\subsidy\util\CodeGenerator.class +com\subsidy\model\ServiceAdministerMappingDO.class +com\subsidy\util\excel\ExcelUtil.class +com\subsidy\util\HttpUtil$DataParse.class +com\subsidy\service\AdministerCompanyMappingService.class +com\subsidy\util\CodeGenerator$2.class +com\subsidy\util\HttpUtil$1.class +com\subsidy\util\MyBeanUtils.class +com\subsidy\util\Signature.class +com\subsidy\util\SMSUtils.class +com\subsidy\controller\ServiceAdministerMappingController.class +com\subsidy\controller\AdministerController.class +com\subsidy\mapper\AdministerCompanyMappingMapper.class +com\subsidy\common\configure\QXueYouConfig.class +com\subsidy\util\MyStringUtils.class +com\subsidy\mapper\AdministerMapper.class +com\subsidy\util\ActivityDetectionUtils.class +com\subsidy\common\configure\SwaggerConfig.class +com\subsidy\model\AdministerCompanyMappingDO.class +com\subsidy\common\configure\WechatConfig.class +com\subsidy\vo\administer\OperatorsVO.class +com\subsidy\util\HttpUtil.class +com\subsidy\common\configure\MyTomcat$GwsTomcatConnectionCustomizer.class +com\subsidy\util\tree\Node.class +com\subsidy\model\FieldDictDO.class +com\subsidy\util\ResultMode.class +com\subsidy\common\RedisPrefixConstant.class +com\subsidy\common\constant\Code.class +com\subsidy\common\ResponseVO.class +com\subsidy\service\AdministerService.class +com\subsidy\common\ResponseData.class +com\subsidy\MeishuApplication.class +com\subsidy\util\excel\ExcelColumn.class +com\subsidy\common\configure\RestTemplateConfig.class +com\subsidy\util\ConstantUtils.class +com\subsidy\common\configure\JobFactory.class +com\subsidy\common\constant\AttendanceConstant.class +META-INF\spring-configuration-metadata.json +com\subsidy\common\constant\WxConstant.class +com\subsidy\common\exception\HttpException.class +com\subsidy\util\PageHelper.class +com\subsidy\service\impl\BrandJobServiceImpl.class +com\subsidy\model\CompanyDictDO.class +com\subsidy\common\configure\RestTemplateConfig$WxMappingJackson2HttpMessageConverter.class +com\subsidy\util\QuartzUtil.class +com\subsidy\common\configure\PolyvConfig.class +com\subsidy\service\ServiceAdministerMappingService.class +com\subsidy\controller\AdministerCompanyMappingController.class +com\subsidy\service\impl\AdministerCompanyMappingServiceImpl.class +com\subsidy\common\configure\MybatisPlusConfig.class +com\subsidy\common\exception\GlobalExceptionHandler.class +com\subsidy\util\ImageCheckUtil.class +com\subsidy\common\configure\RedisConfig.class +com\subsidy\model\AdministerDO.class +com\subsidy\service\impl\ServiceAdministerMappingServiceImpl.class +com\subsidy\util\TestMain.class +com\subsidy\service\CompanyDictService.class +com\subsidy\service\impl\AdministerServiceImpl.class +com\subsidy\common\constant\SmsCode.class +com\subsidy\common\configure\VODConfig.class +com\subsidy\util\MathUtil.class +com\subsidy\util\PolyvUtils.class +com\subsidy\common\interceptor\LoginRequired.class +com\subsidy\util\IpAddressUtil.class +com\subsidy\util\CodeGenerator$1.class +com\subsidy\common\ResponseVO$ResponseVOBuilder.class +com\subsidy\common\handler\MetaHandler.class +com\subsidy\util\EhCacheUtil.class +com\subsidy\util\VodUtil.class +com\subsidy\util\HttpUtil$4.class +com\subsidy\common\configure\AliyunSmsProperties.class +com\subsidy\common\configure\QuartzConfig.class +com\subsidy\util\DateFormatUtil.class +com\subsidy\common\configure\RenSheConfig.class +com\subsidy\util\Localstorage.class +com\subsidy\mapper\ServiceAdministerMappingMapper.class +com\subsidy\util\tree\SerialNumber.class +com\subsidy\util\HttpUtil$3.class +com\subsidy\util\RedisUtil.class diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..f114ce4 --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,591 @@ +D:\code\subsidy\src\main\java\com\subsidy\dto\course\UpdateCoursesDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CompanyFieldMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\token\IdCardAccessTokenVO.java +D:\code\subsidy\src\main\java\com\subsidy\util\PolyvUtils.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ExerciseDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\vo\token\SendIdCardInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\util\EhCacheUtil.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\ContentVodMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CourseContentServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\GetCompanyCertsDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\vod\ChangeOrdersDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\classdict\GetClassBaseInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CertRequirementDO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\SmsVerifyCodeController.java +D:\code\subsidy\src\main\java\com\subsidy\dto\classDict\AddClassDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\MemberService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vod\GetMemberStudyInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\wechat\SignVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\ExerciseDoneHistoryController.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\ChangeCompanyCertsDTO.java +D:\code\subsidy\src\main\java\com\subsidy\MeishuApplication.java +D:\code\subsidy\src\main\java\com\subsidy\vo\catagory\GetCategoriesVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\LivePlaybackHistoryMapper.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ClassTypeDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\GetMemberSignInfoDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\GetPaperDetailVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\MemberDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CertClassMemberMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\company\GetCompanyMembersDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\LiveDictService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\ExportPlaybacksVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\MemberMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\AdministerDO.java +D:\code\subsidy\src\main\java\com\subsidy\model\VodDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\common\constant\CourseNotification.java +D:\code\subsidy\src\main\java\com\subsidy\service\AdministerService.java +D:\code\subsidy\src\main\java\com\subsidy\controller\VodLabelDictController.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\OprAdmDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\dto\vod\SignDatePlaysDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\VodLabelDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\util\SMSUtils.java +D:\code\subsidy\src\main\java\com\subsidy\vo\cert\CertSignInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\ClassMemberMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\administer\ClassDetailDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\classDict\GetAllClassesDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\FieldDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\model\RotationImgDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\util\excel\ExcelColumnUtil.java +D:\code\subsidy\src\main\java\com\subsidy\model\CourseFieldMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\opr\GetHistoryVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\StudyPageVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\category\GetCategoriesDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\JobDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CertClassController.java +D:\code\subsidy\src\main\java\com\subsidy\controller\AccessTokenController.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\BusinessScopeDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\LiveStudyHistoryServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\service\ClassNoticeService.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CertTypeDictController.java +D:\code\subsidy\src\main\java\com\subsidy\common\interceptor\AuthenticationInterceptor.java +D:\code\subsidy\src\main\java\com\subsidy\controller\BusinessScopeDictController.java +D:\code\subsidy\src\main\java\com\subsidy\model\VodPlayHistoryDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\OprAdmDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\QingxuetangLoginDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\RankDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\service\CourseRankMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\util\HttpUtil.java +D:\code\subsidy\src\main\java\com\subsidy\model\LiveDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\VodDictController.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CertTypeMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CertRequirementMapper.java +D:\code\subsidy\src\main\java\com\subsidy\dto\live\PolyvInfoDTO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CourseCategoryMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\ExerciseDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\GetStudyInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\MemberLivesVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\ExerciseTestVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\FileDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CertMemberMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\service\FieldDictService.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\SmsVerifyCodeServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\image\ImageCheckDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\ActivityDetectionService.java +D:\code\subsidy\src\main\java\com\subsidy\dto\image\CheckResultDTO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CertMemberMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\BusinessScopeDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\util\tree\Node.java +D:\code\subsidy\src\main\java\com\subsidy\util\tree\SerialNumber.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\RolePermissionMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ImageCheckRecordMapper.java +D:\code\subsidy\src\main\java\com\subsidy\vo\sign\AnswerRecordVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\administer\ClassVodInfoDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\detection\GetCheckHistoryDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\cert\SignManagementVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\ClassHourDictService.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CertTypeDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\common\interceptor\WebSocketInterceptor.java +D:\code\subsidy\src\main\java\com\subsidy\model\PaperDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\GetAllCertsDTO.java +D:\code\subsidy\src\main\java\com\subsidy\util\IpAddressUtil.java +D:\code\subsidy\src\main\java\com\subsidy\common\constant\Code.java +D:\code\subsidy\src\main\java\com\subsidy\vo\wechat\AuthenTokenVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\FileDictController.java +D:\code\subsidy\src\main\java\com\subsidy\service\CourseCategoryMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\ClassDailyInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\CompanyDictService.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\LiveDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\LiveVodsDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\ClassSignVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\AccessTokenService.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\AdministerServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\model\RoleAdministerMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\GetAllVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\JobDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\classDict\AddMemberToClassDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\LiveFilesService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\classdict\ClassDetailVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\VodPlayHistoryService.java +D:\code\subsidy\src\main\java\com\subsidy\model\CourseDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\util\excel\ExcelColumn.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\QXTSign.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\RedisConfig.java +D:\code\subsidy\src\main\java\com\subsidy\vo\classdict\SystemSettings.java +D:\code\subsidy\src\main\java\com\subsidy\dto\administer\ClassDailyInfoDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\OprMemDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CourseFieldMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\controller\ClassHourDictController.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CompanyFieldMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\AccessTokenMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\DepartmentDictService.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\WebSocketConfig.java +D:\code\subsidy\src\main\java\com\subsidy\service\JobDictService.java +D:\code\subsidy\src\main\java\com\subsidy\common\interceptor\LoginRequired.java +D:\code\subsidy\src\main\java\com\subsidy\dto\administer\ManageMemberDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\ImportMemberDTO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CertMemberFileMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\controller\ClassTypeDictController.java +D:\code\subsidy\src\main\java\com\subsidy\model\ExerciseDoneHistoryDO.java +D:\code\subsidy\src\main\java\com\subsidy\util\RedisUtil.java +D:\code\subsidy\src\main\java\com\subsidy\vo\token\IdCardTicketsVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CategoryMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\RolePermissionMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\ActivityDetectionServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\common\ResponseData.java +D:\code\subsidy\src\main\java\com\subsidy\vo\sign\SignInStatusVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\AddMemberDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\JobMemberMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vod\GetVodPlayHistoryVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\ClassTypeDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CertClassMemberMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\ClassTypeDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\administer\MemberStudyLogDTO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ActivityDetectionMapper.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\AddCertClassDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\ContentVodMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\ContentFilesVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\LivePlaybackHistoryController.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\GetAllTypeDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\wechat\AuthenRequestVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\classNotice\SendNotificationDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CourseCategoryMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\CertCompanyMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\AnsweringQuestionServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\exercise\GetPaperExerciseVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\vod\InsertHistoryNewDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\vod\FixDataTwoDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\PaperDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\service\FileDictService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\AdministerPermissionVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\MemberDepartmentMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\businessScope\EditBusinessScopeDTO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\RoleDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\ExerciseDoneHistoryService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vod\ClassMemberPlayLengthVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CertTypeMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\RoleAdministerMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\QuartzConfig.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CourseDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\company\CDNStatDetailsVO.java +D:\code\subsidy\src\main\java\com\subsidy\util\JwtUtil.java +D:\code\subsidy\src\main\java\com\subsidy\vo\sign\DataViewVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\done\TestScoreInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\ExerciseDoneHistoryServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\OprMemDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vod\StudyHistoryVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\MemberTokensService.java +D:\code\subsidy\src\main\java\com\subsidy\service\RoleAdministerMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\model\LiveStudyHistoryDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\contentVod\ContentVodDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\BackData.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CourseBusinessMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\GetAllDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\MemberDepartmentMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\GetOneCertDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\FileDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\live\AddLiveDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\GetPaperDetailVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\vod\AddVodDictDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CourseContentDO.java +D:\code\subsidy\src\main\java\com\subsidy\mongodb\MongoController.java +D:\code\subsidy\src\main\java\com\subsidy\service\CourseContentService.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CourseJobMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\vo\course\ExerciseVO.java +D:\code\subsidy\src\main\java\com\subsidy\util\ExcelFormatUtils.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\PaperDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\vo\businessScope\BusinessScopeDictVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\cert\CertSignStatusVO.java +D:\code\subsidy\src\main\java\com\subsidy\util\PageHelper.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\OperatorsVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CertTypeMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\department\GetMembersVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\FieldDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\VodLabelDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CertCompanyMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\businessScope\AddBusinessScopeDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\classdict\ClassAndCompanyInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\JobMemberMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\MybatisPlusConfig.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\LivePlaybackHistoryServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\RolePermissionMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\RestTemplateConfig.java +D:\code\subsidy\src\main\java\com\subsidy\controller\RenSheJuController.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ClassDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\MemberStudyLogVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\LiveCoursewaresMapper.java +D:\code\subsidy\src\main\java\com\subsidy\util\MongoUtil.java +D:\code\subsidy\src\main\java\com\subsidy\jobs\LiveDictJob.java +D:\code\subsidy\src\main\java\com\subsidy\jobs\SchedulerJob.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\PermissionsDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\VODConfig.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ContentVodMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\ClassVodDailyInfoItemVO.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\AliyunSmsProperties.java +D:\code\subsidy\src\main\java\com\subsidy\controller\JobMemberMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\controller\ClassDictController.java +D:\code\subsidy\src\main\java\com\subsidy\service\LiveVodsService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\QxyVO.java +D:\code\subsidy\src\main\java\com\subsidy\util\EncryptUtil.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\LiveDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\cert\GetCompanyCertsWithStatusVO.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\JobFactory.java +D:\code\subsidy\src\main\java\com\subsidy\util\RandomUtil.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vod\SignatureVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\ImageCheckRecordDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\CourseFieldMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\service\AnsweringQuestionService.java +D:\code\subsidy\src\main\java\com\subsidy\dto\sign\DataViewDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\ClassDictService.java +D:\code\subsidy\src\main\java\com\subsidy\util\excel\ExcelUtil.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CertDictController.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\ClassVodInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\company\GetCompanyMembersVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\administer\VerifyCodeDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\PaperDictService.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\SmsVerifyCodeMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\DepartmentDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\PermissionsVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CourseContentMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\AccessTokenServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\service\ImageCheckRecordService.java +D:\code\subsidy\src\main\java\com\subsidy\model\LivePlaybackHistoryDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\CertRequirementService.java +D:\code\subsidy\src\main\java\com\subsidy\common\interceptor\TimeRequired.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\MyCoursesVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CertClassServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CourseBusinessMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\dto\company\DataOverviewDTO.java +D:\code\subsidy\src\main\java\com\subsidy\common\exception\GlobalExceptionHandler.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\SwaggerConfig.java +D:\code\subsidy\src\main\java\com\subsidy\dto\course\GetCourseQuestionDTO.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\QXueYouConfig.java +D:\code\subsidy\src\main\java\com\subsidy\common\exception\HttpException.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CompanyDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CourseRankMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\controller\MemberController.java +D:\code\subsidy\src\main\java\com\subsidy\dto\exercise\ImportHistory.java +D:\code\subsidy\src\main\java\com\subsidy\dto\live\PlaybacksDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\businessScope\BusinessScopeDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CategoryServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\service\CertMemberFileMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\util\BaseModel.java +D:\code\subsidy\src\main\java\com\subsidy\vo\token\IdCardSignTicketVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\token\ResultVO.java +D:\code\subsidy\src\main\java\com\subsidy\util\TestMain.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\LiveClassesVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\RankDictService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\cert\GetListVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CompanyFieldMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\classDict\ClassTypeDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CertClassDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\wechat\JsSdkVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\JobDictController.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\MemberServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\controller\FieldDictController.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\ClassHourDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\model\RoleDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\department\GetDepartmentMembersDTO.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\RemoteProperties.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\MemberTokensServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\vod\RemainSecondsDTO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\ImageCheckRecordController.java +D:\code\subsidy\src\main\java\com\subsidy\util\MathUtil.java +D:\code\subsidy\src\main\java\com\subsidy\common\constant\VodConstant.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\StudyHistoryDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\CourseDictService.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\AddCertDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\CertTypeDictService.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CertTypeMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\model\CourseBusinessMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\CertMemberMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CategoryController.java +D:\code\subsidy\src\main\java\com\subsidy\service\ClassTypeDictService.java +D:\code\subsidy\src\main\java\com\subsidy\service\MemberDepartmentMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\common\constant\AttendanceConstant.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CertTypeDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\WebLogAspect.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\LiveClassesServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\service\CategoryService.java +D:\code\subsidy\src\main\java\com\subsidy\model\AnsweringQuestionDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\ManageMemberVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\ExerciseDoneResultService.java +D:\code\subsidy\src\main\java\com\subsidy\model\MemberStudyLengthDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\OprAdmDictService.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\SignUpDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CourseRankMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\PolyvConfig.java +D:\code\subsidy\src\main\java\com\subsidy\model\CertTypeDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\util\websocket\ReConnectWebSocketClient.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\JobDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\CertDictService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vod\VodPlayStateVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\UserRoleVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\ActivityDetectionDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\label\VodLabelPageDTO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CompanyDictController.java +D:\code\subsidy\src\main\java\com\subsidy\mongodb\PageVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\company\AddCompanyDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\exercise\MemberExerciseVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\OprAdmDictController.java +D:\code\subsidy\src\main\java\com\subsidy\service\VodLabelDictService.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\WebConfig.java +D:\code\subsidy\src\main\java\com\subsidy\util\ResultMode.java +D:\code\subsidy\src\main\java\com\subsidy\vo\classdict\GetAllClassesVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\MemberDetectionRecordVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\LiveCoursewaresController.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\ClassSummaryVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\SignManagementDTO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\SignInRecordController.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\PermissionsDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\RoleDictService.java +D:\code\subsidy\src\main\java\com\subsidy\util\VodUtil.java +D:\code\subsidy\src\main\java\com\subsidy\model\SignInRecordDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\MemberStudyLengthServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\controller\ExerciseDoneResultController.java +D:\code\subsidy\src\main\java\com\subsidy\controller\LiveClassesController.java +D:\code\subsidy\src\main\java\com\subsidy\util\websocket\WebSocketUtil.java +D:\code\subsidy\src\main\java\com\subsidy\service\CourseBusinessMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\LiveVodsMapper.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\MemberStudyLengthMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\LiveCoursewaresService.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\WechatConfig.java +D:\code\subsidy\src\main\java\com\subsidy\controller\OprMemDictController.java +D:\code\subsidy\src\main\java\com\subsidy\vo\token\SendResultVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ClassHourDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\GetPaperDoneDetailVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vod\GetContendVodsVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\MyCoursesDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\sign\SignInDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\MemberStudyPageVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\classdict\GetSettingVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\ClassMembersVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\classdict\ClassSettingsVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\AccessTokenDO.java +D:\code\subsidy\src\main\java\com\subsidy\model\RolePermissionMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\ClassNoticeController.java +D:\code\subsidy\src\main\java\com\subsidy\service\CertClassMemberMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\model\LiveClassesDO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CertMemberFileMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\controller\RotationImgDictController.java +D:\code\subsidy\src\main\java\com\subsidy\dto\exercise\SubmitDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\catagory\CategoriesVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vod\ClassVodCompleteInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\DepartmentDictController.java +D:\code\subsidy\src\main\java\com\subsidy\util\tree\NumberTree.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\RotationImgDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vodLabel\VodLabelTreeVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\vod\VodDictPageDTO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CourseDictController.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CourseCategoryMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\util\Signature.java +D:\code\subsidy\src\main\java\com\subsidy\service\MemberStudyLengthService.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\AnsweringQuestionMapper.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ClassMemberMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CertDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\DepartmentDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\dto\sms\SendVerifyCodeDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\ContentVodVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\course\AddCourseDTO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CourseFieldMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CertRequirementServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vod\QueryVodPageVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\CheckStatusVO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CertCompanyMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\businessScope\BusinessVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\BusinessScopeDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\util\OSSUtils.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\JobMemberMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CertDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\util\SecretUtils.java +D:\code\subsidy\src\main\java\com\subsidy\dto\administer\ClassVodDailyInfoDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\BusinessScopeDictService.java +D:\code\subsidy\src\main\java\com\subsidy\controller\MemberTokensController.java +D:\code\subsidy\src\main\java\com\subsidy\controller\RankDictController.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\VodDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\PlaybacksVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\company\DataOverviewVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\exercise\GetDoneHistoryDetailVO.java +D:\code\subsidy\src\main\java\com\subsidy\common\RedisPrefixConstant.java +D:\code\subsidy\src\main\java\com\subsidy\dto\live\ClassMembersDTO.java +D:\code\subsidy\src\main\java\com\subsidy\common\constant\WxConstant.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\LiveStudyHistoryMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\LiveFilesServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\GetMemberSignInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CourseContentController.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\ImageCheckRecordServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\wechat\AccessTokenVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\classDict\GetClassBaseInfoDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\DataViewVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\ExerciseDoneResultServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\GetLiveVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\GetCompanyCertsWithStatusDTO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\ExerciseDictController.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\CertSignStatusDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\ChangeDepartmentsDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\RotationImgDictService.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\RoleDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\live\DataViewDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\ExerciseDoneResultDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\classDict\GetSpareMembersDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\LiveStudyHistoryService.java +D:\code\subsidy\src\main\java\com\subsidy\util\ConstantUtils.java +D:\code\subsidy\src\main\java\com\subsidy\model\ContentVodMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CompanyDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\image\GetMemberCheckDetailVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\contentVod\AddContentVodDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CertDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\VodDictService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\Result.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CourseJobMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\vo\cert\GetAllCertsWithoutTypeVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\LiveDictController.java +D:\code\subsidy\src\main\java\com\subsidy\model\MemberTokensDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\OprMemDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\model\ClassDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\VodDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CourseBusinessMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\answer\GetCourseQuestionVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\ContentMemberDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CertMemberFileMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\PolyvInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\VodPlayHistoryServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\ClassVodDailyInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\util\Base64Util.java +D:\code\subsidy\src\main\java\com\subsidy\service\CompanyFieldMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CertCompanyMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CompanyFieldMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\VodLabelDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\controller\AdministerController.java +D:\code\subsidy\src\main\java\com\subsidy\model\LiveCoursewaresDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CertMemberFileMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\service\CertTypeMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\controller\ContentVodMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\model\CompanyDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\live\AllLivesDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\CertSignInfoDTO.java +D:\code\subsidy\src\main\java\com\subsidy\common\handler\MetaHandler.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CertRequirementController.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\LiveFilesMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\ClassNoticeServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\controller\VodPlayHistoryController.java +D:\code\subsidy\src\main\java\com\subsidy\dto\administer\OperatorsDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CertMemberMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\company\MemberSummaryVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\PasswordLoginDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\token\CheckResultVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\exercise\GetPaperExerciseDTO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ExerciseDoneHistoryMapper.java +D:\code\subsidy\src\main\java\com\subsidy\util\ImageCheckUtil.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\VodPlayHistoryMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\RankDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\course\QueryCoursesVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\MemberStudyLengthController.java +D:\code\subsidy\src\main\java\com\subsidy\util\QuartzUtil.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\LoginVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\LiveClassesService.java +D:\code\subsidy\src\main\java\com\subsidy\service\LivePlaybackHistoryService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\AllLivesVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\GetCourseTestVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CourseDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\CourseJobMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\jobs\CourseNotificationJob.java +D:\code\subsidy\src\main\java\com\subsidy\vo\paper\QueryPapersVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\cert\GetCompanyCertsVO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CertClassMemberMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ClassNoticeMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\ExerciseDictService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\vod\DayInfoItemVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\detection\VerifyDTO.java +D:\code\subsidy\src\main\java\com\subsidy\service\SmsVerifyCodeService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\cert\GetOneCertVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\PermissionsDictService.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CertClassMapper.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\MemberTokensMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\ClassNoticeDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CertMemberMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\jobs\RenSheJuJob.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\LiveVodsServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\ExportClassMembersVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\live\LiveSignDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\MemberVodVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\AdministerMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\ClassHourDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\model\OprAdmDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\course\QueryCoursesDTO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\RotationImgDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\util\MyStringUtils.java +D:\code\subsidy\src\main\java\com\subsidy\model\SmsVerifyCodeDO.java +D:\code\subsidy\src\main\java\com\subsidy\service\OprMemDictService.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\LiveCoursewaresServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\LiveClassesMapper.java +D:\code\subsidy\src\main\java\com\subsidy\vo\exercise\GetDoneDetailVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\RoleAdministerMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CertCompanyMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\model\CourseRankMappingDO.java +D:\code\subsidy\src\main\java\com\subsidy\controller\AnsweringQuestionController.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\DepartmentDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\hour\PollingGetVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CourseRankMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\SignInRecordService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\MemberPlaybackVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\activity\GetCheckHistoryVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\field\QueryFieldsDTO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\ImageCheckDetailVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\cert\GetSignInfoVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\SignInRecordServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\FileDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\dto\department\GetDepartmentsVO.java +D:\code\subsidy\src\main\java\com\subsidy\common\constant\SmsCode.java +D:\code\subsidy\src\main\java\com\subsidy\common\ResponseVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\ClassDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\vo\live\ClassLivesVO.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CertClassMemberMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\dto\cert\GetListDTO.java +D:\code\subsidy\src\main\java\com\subsidy\util\DateFormatUtil.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\MemberDepartmentMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\util\ActivityDetectionUtils.java +D:\code\subsidy\src\main\java\com\subsidy\vo\done\GetMaxScoreVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\company\GetAllCompanyVO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\member\RegisterDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\exercise\GetAllExercisesDTO.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\RenSheConfig.java +D:\code\subsidy\src\main\java\com\subsidy\controller\LiveStudyHistoryController.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\SignInRecordMapper.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\CourseFieldMappingMapper.java +D:\code\subsidy\src\main\java\com\subsidy\model\PermissionsDictDO.java +D:\code\subsidy\src\main\java\com\subsidy\model\CategoryDO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\cert\GetAllCertsVO.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\MemberVO.java +D:\code\subsidy\src\main\java\com\subsidy\util\Localstorage.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\FieldDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\controller\PaperDictController.java +D:\code\subsidy\src\main\java\com\subsidy\vo\administer\GetMemberPapersVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\CourseJobMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\common\configure\MyTomcat.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\ExerciseDoneResultMapper.java +D:\code\subsidy\src\main\java\com\subsidy\dto\content\GetContendVodsDTO.java +D:\code\subsidy\src\main\java\com\subsidy\dto\opr\GetHistoryDTO.java +D:\code\subsidy\src\main\java\com\subsidy\model\LiveFilesDO.java +D:\code\subsidy\src\main\java\com\subsidy\util\MyBeanUtils.java +D:\code\subsidy\src\main\java\com\subsidy\controller\LiveFilesController.java +D:\code\subsidy\src\main\java\com\subsidy\service\CertClassService.java +D:\code\subsidy\src\main\java\com\subsidy\vo\member\ContentVodNewVO.java +D:\code\subsidy\src\main\java\com\subsidy\util\CodeGenerator.java +D:\code\subsidy\src\main\java\com\subsidy\mapper\RankDictMapper.java +D:\code\subsidy\src\main\java\com\subsidy\service\JobMemberMappingService.java +D:\code\subsidy\src\main\java\com\subsidy\controller\LiveVodsController.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\CourseJobMappingServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\controller\CourseCategoryMappingController.java +D:\code\subsidy\src\main\java\com\subsidy\dto\administer\SelfExportVO.java +D:\code\subsidy\src\main\java\com\subsidy\service\impl\ExerciseDictServiceImpl.java +D:\code\subsidy\src\main\java\com\subsidy\controller\ActivityDetectionController.java diff --git a/target/subsidy-interShip.jar b/target/subsidy-interShip.jar new file mode 100644 index 0000000..4bcf6d2 Binary files /dev/null and b/target/subsidy-interShip.jar differ diff --git a/target/subsidy-interShip.jar.original b/target/subsidy-interShip.jar.original new file mode 100644 index 0000000..0205257 Binary files /dev/null and b/target/subsidy-interShip.jar.original differ