diff --git a/.idea/misc.xml b/.idea/misc.xml
index e4e2ad7..df00c07 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -7,9 +7,8 @@
-
-
+
\ No newline at end of file
diff --git a/logs/dev-sky-serve-redis/spring.log b/logs/dev-sky-serve-redis/spring.log
new file mode 100644
index 0000000..0bf3741
--- /dev/null
+++ b/logs/dev-sky-serve-redis/spring.log
@@ -0,0 +1,168 @@
+20:07:50:028 INFO 4012 --- [main] com.sky.SkyApplication : Starting SkyApplication using Java 17.0.9 on bunny with PID 4012 (G:\File\Java\sky\dev-sky-serve-redis\sky-server\target\classes started by 13199 in G:\File\Java\sky\dev-sky-serve-redis)
+20:07:50:028 INFO 4012 --- [main] com.sky.SkyApplication : The following 1 profile is active: "dev"
+20:07:50:397 INFO 4012 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
+20:07:50:398 INFO 4012 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
+20:07:50:413 INFO 4012 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 8 ms. Found 0 Redis repository interfaces.
+20:07:50:728 INFO 4012 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
+20:07:50:732 INFO 4012 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
+20:07:50:732 INFO 4012 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.65]
+20:07:50:786 INFO 4012 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
+20:07:50:787 INFO 4012 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 738 ms
+20:07:50:842 INFO 4012 --- [main] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
+20:07:50:892 INFO 4012 --- [main] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} inited
+20:07:51:289 INFO 4012 --- [main] c.s.c.config.RestTemplateConfiguration : 注入restTemplate
+20:07:51:370 INFO 4012 --- [main] c.sky.common.config.WebMvcConfiguration : 开始注册自定义拦截器...
+20:07:51:415 INFO 4012 --- [main] c.s.common.config.Knife4jConfiguration : A管理端接口
+20:07:51:417 INFO 4012 --- [main] c.s.common.config.Knife4jConfiguration : B用户端接口
+20:07:51:418 INFO 4012 --- [main] c.s.common.config.Knife4jConfiguration : Pay支付接口
+20:07:51:438 INFO 4012 --- [main] c.sky.common.config.WebMvcConfiguration : 扩展消息转换器...
+20:07:51:441 INFO 4012 --- [main] c.s.common.config.ResourceConfiguration : 设置静态资源映射
+20:07:51:482 INFO 4012 --- [main] c.s.c.config.WebSocketConfiguration : WebSocket配置类,用于注册WebSocket的Bean
+20:07:51:647 INFO 4012 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
+20:07:51:909 INFO 4012 --- [main] com.sky.SkyApplication : Started SkyApplication in 2.064 seconds (JVM running for 4.815)
+20:08:00:005 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:08:00.005316300
+20:08:00:217 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:08:00:228 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T19:53:00.006335900(LocalDateTime)
+20:08:00:257 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:09:00:011 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:09:00.011285800
+20:09:00:011 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:09:00:011 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T19:54:00.011285800(LocalDateTime)
+20:09:00:030 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:10:00:012 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:10:00.012449100
+20:10:00:012 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:10:00:012 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T19:55:00.012449100(LocalDateTime)
+20:10:00:031 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:11:00:011 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:11:00.011231700
+20:11:00:011 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:11:00:011 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T19:56:00.011231700(LocalDateTime)
+20:11:00:029 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:12:00:007 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:12:00.007093300
+20:12:00:007 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:12:00:007 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T19:57:00.007093300(LocalDateTime)
+20:12:00:025 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:13:00:005 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:13:00.005966400
+20:13:00:005 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:13:00:005 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T19:58:00.005966400(LocalDateTime)
+20:13:00:024 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:14:00:015 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:14:00.015365500
+20:14:00:015 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:14:00:015 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T19:59:00.015365500(LocalDateTime)
+20:14:00:034 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:15:00:008 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:15:00.008461900
+20:15:00:008 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:15:00:008 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:00:00.008461900(LocalDateTime)
+20:15:00:027 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:16:00:009 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:16:00.009138
+20:16:00:009 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:16:00:009 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:01:00.009138(LocalDateTime)
+20:16:00:028 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:17:00:009 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:17:00.009477200
+20:17:00:009 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:17:00:009 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:02:00.009477200(LocalDateTime)
+20:17:00:028 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:18:00:010 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:18:00.010387100
+20:18:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:18:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:03:00.010387100(LocalDateTime)
+20:18:00:029 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:19:00:009 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:19:00.009303
+20:19:00:009 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:19:00:009 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:04:00.009303(LocalDateTime)
+20:19:00:028 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:20:00:010 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:20:00.010432700
+20:20:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:20:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:05:00.010432700(LocalDateTime)
+20:20:00:029 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:21:00:007 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:21:00.007943700
+20:21:00:007 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:21:00:007 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:06:00.007943700(LocalDateTime)
+20:21:00:026 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:22:00:010 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:22:00.010535
+20:22:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:22:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:07:00.010535(LocalDateTime)
+20:22:00:029 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:23:00:009 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:23:00.009473500
+20:23:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:23:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:08:00.009473500(LocalDateTime)
+20:23:00:030 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:24:00:013 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:24:00.013380300
+20:24:00:013 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:24:00:013 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:09:00.013380300(LocalDateTime)
+20:24:00:032 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:25:00:011 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:25:00.011129600
+20:25:00:011 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:25:00:011 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:10:00.011129600(LocalDateTime)
+20:25:00:031 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:26:00:009 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:26:00.009704600
+20:26:00:009 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:26:00:009 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:11:00.009704600(LocalDateTime)
+20:26:00:028 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:27:00:007 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:27:00.007626700
+20:27:00:007 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:27:00:007 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:12:00.007626700(LocalDateTime)
+20:27:00:025 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:28:00:011 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:28:00.011912600
+20:28:00:011 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:28:00:011 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:13:00.011912600(LocalDateTime)
+20:28:00:031 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:29:00:010 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:29:00.010434600
+20:29:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:29:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:14:00.010434600(LocalDateTime)
+20:29:00:028 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:30:00:009 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:30:00.009411800
+20:30:00:009 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:30:00:009 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:15:00.009411800(LocalDateTime)
+20:30:00:028 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:31:00:007 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:31:00.007487200
+20:31:00:007 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:31:00:007 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:16:00.007487200(LocalDateTime)
+20:31:00:026 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:32:00:006 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:32:00.006591100
+20:32:00:006 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:32:00:007 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:17:00.006591100(LocalDateTime)
+20:32:00:027 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:33:00:010 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:33:00.010864700
+20:33:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:33:00:010 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:18:00.010864700(LocalDateTime)
+20:33:00:029 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:34:00:005 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:34:00.005313700
+20:34:00:005 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:34:00:005 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:19:00.005313700(LocalDateTime)
+20:34:00:024 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:35:00:015 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:35:00.015687700
+20:35:00:015 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:35:00:015 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:20:00.015687700(LocalDateTime)
+20:35:00:034 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:36:00:003 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:36:00.003420100
+20:36:00:003 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:36:00:003 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:21:00.003420100(LocalDateTime)
+20:36:00:022 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:37:00:008 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:37:00.008997600
+20:37:00:008 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:37:00:008 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:22:00.008997600(LocalDateTime)
+20:37:00:027 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:38:00:015 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:38:00.015576700
+20:38:00:015 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:38:00:015 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:23:00.015576700(LocalDateTime)
+20:38:00:033 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:39:00:001 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:39:00.001910700
+20:39:00:001 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:39:00:001 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:24:00.001910700(LocalDateTime)
+20:39:00:019 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:40:00:013 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:40:00.013081700
+20:40:00:013 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:40:00:013 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:25:00.013081700(LocalDateTime)
+20:40:00:048 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:41:00:005 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:41:00.005481400
+20:41:00:005 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:41:00:005 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:26:00.005481400(LocalDateTime)
+20:41:00:024 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:42:00:015 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:42:00.015343500
+20:42:00:015 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:42:00:015 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:27:00.015343500(LocalDateTime)
+20:42:00:034 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:43:00:005 INFO 4012 --- [scheduling-1] com.sky.task.OrderTask : 定时处理超时订单:2024-03-18T20:43:00.005726200
+20:43:00:005 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Preparing: select * from orders where status = ? and order_time < ?;
+20:43:00:005 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : ==> Parameters: 1(Integer), 2024-03-18T20:28:00.005726200(LocalDateTime)
+20:43:00:024 DEBUG 4012 --- [scheduling-1] c.s.m.O.getByStatusAndOrderTime : <== Total: 0
+20:43:27:844 INFO 4012 --- [SpringApplicationShutdownHook] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closing ...
+20:43:27:847 INFO 4012 --- [SpringApplicationShutdownHook] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed
diff --git a/pom.xml b/pom.xml
index 210ed53..6902403 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,12 +17,11 @@
sky-common
sky-pojo
sky-server
- sky-server
- 8
- 8
+ 17
+ 17
2.2.0
1.18.20
1.2.76
diff --git a/sky-common/src/main/java/com/sky/common/config/RedisConfiguration.java b/sky-common/src/main/java/com/sky/common/config/RedisConfiguration.java
index fe0a4bd..df08146 100644
--- a/sky-common/src/main/java/com/sky/common/config/RedisConfiguration.java
+++ b/sky-common/src/main/java/com/sky/common/config/RedisConfiguration.java
@@ -35,8 +35,8 @@ public class RedisConfiguration {
* 使用StringRedisSerializer序列化为字符串
*/
@Bean
- public RedisTemplate redisTemplate(LettuceConnectionFactory connectionFactory) {
- RedisTemplate redisTemplate = new RedisTemplate();
+ public RedisTemplate redisTemplate(LettuceConnectionFactory connectionFactory) {
+ RedisTemplate redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(connectionFactory);
// 设置key序列化为string
redisTemplate.setKeySerializer(new StringRedisSerializer());
diff --git a/sky-common/src/main/java/com/sky/common/config/ResourceConfiguration.java b/sky-common/src/main/java/com/sky/common/config/ResourceConfiguration.java
new file mode 100644
index 0000000..5e16ca9
--- /dev/null
+++ b/sky-common/src/main/java/com/sky/common/config/ResourceConfiguration.java
@@ -0,0 +1,15 @@
+package com.sky.common.config;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+
+@Configuration
+@Slf4j
+public class ResourceConfiguration extends WebMvcConfiguration {
+ protected void addResourceHandlers(ResourceHandlerRegistry registry) {
+ log.info("设置静态资源映射");
+ registry.addResourceHandler("/doc.html").addResourceLocations("classpath:/META-INF/resources/");
+ registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
+ }
+}
diff --git a/sky-common/src/main/java/com/sky/common/config/WebMvcConfiguration.java b/sky-common/src/main/java/com/sky/common/config/WebMvcConfiguration.java
index 372e0c5..3c9e1e2 100644
--- a/sky-common/src/main/java/com/sky/common/config/WebMvcConfiguration.java
+++ b/sky-common/src/main/java/com/sky/common/config/WebMvcConfiguration.java
@@ -1,15 +1,14 @@
package com.sky.common.config;
-import com.fasterxml.jackson.databind.ObjectMapper;
import com.sky.common.interceptor.JwtTokenUserInterceptor;
import com.sky.common.interceptor.RedisTokenAdminInterceptor;
+import com.sky.common.json.JacksonObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import java.util.List;
@@ -46,14 +45,8 @@ public class WebMvcConfiguration extends WebMvcConfigurationSupport {
// 创建一个消息转换器对象
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
// 需要为消息转换器设置一个对象转换器,对象转换器可以将Java对象序列化为json数据
- converter.setObjectMapper(new ObjectMapper());
+ converter.setObjectMapper(new JacksonObjectMapper());
// 将自己的消息转化器加入容器中
converters.add(0, converter);
}
-
- protected void addResourceHandlers(ResourceHandlerRegistry registry) {
- log.info("设置静态资源映射");
- registry.addResourceHandler("/doc.html").addResourceLocations("classpath:/META-INF/resources/");
- registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
- }
}
diff --git a/sky-common/src/main/java/com/sky/common/constant/MessageConstant.java b/sky-common/src/main/java/com/sky/common/constant/MessageConstant.java
index 4de3167..4dd5134 100644
--- a/sky-common/src/main/java/com/sky/common/constant/MessageConstant.java
+++ b/sky-common/src/main/java/com/sky/common/constant/MessageConstant.java
@@ -11,6 +11,7 @@ public class MessageConstant {
public static final String ACCOUNT_LOCKED = "账号被锁定";
public static final String UNKNOWN_ERROR = "未知错误";
public static final String USER_NOT_LOGIN = "用户未登录";
+ public static final String USER_TOKEN_OUT_OF_DATE = "用户登录过期";
public static final String CATEGORY_BE_RELATED_BY_SETMEAL = "当前分类关联了套餐,不能删除";
public static final String CATEGORY_BE_RELATED_BY_DISH = "当前分类关联了菜品,不能删除";
public static final String SHOPPING_CART_IS_NULL = "购物车数据为空,不能下单";
diff --git a/sky-common/src/main/java/com/sky/common/interceptor/RedisTokenAdminInterceptor.java b/sky-common/src/main/java/com/sky/common/interceptor/RedisTokenAdminInterceptor.java
index 69090f4..ec55150 100644
--- a/sky-common/src/main/java/com/sky/common/interceptor/RedisTokenAdminInterceptor.java
+++ b/sky-common/src/main/java/com/sky/common/interceptor/RedisTokenAdminInterceptor.java
@@ -1,5 +1,6 @@
package com.sky.common.interceptor;
+import com.sky.common.constant.MessageConstant;
import com.sky.common.context.BaseContext;
import com.sky.common.properties.RedisTokenProperties;
import com.sky.common.utils.InterceptorUtil;
@@ -11,7 +12,6 @@ import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
-import javax.security.auth.login.LoginException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@@ -24,7 +24,7 @@ public class RedisTokenAdminInterceptor implements HandlerInterceptor {
@Autowired
private RedisTemplate redisTemplate;
- public boolean preHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response, @NotNull Object handler) throws IOException, LoginException {
+ public boolean preHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response, @NotNull Object handler) throws IOException {
// 判断当前兰街道的是Controller的方法还是其它资源 拦截到的不是动态方法,直接放行
if (!(handler instanceof HandlerMethod)) return true;
@@ -37,12 +37,17 @@ public class RedisTokenAdminInterceptor implements HandlerInterceptor {
}
try {
- Long empId = (Long) redisTemplate.opsForValue().get(token);
+ Object empId = redisTemplate.opsForValue().get(token);
log.info("当前员工ID:{}", empId);
+ if (empId == null) {
+ InterceptorUtil.customLoginInterceptor(response, MessageConstant.USER_TOKEN_OUT_OF_DATE, "");
+ return false;
+ }
// 3. 通过放行
- BaseContext.setUserId(empId);
+ BaseContext.setUserId(Long.valueOf(empId.toString()));
return true;
} catch (Exception exception) {
+ InterceptorUtil.customLoginInterceptor(response, exception.getMessage(), "");
return false;
}
}
diff --git a/sky-common/src/main/java/com/sky/common/utils/InterceptorUtil.java b/sky-common/src/main/java/com/sky/common/utils/InterceptorUtil.java
index eb93468..9ed5986 100644
--- a/sky-common/src/main/java/com/sky/common/utils/InterceptorUtil.java
+++ b/sky-common/src/main/java/com/sky/common/utils/InterceptorUtil.java
@@ -1,6 +1,7 @@
package com.sky.common.utils;
import com.alibaba.fastjson.JSON;
+import com.sky.common.constant.MessageConstant;
import com.sky.common.result.Result;
import lombok.extern.slf4j.Slf4j;
@@ -16,26 +17,24 @@ public class InterceptorUtil {
*/
public static void unLoginInterceptor(HttpServletResponse response) throws IOException {
log.info("用户未登录");
- response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- response.setContentType("application/json");
- response.setCharacterEncoding("UTF-8");
- Result result = new Result<>();
- result.setCode(HttpServletResponse.SC_UNAUTHORIZED);
- result.setData("未登录");
- result.setMessage("请先登录");
- // 将消息写入响应体
- response.getWriter().write(JSON.toJSONString(result));
+ customLoginInterceptor(response, MessageConstant.USER_NOT_LOGIN, "");
}
- public static void otherLoginInterceptor(HttpServletResponse response) throws IOException {
- log.info("其它异常");
+ /**
+ * 构建用户登录失败
+ *
+ * @param response HttpServletResponse
+ * @param message 消息
+ * @param data 内容
+ */
+ public static void customLoginInterceptor(HttpServletResponse response, String message, String data) throws IOException {
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
response.setContentType("application/json");
response.setCharacterEncoding("UTF-8");
Result result = new Result<>();
result.setCode(HttpServletResponse.SC_UNAUTHORIZED);
- result.setData("未登录");
- result.setMessage("请先登录");
+ result.setData(data);
+ result.setMessage(message);
// 将消息写入响应体
response.getWriter().write(JSON.toJSONString(result));
}
diff --git a/sky-server/pom.xml b/sky-server/pom.xml
index c443207..bde36be 100644
--- a/sky-server/pom.xml
+++ b/sky-server/pom.xml
@@ -13,8 +13,6 @@
sky-server
jar
- 8
- 8
UTF-8
@@ -132,21 +130,4 @@
1.0-SNAPSHOT
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 15
- 15
-
-
-
-
\ No newline at end of file
diff --git a/sky-server/src/main/java/com/sky/controller/admin/ShopController.java b/sky-server/src/main/java/com/sky/controller/admin/ShopController.java
index dbffe9f..59d55b6 100644
--- a/sky-server/src/main/java/com/sky/controller/admin/ShopController.java
+++ b/sky-server/src/main/java/com/sky/controller/admin/ShopController.java
@@ -4,19 +4,19 @@ import com.sky.common.constant.MessageConstant;
import com.sky.common.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;
@RestController("adminShopController")
-@RequiredArgsConstructor
@RequestMapping("/admin/shop")
@Api(tags = "店铺相关接口")
@Slf4j
public class ShopController {
public static final String KEY = "SHOP_STATUS";
- private final RedisTemplate