diff --git a/logs/springboot-logback-error.log b/logs/springboot-logback-error.log new file mode 100644 index 0000000..c3726f4 --- /dev/null +++ b/logs/springboot-logback-error.log @@ -0,0 +1,44 @@ +2024-08-20 14:48:32,117 [schedulerFactoryBean_QuartzSchedulerThread] ERROR org.springframework.scheduling.quartz.LocalDataSourceJobStore:2867 - Error retrieving job, setting trigger state to ERROR. +org.quartz.JobPersistenceException: Couldn't retrieve job because a required class was not found: com.subsidy.job.ProjectSalaryNotificationJob + at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1393) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2864) + at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2805) + at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2803) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3864) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2802) + at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:287) +Caused by: java.lang.ClassNotFoundException: com.subsidy.job.ProjectSalaryNotificationJob + at java.net.URLClassLoader.findClass(URLClassLoader.java:382) + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) + at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at java.lang.Class.forName0(Native Method) + at java.lang.Class.forName(Class.java:348) + at org.springframework.util.ClassUtils.forName(ClassUtils.java:275) + at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:81) + at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:86) + at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:852) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1390) + ... 6 common frames omitted +2024-08-20 14:50:40,086 [schedulerFactoryBean_QuartzSchedulerThread] ERROR org.springframework.scheduling.quartz.LocalDataSourceJobStore:2867 - Error retrieving job, setting trigger state to ERROR. +org.quartz.JobPersistenceException: Couldn't retrieve job because a required class was not found: com.subsidy.job.ProjectSalaryNotificationJob + at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1393) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2864) + at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2805) + at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2803) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3864) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2802) + at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:287) +Caused by: java.lang.ClassNotFoundException: com.subsidy.job.ProjectSalaryNotificationJob + at java.net.URLClassLoader.findClass(URLClassLoader.java:382) + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) + at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at java.lang.Class.forName0(Native Method) + at java.lang.Class.forName(Class.java:348) + at org.springframework.util.ClassUtils.forName(ClassUtils.java:275) + at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:81) + at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:86) + at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:852) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1390) + ... 6 common frames omitted diff --git a/logs/springboot-logback-info.log b/logs/springboot-logback-info.log new file mode 100644 index 0000000..14fcc26 --- /dev/null +++ b/logs/springboot-logback-info.log @@ -0,0 +1,163 @@ +2024-08-20 14:19:19,815 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:244 - Multiple Spring Data modules found, entering strict repository configuration mode! +2024-08-20 14:19:19,822 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:126 - Bootstrapping Spring Data repositories in DEFAULT mode. +2024-08-20 14:19:19,857 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:182 - Finished Spring Data repository scanning in 25ms. Found 0 repository interfaces. +2024-08-20 14:19:20,170 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$3d9e5702] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2024-08-20 14:19:20,257 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'redisConfig' of type [com.subsidy.common.configure.RedisConfig$$EnhancerBySpringCGLIB$$3d666209] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2024-08-20 14:19:20,538 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:90 - Tomcat initialized with port(s): 23501 (http) +2024-08-20 14:19:20,549 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Initializing ProtocolHandler ["http-nio-23501"] +2024-08-20 14:19:20,556 [main] INFO org.apache.catalina.core.StandardService:173 - Starting service [Tomcat] +2024-08-20 14:19:20,556 [main] INFO org.apache.catalina.core.StandardEngine:173 - Starting Servlet engine: [Apache Tomcat/9.0.22] +2024-08-20 14:19:20,561 [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-08-20 14:19:20,561 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. +2024-08-20 14:19:20,561 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] +2024-08-20 14:19:20,563 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - OpenSSL successfully initialized [OpenSSL 1.1.1u 30 May 2023] +2024-08-20 14:19:20,666 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring embedded WebApplicationContext +2024-08-20 14:19:20,667 [main] INFO org.springframework.web.context.ContextLoader:284 - Root WebApplicationContext: initialization completed in 1629 ms +2024-08-20 14:19:20,764 [main] INFO com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure:56 - Init DruidDataSource +2024-08-20 14:19:21,910 [main] INFO com.alibaba.druid.pool.DruidDataSource:994 - {dataSource-1} inited +2024-08-20 14:19:22,656 [main] INFO org.quartz.impl.StdSchedulerFactory:1208 - Using default implementation for ThreadExecutor +2024-08-20 14:19:22,664 [main] INFO org.quartz.core.SchedulerSignalerImpl:61 - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl +2024-08-20 14:19:22,665 [main] INFO org.quartz.core.QuartzScheduler:229 - Quartz Scheduler v.2.3.1 created. +2024-08-20 14:19:22,667 [main] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:672 - Using db table-based data access locking (synchronization). +2024-08-20 14:19:22,669 [main] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:145 - JobStoreCMT initialized. +2024-08-20 14:19:22,670 [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-08-20 14:19:22,670 [main] INFO org.quartz.impl.StdSchedulerFactory:1362 - Quartz scheduler 'schedulerFactoryBean' initialized from an externally provided properties instance. +2024-08-20 14:19:22,670 [main] INFO org.quartz.impl.StdSchedulerFactory:1366 - Quartz scheduler version: 2.3.1 +2024-08-20 14:19:22,671 [main] INFO org.quartz.core.QuartzScheduler:2293 - JobFactory set to: com.subsidy.common.configure.JobFactory@101c15ad +2024-08-20 14:19:23,230 [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-08-20 14:19:23,398 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:171 - Initializing ExecutorService 'applicationTaskExecutor' +2024-08-20 14:19:23,887 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler:171 - Initializing ExecutorService 'taskScheduler' +2024-08-20 14:19:23,939 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:160 - Context refreshed +2024-08-20 14:19:23,952 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:163 - Found 1 custom documentation plugin(s) +2024-08-20 14:19:24,114 [main] INFO springfox.documentation.spring.web.scanners.ApiListingReferenceScanner:41 - Scanning for api listing references +2024-08-20 14:19:24,239 [main] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:731 - Will start Quartz Scheduler [schedulerFactoryBean] in 1 seconds +2024-08-20 14:19:24,247 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Starting ProtocolHandler ["http-nio-23501"] +2024-08-20 14:19:24,266 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:202 - Tomcat started on port(s): 23501 (http) with context path '' +2024-08-20 14:19:25,244 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:747 - Starting Quartz Scheduler now, after delay of 1 seconds +2024-08-20 14:19:25,301 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:866 - Freed 0 triggers from 'acquired' / 'blocked' state. +2024-08-20 14:19:25,319 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:876 - Recovering 0 jobs that were in-progress at the time of the last shut-down. +2024-08-20 14:19:25,319 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:889 - Recovery complete. +2024-08-20 14:19:25,327 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:896 - Removed 0 'complete' triggers. +2024-08-20 14:19:25,336 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:901 - Removed 0 stale fired job entries. +2024-08-20 14:19:25,352 [Quartz Scheduler [schedulerFactoryBean]] INFO org.quartz.core.QuartzScheduler:547 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED started. +2024-08-20 14:19:35,188 [http-nio-23501-exec-1] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring DispatcherServlet 'dispatcherServlet' +2024-08-20 14:19:35,188 [http-nio-23501-exec-1] INFO org.springframework.web.servlet.DispatcherServlet:524 - Initializing Servlet 'dispatcherServlet' +2024-08-20 14:19:35,196 [http-nio-23501-exec-1] INFO org.springframework.web.servlet.DispatcherServlet:546 - Completed initialization in 8 ms +2024-08-20 14:48:32,117 [schedulerFactoryBean_QuartzSchedulerThread] ERROR org.springframework.scheduling.quartz.LocalDataSourceJobStore:2867 - Error retrieving job, setting trigger state to ERROR. +org.quartz.JobPersistenceException: Couldn't retrieve job because a required class was not found: com.subsidy.job.ProjectSalaryNotificationJob + at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1393) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2864) + at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2805) + at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2803) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3864) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2802) + at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:287) +Caused by: java.lang.ClassNotFoundException: com.subsidy.job.ProjectSalaryNotificationJob + at java.net.URLClassLoader.findClass(URLClassLoader.java:382) + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) + at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at java.lang.Class.forName0(Native Method) + at java.lang.Class.forName(Class.java:348) + at org.springframework.util.ClassUtils.forName(ClassUtils.java:275) + at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:81) + at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:86) + at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:852) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1390) + ... 6 common frames omitted +2024-08-20 14:50:40,086 [schedulerFactoryBean_QuartzSchedulerThread] ERROR org.springframework.scheduling.quartz.LocalDataSourceJobStore:2867 - Error retrieving job, setting trigger state to ERROR. +org.quartz.JobPersistenceException: Couldn't retrieve job because a required class was not found: com.subsidy.job.ProjectSalaryNotificationJob + at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1393) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2864) + at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2805) + at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2803) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3864) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2802) + at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:287) +Caused by: java.lang.ClassNotFoundException: com.subsidy.job.ProjectSalaryNotificationJob + at java.net.URLClassLoader.findClass(URLClassLoader.java:382) + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) + at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at java.lang.Class.forName0(Native Method) + at java.lang.Class.forName(Class.java:348) + at org.springframework.util.ClassUtils.forName(ClassUtils.java:275) + at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:81) + at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:86) + at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:852) + at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1390) + ... 6 common frames omitted +2024-08-20 15:10:17,291 [Thread-15] INFO org.quartz.core.QuartzScheduler:585 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED paused. +2024-08-20 15:10:17,291 [Thread-15] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler:208 - Shutting down ExecutorService 'taskScheduler' +2024-08-20 15:10:17,296 [Thread-15] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:208 - Shutting down ExecutorService 'applicationTaskExecutor' +2024-08-20 15:10:17,308 [Thread-15] INFO org.quartz.core.QuartzScheduler:666 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED shutting down. +2024-08-20 15:10:17,308 [Thread-15] INFO org.quartz.core.QuartzScheduler:585 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED paused. +2024-08-20 15:10:17,309 [Thread-15] INFO org.quartz.core.QuartzScheduler:740 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED shutdown complete. +2024-08-20 15:10:17,309 [Thread-15] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:844 - Shutting down Quartz Scheduler +2024-08-20 15:10:17,309 [Thread-15] INFO com.alibaba.druid.pool.DruidDataSource:2029 - {dataSource-1} closing ... +2024-08-20 15:10:17,311 [Thread-15] INFO com.alibaba.druid.pool.DruidDataSource:2101 - {dataSource-1} closed +2024-08-20 15:10:23,476 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:244 - Multiple Spring Data modules found, entering strict repository configuration mode! +2024-08-20 15:10:23,480 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:126 - Bootstrapping Spring Data repositories in DEFAULT mode. +2024-08-20 15:10:23,510 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:182 - Finished Spring Data repository scanning in 20ms. Found 0 repository interfaces. +2024-08-20 15:10:23,834 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$726d77db] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2024-08-20 15:10:23,909 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'redisConfig' of type [com.subsidy.common.configure.RedisConfig$$EnhancerBySpringCGLIB$$723582e2] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2024-08-20 15:10:24,187 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:90 - Tomcat initialized with port(s): 23501 (http) +2024-08-20 15:10:24,198 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Initializing ProtocolHandler ["http-nio-23501"] +2024-08-20 15:10:24,206 [main] INFO org.apache.catalina.core.StandardService:173 - Starting service [Tomcat] +2024-08-20 15:10:24,206 [main] INFO org.apache.catalina.core.StandardEngine:173 - Starting Servlet engine: [Apache Tomcat/9.0.22] +2024-08-20 15:10:24,211 [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-08-20 15:10:24,211 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. +2024-08-20 15:10:24,211 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] +2024-08-20 15:10:24,214 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - OpenSSL successfully initialized [OpenSSL 1.1.1u 30 May 2023] +2024-08-20 15:10:24,315 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring embedded WebApplicationContext +2024-08-20 15:10:24,315 [main] INFO org.springframework.web.context.ContextLoader:284 - Root WebApplicationContext: initialization completed in 1598 ms +2024-08-20 15:10:24,397 [main] INFO com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure:56 - Init DruidDataSource +2024-08-20 15:10:25,307 [main] INFO com.alibaba.druid.pool.DruidDataSource:994 - {dataSource-1} inited +2024-08-20 15:10:26,013 [main] INFO org.quartz.impl.StdSchedulerFactory:1208 - Using default implementation for ThreadExecutor +2024-08-20 15:10:26,022 [main] INFO org.quartz.core.SchedulerSignalerImpl:61 - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl +2024-08-20 15:10:26,022 [main] INFO org.quartz.core.QuartzScheduler:229 - Quartz Scheduler v.2.3.1 created. +2024-08-20 15:10:26,025 [main] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:672 - Using db table-based data access locking (synchronization). +2024-08-20 15:10:26,027 [main] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:145 - JobStoreCMT initialized. +2024-08-20 15:10:26,028 [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-08-20 15:10:26,028 [main] INFO org.quartz.impl.StdSchedulerFactory:1362 - Quartz scheduler 'schedulerFactoryBean' initialized from an externally provided properties instance. +2024-08-20 15:10:26,028 [main] INFO org.quartz.impl.StdSchedulerFactory:1366 - Quartz scheduler version: 2.3.1 +2024-08-20 15:10:26,028 [main] INFO org.quartz.core.QuartzScheduler:2293 - JobFactory set to: com.subsidy.common.configure.JobFactory@32e830a0 +2024-08-20 15:10:26,553 [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-08-20 15:10:26,697 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:171 - Initializing ExecutorService 'applicationTaskExecutor' +2024-08-20 15:10:27,256 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler:171 - Initializing ExecutorService 'taskScheduler' +2024-08-20 15:10:27,306 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:160 - Context refreshed +2024-08-20 15:10:27,320 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:163 - Found 1 custom documentation plugin(s) +2024-08-20 15:10:27,480 [main] INFO springfox.documentation.spring.web.scanners.ApiListingReferenceScanner:41 - Scanning for api listing references +2024-08-20 15:10:27,605 [main] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:731 - Will start Quartz Scheduler [schedulerFactoryBean] in 1 seconds +2024-08-20 15:10:27,613 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Starting ProtocolHandler ["http-nio-23501"] +2024-08-20 15:10:27,632 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:202 - Tomcat started on port(s): 23501 (http) with context path '' +2024-08-20 15:10:28,617 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:747 - Starting Quartz Scheduler now, after delay of 1 seconds +2024-08-20 15:10:28,669 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:866 - Freed 0 triggers from 'acquired' / 'blocked' state. +2024-08-20 15:10:28,684 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:876 - Recovering 0 jobs that were in-progress at the time of the last shut-down. +2024-08-20 15:10:28,684 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:889 - Recovery complete. +2024-08-20 15:10:28,691 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:896 - Removed 0 'complete' triggers. +2024-08-20 15:10:28,699 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:901 - Removed 0 stale fired job entries. +2024-08-20 15:10:28,714 [Quartz Scheduler [schedulerFactoryBean]] INFO org.quartz.core.QuartzScheduler:547 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED started. +2024-08-20 15:45:28,451 [Thread-15] INFO org.quartz.core.QuartzScheduler:585 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED paused. +2024-08-20 15:45:28,452 [Thread-15] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler:208 - Shutting down ExecutorService 'taskScheduler' +2024-08-20 15:45:28,458 [Thread-15] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:208 - Shutting down ExecutorService 'applicationTaskExecutor' +2024-08-20 15:45:28,472 [Thread-15] INFO org.quartz.core.QuartzScheduler:666 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED shutting down. +2024-08-20 15:45:28,472 [Thread-15] INFO org.quartz.core.QuartzScheduler:585 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED paused. +2024-08-20 15:45:28,472 [Thread-15] INFO org.quartz.core.QuartzScheduler:740 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED shutdown complete. +2024-08-20 15:45:28,472 [Thread-15] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:844 - Shutting down Quartz Scheduler +2024-08-20 15:45:28,473 [Thread-15] INFO com.alibaba.druid.pool.DruidDataSource:2029 - {dataSource-1} closing ... +2024-08-20 15:45:28,474 [Thread-15] INFO com.alibaba.druid.pool.DruidDataSource:2101 - {dataSource-1} closed diff --git a/logs/springboot-logback/error/2024-07-31-0.log.gz b/logs/springboot-logback/error/2024-07-31-0.log.gz new file mode 100644 index 0000000..001322f Binary files /dev/null and b/logs/springboot-logback/error/2024-07-31-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-07-31-0.log.gz b/logs/springboot-logback/info/2024-07-31-0.log.gz new file mode 100644 index 0000000..f0cdc55 Binary files /dev/null and b/logs/springboot-logback/info/2024-07-31-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-08-01-0.log.gz b/logs/springboot-logback/info/2024-08-01-0.log.gz new file mode 100644 index 0000000..870714b Binary files /dev/null and b/logs/springboot-logback/info/2024-08-01-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-08-02-0.log.gz b/logs/springboot-logback/info/2024-08-02-0.log.gz new file mode 100644 index 0000000..af58537 Binary files /dev/null and b/logs/springboot-logback/info/2024-08-02-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-08-08-0.log.gz b/logs/springboot-logback/info/2024-08-08-0.log.gz new file mode 100644 index 0000000..2de17f1 Binary files /dev/null and b/logs/springboot-logback/info/2024-08-08-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-08-09-0.log.gz b/logs/springboot-logback/info/2024-08-09-0.log.gz new file mode 100644 index 0000000..5c287b2 Binary files /dev/null and b/logs/springboot-logback/info/2024-08-09-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-08-12-0.log.gz b/logs/springboot-logback/info/2024-08-12-0.log.gz new file mode 100644 index 0000000..f87c478 Binary files /dev/null and b/logs/springboot-logback/info/2024-08-12-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-08-13-0.log.gz b/logs/springboot-logback/info/2024-08-13-0.log.gz new file mode 100644 index 0000000..aafe69b Binary files /dev/null and b/logs/springboot-logback/info/2024-08-13-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-08-14-0.log.gz b/logs/springboot-logback/info/2024-08-14-0.log.gz new file mode 100644 index 0000000..479ddb0 Binary files /dev/null and b/logs/springboot-logback/info/2024-08-14-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-08-15-0.log.gz b/logs/springboot-logback/info/2024-08-15-0.log.gz new file mode 100644 index 0000000..85c8218 Binary files /dev/null and b/logs/springboot-logback/info/2024-08-15-0.log.gz differ diff --git a/logs/springboot-logback/info/2024-08-16-0.log.gz b/logs/springboot-logback/info/2024-08-16-0.log.gz new file mode 100644 index 0000000..571634f Binary files /dev/null and b/logs/springboot-logback/info/2024-08-16-0.log.gz differ diff --git a/pom.xml b/pom.xml index cb41eb0..b0708f4 100644 --- a/pom.xml +++ b/pom.xml @@ -275,7 +275,7 @@ - subsidy-interShip + subsidy-talent org.springframework.boot diff --git a/src/main/java/com/subsidy/common/configure/WechatConfig.java b/src/main/java/com/subsidy/common/configure/WechatConfig.java index 050e82b..bb18e0b 100644 --- a/src/main/java/com/subsidy/common/configure/WechatConfig.java +++ b/src/main/java/com/subsidy/common/configure/WechatConfig.java @@ -14,9 +14,9 @@ public class WechatConfig { private String appSecret; - //private String msgUrl; + private String msgUrl; // - //private String templateId; + private String templateId; // //private String agentId; diff --git a/src/main/java/com/subsidy/controller/AdministerProjectMappingController.java b/src/main/java/com/subsidy/controller/AccessTokenController.java similarity index 70% rename from src/main/java/com/subsidy/controller/AdministerProjectMappingController.java rename to src/main/java/com/subsidy/controller/AccessTokenController.java index 4187ee8..2655fb6 100644 --- a/src/main/java/com/subsidy/controller/AdministerProjectMappingController.java +++ b/src/main/java/com/subsidy/controller/AccessTokenController.java @@ -8,15 +8,15 @@ import io.swagger.annotations.Api; /** *

- * 管理员-项目映射表 前端控制器 + * 前端控制器 *

* * @author Tuyp - * @since 2024-07-18 + * @since 2024-08-09 */ @RestController -@Api(tags = "管理员-项目映射表") -@RequestMapping("/administer-project-mapping-do") -public class AdministerProjectMappingController { +@Api(tags = "") +@RequestMapping("/access-token-do") +public class AccessTokenController { } diff --git a/src/main/java/com/subsidy/controller/ProjectController.java b/src/main/java/com/subsidy/controller/ProjectController.java index 0ca72e7..9e66133 100644 --- a/src/main/java/com/subsidy/controller/ProjectController.java +++ b/src/main/java/com/subsidy/controller/ProjectController.java @@ -39,8 +39,14 @@ public class ProjectController { return ResponseData.generateCreatedResponse(0,projectService.sendSms(memberDO)); } + @PostMapping("sendNewSms") + @ApiOperation("发送验证码 telephone ") + public ResponseVO sendNewSms(@RequestBody MemberDO memberDO){ + return ResponseData.generateCreatedResponse(0,projectService.sendNewSms(memberDO)); + } + @PostMapping("login") - @ApiOperation("登录 telephone verifyCode") + @ApiOperation("登录 telephone verifyCode openId") public ResponseVO login(@RequestBody VerifyCodeDTO verifyCodeDTO){ return ResponseData.generateCreatedResponse(0,projectService.login(verifyCodeDTO)); } @@ -82,16 +88,22 @@ public class ProjectController { } @PostMapping("salaryListSum") - @ApiOperation("工资单--笔数+总计 memberId 人才id projectId 项目id ") + @ApiOperation("工资单--笔数+总计 memberId 人才id projectMappingId 项目id ") public ResponseVO salaryListSum(@RequestBody SalaryListSumDTO salaryListSumDTO){ return ResponseData.generateCreatedResponse(0,projectService.salaryListSum(salaryListSumDTO)); } @PostMapping("salaryList") - @ApiOperation("工资单明细 memberId 人才id projectId 项目id pageSize pageNum ") + @ApiOperation("工资单明细 memberId 人才id projectMappingId 项目映射id pageSize pageNum ") public ResponseVO salaryList(@RequestBody SalaryListSumDTO salaryListSumDTO){ return ResponseData.generateCreatedResponse(0,projectService.salaryList(salaryListSumDTO)); } + @PostMapping("updateUserInfo") + @ApiOperation("变更身份证/银行卡信息 id userName payrollAccount idCard bank") + public ResponseVO updateUserInfo(@RequestBody MemberDO memberDO){ + projectService.updateUserInfo(memberDO); + return ResponseData.generateCreatedResponse(0); + } } diff --git a/src/main/java/com/subsidy/controller/ProjectMemberMappingController.java b/src/main/java/com/subsidy/controller/ProjectMemberMappingController.java index 12f8a56..f5c4a97 100644 --- a/src/main/java/com/subsidy/controller/ProjectMemberMappingController.java +++ b/src/main/java/com/subsidy/controller/ProjectMemberMappingController.java @@ -17,6 +17,6 @@ import io.swagger.annotations.Api; @RestController @Api(tags = "项目人员映射表") @RequestMapping("/project-member-mapping-do") -public class ProjectMemberMappingController { +public class ProjectMemberMappingController { } diff --git a/src/main/java/com/subsidy/controller/WechatController.java b/src/main/java/com/subsidy/controller/WechatController.java new file mode 100644 index 0000000..616b1b4 --- /dev/null +++ b/src/main/java/com/subsidy/controller/WechatController.java @@ -0,0 +1,149 @@ +package com.subsidy.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.configure.RestTemplateConfig; +import com.subsidy.common.configure.WechatConfig; +import com.subsidy.dto.wechat.SignVO; +import com.subsidy.mapper.AccessTokenMapper; +import com.subsidy.mapper.MemberMapper; +import com.subsidy.model.AccessTokenDO; +import com.subsidy.model.MemberDO; +import com.subsidy.util.ConstantUtils; +import com.subsidy.util.JwtUtil; +import com.subsidy.util.Localstorage; +import com.subsidy.util.SecretUtils; +import com.subsidy.vo.administer.UserRoleVO; +import com.subsidy.vo.wechat.AccessToken; +import com.subsidy.vo.wechat.AuthenRequestVO; +import com.subsidy.vo.wechat.AuthenTokenVO; +import com.subsidy.vo.wechat.JsSdkVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +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 java.time.LocalDateTime; +import java.time.temporal.ChronoUnit; +import java.util.List; + +@RestController +@RequestMapping("/wechat") +@Api(tags = "微信授权") +public class WechatController { + + @Autowired + private RestTemplateConfig restTemplateConfig; + + @Autowired + private WechatConfig wechatConfig; + + @Autowired + private AccessTokenMapper accessTokenMapper; + + @Autowired + private MemberMapper memberMapper; + + @PostMapping("/getJsapiTicket") + @ApiOperation("通过token请求获得jsapi_ticket {url}") + public ResponseVO getJsapiTicket(@RequestBody SignVO signVO) { + + List accessTokens = accessTokenMapper.selectList(null); + + String accessToken = ""; + if (accessTokens.size() == 0) { + String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + wechatConfig.getAppId() + "&secret=" + wechatConfig.getAppSecret(); + ResponseEntity response = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.GET, null, AccessToken.class); + accessToken = response.getBody().getAccess_token(); + AccessTokenDO accessToken1 = new AccessTokenDO(); + accessToken1.setAccessToken(accessToken); + accessTokenMapper.insert(accessToken1); + } else { + AccessTokenDO accessToken1 = accessTokens.get(0); + long diff = ChronoUnit.SECONDS.between(accessToken1.getCreateDate(), LocalDateTime.now()); + if (diff >= 2 * 60 * 60 * 1000 - 5 * 1000) { + String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + wechatConfig.getAppId() + "&secret=" + wechatConfig.getAppSecret(); + ResponseEntity response = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.GET, null, AccessToken.class); + accessToken = response.getBody().getAccess_token(); +// AccessToken accessToken2= new AccessToken(); + accessToken1.setAccessToken(accessToken); + accessTokenMapper.updateById(accessToken1); + } else { + accessToken = accessToken1.getAccessToken(); + } + } + signVO.setAccess_token(accessToken); + + String url1 = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=" + accessToken + "&type=jsapi"; + ResponseEntity response1 = restTemplateConfig.restTemplate() + .exchange(url1, HttpMethod.GET, null, JsSdkVO.class); + String ticket = response1.getBody().getTicket(); + signVO.setJsapi_ticket(ticket); + signVO.setNoncestr("1rtgtafNdHhxADMD"); + signVO.setTimestamp(String.valueOf(System.currentTimeMillis())); + String signStr = "jsapi_ticket=" + signVO.getJsapi_ticket() + "&noncestr=" + signVO.getNoncestr() + "×tamp=" + signVO.getTimestamp() + + "&url=" + signVO.getUrl(); + + signVO.setSign(SecretUtils.getSHAString(signStr)); + return ResponseData.generateCreatedResponse(0, signVO); + } + + + @PostMapping("/webAuthen") + @ApiOperation("网页授权 通过code换取身份信息 {code phone 手机号}") + public ResponseVO webAuthen(@RequestBody AuthenRequestVO authenRequestVO) { + + String url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + wechatConfig.getAppId() + "&secret=" + + wechatConfig.getAppSecret() + "&code=" + authenRequestVO.getCode() + "&grant_type=authorization_code"; + ResponseEntity response = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.GET, null, AuthenTokenVO.class); + AuthenTokenVO authenTokenVO = response.getBody(); + + + //通过openId从库里查询 + MemberDO memberDO = memberMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MemberDO::getOpenId, authenTokenVO.getOpenid())); + + if (null == memberDO) { + UserRoleVO userRoleVO = new UserRoleVO(); + + String url1 = "https://api.weixin.qq.com/sns/userinfo?access_token=" + authenTokenVO.getAccess_token() + "&openid=" + authenTokenVO.getOpenid() + "&lang=zh_CN"; + ResponseEntity response1 = restTemplateConfig.restTemplate() + .exchange(url1, HttpMethod.GET, null, AuthenTokenVO.class); + userRoleVO.setOpenId(response1.getBody().getOpenid()); + userRoleVO.setOpenIdFlag(false); + return ResponseData.generateCreatedResponse(0, userRoleVO); + } else { + //该openId已存在,查出该用户的角色信息 + UserRoleVO userRoleVO = new UserRoleVO(); + + String token = JwtUtil.generateToken(memberDO.getId(), ConstantUtils.MOBILE_TERMINATE); + Localstorage.setUser(memberDO); + userRoleVO.setToken(token); + BeanUtils.copyProperties(memberDO, userRoleVO); + userRoleVO.setOpenIdFlag(true); + userRoleVO.setOpenId(authenRequestVO.getOpenId()); + return ResponseData.generateCreatedResponse(0, userRoleVO); + } + } + + public static void main(String[] args) throws Exception { + LocalDateTime now1 = LocalDateTime.now(); + Thread.sleep(2560); + LocalDateTime now2 = LocalDateTime.now(); + System.out.println(ChronoUnit.SECONDS.between(now1, now2)); + + } + +} diff --git a/src/main/java/com/subsidy/dto/administer/VerifyCodeDTO.java b/src/main/java/com/subsidy/dto/administer/VerifyCodeDTO.java index 2d3dd68..c3ec04b 100644 --- a/src/main/java/com/subsidy/dto/administer/VerifyCodeDTO.java +++ b/src/main/java/com/subsidy/dto/administer/VerifyCodeDTO.java @@ -8,4 +8,6 @@ public class VerifyCodeDTO { private String telephone; private String verifyCode; + + private String openId; } diff --git a/src/main/java/com/subsidy/dto/labor/SalaryListSumDTO.java b/src/main/java/com/subsidy/dto/labor/SalaryListSumDTO.java index 91b7ab3..fb404a0 100644 --- a/src/main/java/com/subsidy/dto/labor/SalaryListSumDTO.java +++ b/src/main/java/com/subsidy/dto/labor/SalaryListSumDTO.java @@ -7,7 +7,7 @@ public class SalaryListSumDTO { private Long memberId; - private Long projectId; + private Long projectMappingId; private Integer pageSize; diff --git a/src/main/java/com/subsidy/dto/wechat/SignVO.java b/src/main/java/com/subsidy/dto/wechat/SignVO.java new file mode 100644 index 0000000..86d97f0 --- /dev/null +++ b/src/main/java/com/subsidy/dto/wechat/SignVO.java @@ -0,0 +1,22 @@ +package com.subsidy.dto.wechat; + + +import lombok.Data; + +@Data +public class SignVO { + + private String access_token; + + private String noncestr; + + private String jsapi_ticket; + + private String timestamp; + + private String url; + + private String sign; + + private String code; +} diff --git a/src/main/java/com/subsidy/mapper/AdministerProjectMappingMapper.java b/src/main/java/com/subsidy/mapper/AccessTokenMapper.java similarity index 70% rename from src/main/java/com/subsidy/mapper/AdministerProjectMappingMapper.java rename to src/main/java/com/subsidy/mapper/AccessTokenMapper.java index 2d70e80..a855e8d 100644 --- a/src/main/java/com/subsidy/mapper/AdministerProjectMappingMapper.java +++ b/src/main/java/com/subsidy/mapper/AccessTokenMapper.java @@ -1,18 +1,18 @@ package com.subsidy.mapper; -import com.subsidy.model.AdministerProjectMappingDO; +import com.subsidy.model.AccessTokenDO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; /** *

- * 管理员-项目映射表 Mapper 接口 + * Mapper 接口 *

* * @author Tuyp - * @since 2024-07-18 + * @since 2024-08-09 */ @Repository -public interface AdministerProjectMappingMapper extends BaseMapper { +public interface AccessTokenMapper extends BaseMapper { } diff --git a/src/main/java/com/subsidy/mapper/ProjectSalaryHistoryMapper.java b/src/main/java/com/subsidy/mapper/ProjectSalaryHistoryMapper.java index 49ce75d..98f6272 100644 --- a/src/main/java/com/subsidy/mapper/ProjectSalaryHistoryMapper.java +++ b/src/main/java/com/subsidy/mapper/ProjectSalaryHistoryMapper.java @@ -18,7 +18,7 @@ import org.springframework.stereotype.Repository; @Repository public interface ProjectSalaryHistoryMapper extends BaseMapper { - SalaryListSumVO salaryCount(Long project, Long memberId); + SalaryListSumVO salaryCount(Long projectId, Long memberId); IPage salaryList(IPage page, Long projectId, Long memberId); diff --git a/src/main/java/com/subsidy/model/AdministerProjectMappingDO.java b/src/main/java/com/subsidy/model/AccessTokenDO.java similarity index 73% rename from src/main/java/com/subsidy/model/AdministerProjectMappingDO.java rename to src/main/java/com/subsidy/model/AccessTokenDO.java index f0d71df..927d5de 100644 --- a/src/main/java/com/subsidy/model/AdministerProjectMappingDO.java +++ b/src/main/java/com/subsidy/model/AccessTokenDO.java @@ -9,25 +9,23 @@ import lombok.EqualsAndHashCode; /** *

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

* * @author Tuyp - * @since 2024-07-18 + * @since 2024-08-09 */ @Data @EqualsAndHashCode(callSuper = true) -@TableName("administer_project_mapping") -public class AdministerProjectMappingDO extends BaseModel { +@TableName("access_token") +public class AccessTokenDO extends BaseModel { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) - private Long id; + private Integer id; - private Long administerId; - - private Long projectId; + private String accessToken; } diff --git a/src/main/java/com/subsidy/model/ProjectMemberMappingDO.java b/src/main/java/com/subsidy/model/ProjectMemberMappingDO.java index 5d23f54..7adb906 100644 --- a/src/main/java/com/subsidy/model/ProjectMemberMappingDO.java +++ b/src/main/java/com/subsidy/model/ProjectMemberMappingDO.java @@ -41,6 +41,11 @@ public class ProjectMemberMappingDO extends BaseModel { private String jobName; /** + * 工资 + */ + private String salary; + + /** * 排序 */ private Integer orderNo; diff --git a/src/main/java/com/subsidy/model/ProjectSalaryHistoryDO.java b/src/main/java/com/subsidy/model/ProjectSalaryHistoryDO.java index b41d198..7cf5d25 100644 --- a/src/main/java/com/subsidy/model/ProjectSalaryHistoryDO.java +++ b/src/main/java/com/subsidy/model/ProjectSalaryHistoryDO.java @@ -33,7 +33,7 @@ public class ProjectSalaryHistoryDO extends BaseModel { /** * 项目id */ - private Long projectId; + private Long projectMappingId; /** * 工资 @@ -46,6 +46,16 @@ public class ProjectSalaryHistoryDO extends BaseModel { private String salaryMark; /** + * 发放时间 + */ + private String salaryDate; + + /** + * 几月工资 + */ + private String salaryMonth; + + /** * 开户行 */ private String bank; @@ -55,5 +65,10 @@ public class ProjectSalaryHistoryDO extends BaseModel { */ private String payrollAccount; + /** + * 提交状态 1已提交 - 0未提交 + */ + private Integer commitStatus; + } diff --git a/src/main/java/com/subsidy/service/AdministerProjectMappingService.java b/src/main/java/com/subsidy/service/AccessTokenService.java similarity index 66% rename from src/main/java/com/subsidy/service/AdministerProjectMappingService.java rename to src/main/java/com/subsidy/service/AccessTokenService.java index def4fd7..54e464d 100644 --- a/src/main/java/com/subsidy/service/AdministerProjectMappingService.java +++ b/src/main/java/com/subsidy/service/AccessTokenService.java @@ -1,16 +1,16 @@ package com.subsidy.service; -import com.subsidy.model.AdministerProjectMappingDO; +import com.subsidy.model.AccessTokenDO; import com.baomidou.mybatisplus.extension.service.IService; /** *

- * 管理员-项目映射表 服务类 + * 服务类 *

* * @author Tuyp - * @since 2024-07-18 + * @since 2024-08-09 */ -public interface AdministerProjectMappingService extends IService { +public interface AccessTokenService extends IService { } diff --git a/src/main/java/com/subsidy/service/ProjectService.java b/src/main/java/com/subsidy/service/ProjectService.java index f2727a3..864a6d4 100644 --- a/src/main/java/com/subsidy/service/ProjectService.java +++ b/src/main/java/com/subsidy/service/ProjectService.java @@ -24,6 +24,8 @@ public interface ProjectService extends IService { String sendSms(MemberDO memberDO); + String sendNewSms(MemberDO memberDO); + UserRoleVO login(VerifyCodeDTO verifyCodeDTO); CurrentProjectVO currentProject(MemberDO memberDO); @@ -42,4 +44,6 @@ public interface ProjectService extends IService { IPage salaryList(SalaryListSumDTO salaryListSumDTO); + void updateUserInfo(MemberDO memberDO); + } diff --git a/src/main/java/com/subsidy/service/impl/AdministerProjectMappingServiceImpl.java b/src/main/java/com/subsidy/service/impl/AccessTokenServiceImpl.java similarity index 59% rename from src/main/java/com/subsidy/service/impl/AdministerProjectMappingServiceImpl.java rename to src/main/java/com/subsidy/service/impl/AccessTokenServiceImpl.java index 92338bb..e6a1c10 100644 --- a/src/main/java/com/subsidy/service/impl/AdministerProjectMappingServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/AccessTokenServiceImpl.java @@ -1,20 +1,20 @@ package com.subsidy.service.impl; -import com.subsidy.model.AdministerProjectMappingDO; -import com.subsidy.mapper.AdministerProjectMappingMapper; -import com.subsidy.service.AdministerProjectMappingService; +import com.subsidy.model.AccessTokenDO; +import com.subsidy.mapper.AccessTokenMapper; +import com.subsidy.service.AccessTokenService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** *

- * 管理员-项目映射表 服务实现类 + * 服务实现类 *

* * @author Tuyp - * @since 2024-07-18 + * @since 2024-08-09 */ @Service -public class AdministerProjectMappingServiceImpl extends ServiceImpl implements AdministerProjectMappingService { +public class AccessTokenServiceImpl extends ServiceImpl implements AccessTokenService { } diff --git a/src/main/java/com/subsidy/service/impl/ProjectServiceImpl.java b/src/main/java/com/subsidy/service/impl/ProjectServiceImpl.java index 5d866ad..b94e0e1 100644 --- a/src/main/java/com/subsidy/service/impl/ProjectServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ProjectServiceImpl.java @@ -74,6 +74,32 @@ public class ProjectServiceImpl extends ServiceImpl im return ConstantUtils.SUCCESS_SEND_OUT; } + + public String sendNewSms(MemberDO memberDO) { + + int count = memberMapper.selectCount(new QueryWrapper() + .lambda() + .eq(MemberDO::getTelephone, memberDO.getTelephone()) + .eq(MemberDO::getMemberType, 3)); + + if (count > 0) { + throw new HttpException(10027); + } + + 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(); @@ -100,6 +126,11 @@ public class ProjectServiceImpl extends ServiceImpl im userRoleVO.setToken(token); BeanUtils.copyProperties(memberDO, userRoleVO); + if (null != verifyCodeDTO.getOpenId()){ + memberDO.setOpenId(verifyCodeDTO.getOpenId()); + memberMapper.updateById(memberDO); + } + return userRoleVO; } @@ -111,6 +142,8 @@ public class ProjectServiceImpl extends ServiceImpl im return projectMemberMappingMapper.historyProjects(memberDO.getId()); } + + public String verify(VerifyCodeDTO verifyCodeDTO) { SmsVerifyCodeDO smsCodeDO = smsVerifyCodeMapper.selectOne(new QueryWrapper() @@ -163,13 +196,20 @@ public class ProjectServiceImpl extends ServiceImpl im } public SalaryListSumVO salaryListSum(SalaryListSumDTO salaryListSumDTO) { - return projectSalaryHistoryMapper.salaryCount(salaryListSumDTO.getProjectId(), salaryListSumDTO.getMemberId()); + return projectSalaryHistoryMapper.salaryCount(salaryListSumDTO.getProjectMappingId(), salaryListSumDTO.getMemberId()); } public IPage salaryList(SalaryListSumDTO salaryListSumDTO) { Page page = new Page(salaryListSumDTO.getPageNum(), salaryListSumDTO.getPageSize()); - return projectSalaryHistoryMapper.salaryList(page, salaryListSumDTO.getProjectId(), salaryListSumDTO.getMemberId()); + return projectSalaryHistoryMapper.salaryList(page, salaryListSumDTO.getProjectMappingId(), salaryListSumDTO.getMemberId()); } + public void updateUserInfo(MemberDO memberDO) { + + MemberDO memberDO1 = memberMapper.selectById(memberDO.getId()); + BeanUtils.copyProperties(memberDO,memberDO1); + memberMapper.updateById(memberDO); + + } } diff --git a/src/main/java/com/subsidy/util/SMSUtils.java b/src/main/java/com/subsidy/util/SMSUtils.java index 2ef8917..419907b 100644 --- a/src/main/java/com/subsidy/util/SMSUtils.java +++ b/src/main/java/com/subsidy/util/SMSUtils.java @@ -52,7 +52,7 @@ public class SMSUtils { //必填:短信签名-可在短信控制台中找到 request.setSignName("有课互联"); //必填:短信模板-可在短信控制台中找到 - request.setTemplateCode("SMS_190945394"); + request.setTemplateCode("SMS_229640297"); //可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 request.setTemplateParam("{\"code\":\""+ code +"\"}"); diff --git a/src/main/java/com/subsidy/vo/administer/UserRoleVO.java b/src/main/java/com/subsidy/vo/administer/UserRoleVO.java index c3a2110..04db66c 100644 --- a/src/main/java/com/subsidy/vo/administer/UserRoleVO.java +++ b/src/main/java/com/subsidy/vo/administer/UserRoleVO.java @@ -33,4 +33,10 @@ public class UserRoleVO { private String superviseName; + private Boolean checkStatus; + + private String openId; + + private Boolean openIdFlag; + } diff --git a/src/main/java/com/subsidy/vo/labor/SalaryListVO.java b/src/main/java/com/subsidy/vo/labor/SalaryListVO.java index f349fc2..765fe20 100644 --- a/src/main/java/com/subsidy/vo/labor/SalaryListVO.java +++ b/src/main/java/com/subsidy/vo/labor/SalaryListVO.java @@ -13,7 +13,7 @@ public class SalaryListVO { private String salaryMark; - private String createDate; + private String salaryDate; private String payrollAccount; diff --git a/src/main/java/com/subsidy/vo/wechat/AccessToken.java b/src/main/java/com/subsidy/vo/wechat/AccessToken.java new file mode 100644 index 0000000..d03fce8 --- /dev/null +++ b/src/main/java/com/subsidy/vo/wechat/AccessToken.java @@ -0,0 +1,12 @@ +package com.subsidy.vo.wechat; + +import lombok.Data; + +@Data +public class AccessToken { + + private String access_token; + + private String expires_in; + +} diff --git a/src/main/java/com/subsidy/vo/wechat/AuthenRequestVO.java b/src/main/java/com/subsidy/vo/wechat/AuthenRequestVO.java new file mode 100644 index 0000000..c48f389 --- /dev/null +++ b/src/main/java/com/subsidy/vo/wechat/AuthenRequestVO.java @@ -0,0 +1,15 @@ +package com.subsidy.vo.wechat; + + +import lombok.Data; + +@Data +public class AuthenRequestVO { + + private String code; + +// private String phone; + + private String openId; + +} diff --git a/src/main/java/com/subsidy/vo/wechat/AuthenTokenVO.java b/src/main/java/com/subsidy/vo/wechat/AuthenTokenVO.java new file mode 100644 index 0000000..978bcf0 --- /dev/null +++ b/src/main/java/com/subsidy/vo/wechat/AuthenTokenVO.java @@ -0,0 +1,30 @@ +package com.subsidy.vo.wechat; + + +import lombok.Data; + +@Data +public class AuthenTokenVO { + + private String access_token; + + private String openid; + + private String nickname; + + private String sex; + + private String province; + + private String city; + + private String country; + + private String headimgurl; + + private Object privilege; + + private String unionid; + + +} diff --git a/src/main/java/com/subsidy/vo/wechat/JsSdkVO.java b/src/main/java/com/subsidy/vo/wechat/JsSdkVO.java new file mode 100644 index 0000000..ab25cf4 --- /dev/null +++ b/src/main/java/com/subsidy/vo/wechat/JsSdkVO.java @@ -0,0 +1,17 @@ +package com.subsidy.vo.wechat; + +import lombok.Data; + +@Data +public class JsSdkVO { + + private String errcode; + + private String errmsg; + + private String ticket; + + private String expires_in; + + +} diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 5142509..53a4d49 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -1,5 +1,5 @@ # 本地环境配置 -spring.server.port=23507 +spring.server.port=23501 # 数据源配置 #spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 214c8e0..7755027 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -1,5 +1,5 @@ # 生产环境配置 -spring.server.port=23507 +spring.server.port=23501 # 数据源配置 spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 4e554b7..293c46b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,5 @@ # 环境配置 顶岗实习 -spring.profiles.active=dev +spring.profiles.active=prod #和CPU数 spring.server.acceptorThreadCount=600 spring.server.minSpareThreads=100 @@ -68,11 +68,11 @@ spring.quartz.overwrite-existing-jobs=false #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 - +#微信公众号 +wechat.appId=wx9e107b8f68c91a0c +wechat.appSecret= d772631f098ef7b597293c22899671e0 +wechat.msgUrl= t.youkehulian.cn +wechat.templateId= _zNcTG7euWQbsvK8f0gMjTcNaXx3gBsDautnmuaLURA #保利威视 polyv.userId=b8f2d3bfdc polyv.appId=g3lrxnzd75 diff --git a/src/main/resources/mapper/AdministerProjectMappingMapper.xml b/src/main/resources/mapper/AccessTokenMapper.xml similarity index 76% rename from src/main/resources/mapper/AdministerProjectMappingMapper.xml rename to src/main/resources/mapper/AccessTokenMapper.xml index c88b840..a908e63 100644 --- a/src/main/resources/mapper/AdministerProjectMappingMapper.xml +++ b/src/main/resources/mapper/AccessTokenMapper.xml @@ -1,15 +1,14 @@ - + - + - - + @@ -17,7 +16,7 @@ create_date, update_date, delete_date, - id, administer_id, project_id + id, access_token diff --git a/src/main/resources/mapper/ProjectMemberMappingMapper.xml b/src/main/resources/mapper/ProjectMemberMappingMapper.xml index a0ad3ca..1d4d28e 100644 --- a/src/main/resources/mapper/ProjectMemberMappingMapper.xml +++ b/src/main/resources/mapper/ProjectMemberMappingMapper.xml @@ -18,6 +18,8 @@ AND t3.delete_date IS NULL and t.member_id = #{memberId} and t.status = 1 + order by t.create_date desc + limit 1 SELECT count( 1 ) cnt, - sum( t.salary ) AS salary + round(sum( t.salary ),2) AS salary FROM project_salary_history t WHERE t.delete_date IS NULL - AND t.project_id = #{projectId} + AND t.project_mapping_id = #{projectId} AND t.member_id = #{memberId} + and t.commit_status = 1