优化统一响应结果,遗留三个TODO

This commit is contained in:
中青华年 2025-06-07 15:12:31 +08:00
parent 9dec34e158
commit 1168111cc5
8 changed files with 99 additions and 154 deletions

View File

@ -1,127 +1,65 @@
2025-04-21 17:06:00 [main] INFO com.yang.test.TestApplication - Starting TestApplication using Java 17.0.13 with PID 21100 (D:\project\Mbti\test\target\classes started by DENG in D:\project\Mbti\test)
2025-04-21 17:06:00 [main] DEBUG com.yang.test.TestApplication - Running with Spring Boot v3.4.4, Spring v6.2.5
2025-04-21 17:06:00 [main] INFO com.yang.test.TestApplication - No active profile set, falling back to 1 default profile: "default"
2025-04-21 17:06:01 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http)
2025-04-21 17:06:01 [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
2025-04-21 17:06:01 [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.39]
2025-04-21 17:06:01 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2025-04-21 17:06:01 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1111 ms
2025-04-21 17:06:01 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2025-04-21 17:06:06 [main] INFO com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@64518270
2025-04-21 17:06:06 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2025-04-21 17:06:07 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/'
2025-04-21 17:06:07 [main] INFO com.yang.test.TestApplication - Started TestApplication in 7.638 seconds (process running for 8.243)
2025-04-21 17:06:07 [main] INFO com.yang.test.TestApplication - MBTI测试系统启动成功! 服务运行在端口: 8080
2025-04-21 17:06:46 [http-nio-8080-exec-3] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
2025-04-21 17:06:46 [http-nio-8080-exec-3] INFO o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
2025-04-21 17:06:46 [http-nio-8080-exec-3] INFO o.s.web.servlet.DispatcherServlet - Completed initialization in 1 ms
2025-04-21 17:06:46 [http-nio-8080-exec-3] INFO c.y.test.controller.MbtiController - 开始获取题目, 测试ID: 1
2025-04-21 17:06:46 [http-nio-8080-exec-3] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Preparing: SELECT id, name FROM test WHERE id = ?
2025-04-21 17:06:46 [http-nio-8080-exec-3] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Parameters: 1(String)
2025-04-21 17:06:46 [http-nio-8080-exec-3] DEBUG c.y.t.mapper.MbtiMapper.getTestById - <== Total: 1
2025-04-21 17:06:46 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Preparing: SELECT id, name, type, ? as testId FROM question WHERE test_id = ? ORDER BY id
2025-04-21 17:06:46 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Parameters: 1(String), 1(String)
2025-04-21 17:06:46 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getQuestionsByTestId - <== Total: 93
2025-04-21 17:06:46 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Preparing: SELECT id, code, name, question_id as questionId, character_type as characterType FROM option_table WHERE question_id IN ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) ORDER BY question_id, id
2025-04-21 17:06:46 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Parameters: 1(Integer), 2(Integer), 3(Integer), 4(Integer), 5(Integer), 6(Integer), 7(Integer), 8(Integer), 9(Integer), 10(Integer), 11(Integer), 12(Integer), 13(Integer), 14(Integer), 15(Integer), 16(Integer), 17(Integer), 18(Integer), 19(Integer), 20(Integer), 21(Integer), 22(Integer), 23(Integer), 24(Integer), 25(Integer), 26(Integer), 27(Integer), 28(Integer), 29(Integer), 30(Integer), 31(Integer), 32(Integer), 33(Integer), 34(Integer), 35(Integer), 36(Integer), 37(Integer), 38(Integer), 39(Integer), 40(Integer), 41(Integer), 42(Integer), 43(Integer), 44(Integer), 45(Integer), 46(Integer), 47(Integer), 48(Integer), 49(Integer), 50(Integer), 51(Integer), 52(Integer), 53(Integer), 54(Integer), 55(Integer), 56(Integer), 57(Integer), 58(Integer), 59(Integer), 60(Integer), 61(Integer), 62(Integer), 63(Integer), 64(Integer), 65(Integer), 66(Integer), 67(Integer), 68(Integer), 69(Integer), 70(Integer), 71(Integer), 72(Integer), 73(Integer), 74(Integer), 75(Integer), 76(Integer), 77(Integer), 78(Integer), 79(Integer), 80(Integer), 81(Integer), 82(Integer), 83(Integer), 84(Integer), 85(Integer), 86(Integer), 87(Integer), 88(Integer), 89(Integer), 90(Integer), 91(Integer), 92(Integer), 93(Integer)
2025-04-21 17:06:46 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getOptionsByQuestionIds - <== Total: 186
2025-04-21 17:06:46 [http-nio-8080-exec-3] INFO c.y.test.controller.MbtiController - 获取题目完成, 测试ID: 1, 题目数量: 93, 总耗时: PT0.3134364S
2025-04-21 17:10:28 [http-nio-8080-exec-6] INFO c.y.test.controller.MbtiController - 开始获取题目, 测试ID: 1
2025-04-21 17:10:28 [http-nio-8080-exec-6] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Preparing: SELECT id, name FROM test WHERE id = ?
2025-04-21 17:10:28 [http-nio-8080-exec-6] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Parameters: 1(String)
2025-04-21 17:10:29 [http-nio-8080-exec-6] DEBUG c.y.t.mapper.MbtiMapper.getTestById - <== Total: 1
2025-04-21 17:10:29 [http-nio-8080-exec-6] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Preparing: SELECT id, name, type, ? as testId FROM question WHERE test_id = ? ORDER BY id
2025-04-21 17:10:29 [http-nio-8080-exec-6] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Parameters: 1(String), 1(String)
2025-04-21 17:10:29 [http-nio-8080-exec-6] DEBUG c.y.t.m.M.getQuestionsByTestId - <== Total: 93
2025-04-21 17:10:29 [http-nio-8080-exec-6] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Preparing: SELECT id, code, name, question_id as questionId, character_type as characterType FROM option_table WHERE question_id IN ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) ORDER BY question_id, id
2025-04-21 17:10:29 [http-nio-8080-exec-6] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Parameters: 1(Integer), 2(Integer), 3(Integer), 4(Integer), 5(Integer), 6(Integer), 7(Integer), 8(Integer), 9(Integer), 10(Integer), 11(Integer), 12(Integer), 13(Integer), 14(Integer), 15(Integer), 16(Integer), 17(Integer), 18(Integer), 19(Integer), 20(Integer), 21(Integer), 22(Integer), 23(Integer), 24(Integer), 25(Integer), 26(Integer), 27(Integer), 28(Integer), 29(Integer), 30(Integer), 31(Integer), 32(Integer), 33(Integer), 34(Integer), 35(Integer), 36(Integer), 37(Integer), 38(Integer), 39(Integer), 40(Integer), 41(Integer), 42(Integer), 43(Integer), 44(Integer), 45(Integer), 46(Integer), 47(Integer), 48(Integer), 49(Integer), 50(Integer), 51(Integer), 52(Integer), 53(Integer), 54(Integer), 55(Integer), 56(Integer), 57(Integer), 58(Integer), 59(Integer), 60(Integer), 61(Integer), 62(Integer), 63(Integer), 64(Integer), 65(Integer), 66(Integer), 67(Integer), 68(Integer), 69(Integer), 70(Integer), 71(Integer), 72(Integer), 73(Integer), 74(Integer), 75(Integer), 76(Integer), 77(Integer), 78(Integer), 79(Integer), 80(Integer), 81(Integer), 82(Integer), 83(Integer), 84(Integer), 85(Integer), 86(Integer), 87(Integer), 88(Integer), 89(Integer), 90(Integer), 91(Integer), 92(Integer), 93(Integer)
2025-04-21 17:10:29 [http-nio-8080-exec-6] DEBUG c.y.t.m.M.getOptionsByQuestionIds - <== Total: 186
2025-04-21 17:10:29 [http-nio-8080-exec-6] INFO c.y.test.controller.MbtiController - 获取题目完成, 测试ID: 1, 题目数量: 93, 总耗时: PT0.2429666S
2025-04-21 17:12:07 [SpringApplicationShutdownHook] INFO o.s.b.w.e.tomcat.GracefulShutdown - Commencing graceful shutdown. Waiting for active requests to complete
2025-04-21 17:12:08 [tomcat-shutdown] INFO o.s.b.w.e.tomcat.GracefulShutdown - Graceful shutdown complete
2025-04-21 17:12:08 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2025-04-21 17:12:08 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
2025-04-21 17:12:09 [main] INFO com.yang.test.TestApplication - Starting TestApplication using Java 17.0.13 with PID 12056 (D:\project\Mbti\test\target\classes started by DENG in D:\project\Mbti\test)
2025-04-21 17:12:09 [main] DEBUG com.yang.test.TestApplication - Running with Spring Boot v3.4.4, Spring v6.2.5
2025-04-21 17:12:09 [main] INFO com.yang.test.TestApplication - No active profile set, falling back to 1 default profile: "default"
2025-04-21 17:12:10 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http)
2025-04-21 17:12:10 [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
2025-04-21 17:12:10 [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.39]
2025-04-21 17:12:10 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2025-04-21 17:12:10 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 841 ms
2025-04-21 17:12:10 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2025-04-21 17:12:16 [main] INFO com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@2bb62414
2025-04-21 17:12:16 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2025-04-21 17:12:16 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/'
2025-04-21 17:12:16 [main] INFO com.yang.test.TestApplication - Started TestApplication in 7.415 seconds (process running for 8.039)
2025-04-21 17:12:16 [main] INFO com.yang.test.TestApplication - MBTI测试系统启动成功! 服务运行在端口: 8080
2025-04-21 17:12:23 [http-nio-8080-exec-2] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
2025-04-21 17:12:23 [http-nio-8080-exec-2] INFO o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
2025-04-21 17:12:23 [http-nio-8080-exec-2] INFO o.s.web.servlet.DispatcherServlet - Completed initialization in 0 ms
2025-04-21 17:12:23 [http-nio-8080-exec-2] INFO c.y.test.controller.MbtiController - 开始获取题目, 测试ID: 1
2025-04-21 17:12:23 [http-nio-8080-exec-2] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Preparing: SELECT id, name FROM test WHERE id = ?
2025-04-21 17:12:23 [http-nio-8080-exec-2] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Parameters: 1(String)
2025-04-21 17:12:24 [http-nio-8080-exec-2] DEBUG c.y.t.mapper.MbtiMapper.getTestById - <== Total: 1
2025-04-21 17:12:24 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Preparing: SELECT id, name, type, ? as testId FROM question WHERE test_id = ? ORDER BY id
2025-04-21 17:12:24 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Parameters: 1(String), 1(String)
2025-04-21 17:12:24 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getQuestionsByTestId - <== Total: 93
2025-04-21 17:12:24 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Preparing: SELECT id, code, name, question_id as questionId, character_type as characterType FROM option_table WHERE question_id IN ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) ORDER BY question_id, id
2025-04-21 17:12:24 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Parameters: 1(Integer), 2(Integer), 3(Integer), 4(Integer), 5(Integer), 6(Integer), 7(Integer), 8(Integer), 9(Integer), 10(Integer), 11(Integer), 12(Integer), 13(Integer), 14(Integer), 15(Integer), 16(Integer), 17(Integer), 18(Integer), 19(Integer), 20(Integer), 21(Integer), 22(Integer), 23(Integer), 24(Integer), 25(Integer), 26(Integer), 27(Integer), 28(Integer), 29(Integer), 30(Integer), 31(Integer), 32(Integer), 33(Integer), 34(Integer), 35(Integer), 36(Integer), 37(Integer), 38(Integer), 39(Integer), 40(Integer), 41(Integer), 42(Integer), 43(Integer), 44(Integer), 45(Integer), 46(Integer), 47(Integer), 48(Integer), 49(Integer), 50(Integer), 51(Integer), 52(Integer), 53(Integer), 54(Integer), 55(Integer), 56(Integer), 57(Integer), 58(Integer), 59(Integer), 60(Integer), 61(Integer), 62(Integer), 63(Integer), 64(Integer), 65(Integer), 66(Integer), 67(Integer), 68(Integer), 69(Integer), 70(Integer), 71(Integer), 72(Integer), 73(Integer), 74(Integer), 75(Integer), 76(Integer), 77(Integer), 78(Integer), 79(Integer), 80(Integer), 81(Integer), 82(Integer), 83(Integer), 84(Integer), 85(Integer), 86(Integer), 87(Integer), 88(Integer), 89(Integer), 90(Integer), 91(Integer), 92(Integer), 93(Integer)
2025-04-21 17:12:24 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getOptionsByQuestionIds - <== Total: 186
2025-04-21 17:12:24 [http-nio-8080-exec-2] INFO c.y.test.controller.MbtiController - 获取题目完成, 测试ID: 1, 题目数量: 93, 总耗时: PT0.3188868S
2025-04-21 17:22:13 [http-nio-8080-exec-4] INFO c.y.test.controller.MbtiController - 开始获取题目, 测试ID: 1
2025-04-21 17:22:13 [http-nio-8080-exec-4] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Preparing: SELECT id, name FROM test WHERE id = ?
2025-04-21 17:22:13 [http-nio-8080-exec-4] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Parameters: 1(String)
2025-04-21 17:22:13 [http-nio-8080-exec-4] DEBUG c.y.t.mapper.MbtiMapper.getTestById - <== Total: 1
2025-04-21 17:22:13 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Preparing: SELECT id, name, type, ? as testId FROM question WHERE test_id = ? ORDER BY id
2025-04-21 17:22:13 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Parameters: 1(String), 1(String)
2025-04-21 17:22:13 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getQuestionsByTestId - <== Total: 93
2025-04-21 17:22:13 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Preparing: SELECT id, code, name, question_id as questionId, character_type as characterType FROM option_table WHERE question_id IN ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) ORDER BY question_id, id
2025-04-21 17:22:13 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Parameters: 1(Integer), 2(Integer), 3(Integer), 4(Integer), 5(Integer), 6(Integer), 7(Integer), 8(Integer), 9(Integer), 10(Integer), 11(Integer), 12(Integer), 13(Integer), 14(Integer), 15(Integer), 16(Integer), 17(Integer), 18(Integer), 19(Integer), 20(Integer), 21(Integer), 22(Integer), 23(Integer), 24(Integer), 25(Integer), 26(Integer), 27(Integer), 28(Integer), 29(Integer), 30(Integer), 31(Integer), 32(Integer), 33(Integer), 34(Integer), 35(Integer), 36(Integer), 37(Integer), 38(Integer), 39(Integer), 40(Integer), 41(Integer), 42(Integer), 43(Integer), 44(Integer), 45(Integer), 46(Integer), 47(Integer), 48(Integer), 49(Integer), 50(Integer), 51(Integer), 52(Integer), 53(Integer), 54(Integer), 55(Integer), 56(Integer), 57(Integer), 58(Integer), 59(Integer), 60(Integer), 61(Integer), 62(Integer), 63(Integer), 64(Integer), 65(Integer), 66(Integer), 67(Integer), 68(Integer), 69(Integer), 70(Integer), 71(Integer), 72(Integer), 73(Integer), 74(Integer), 75(Integer), 76(Integer), 77(Integer), 78(Integer), 79(Integer), 80(Integer), 81(Integer), 82(Integer), 83(Integer), 84(Integer), 85(Integer), 86(Integer), 87(Integer), 88(Integer), 89(Integer), 90(Integer), 91(Integer), 92(Integer), 93(Integer)
2025-04-21 17:22:13 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getOptionsByQuestionIds - <== Total: 186
2025-04-21 17:22:13 [http-nio-8080-exec-4] INFO c.y.test.controller.MbtiController - 获取题目完成, 测试ID: 1, 题目数量: 93, 总耗时: PT0.2650471S
2025-04-21 17:24:33 [SpringApplicationShutdownHook] INFO o.s.b.w.e.tomcat.GracefulShutdown - Commencing graceful shutdown. Waiting for active requests to complete
2025-04-21 17:24:33 [tomcat-shutdown] INFO o.s.b.w.e.tomcat.GracefulShutdown - Graceful shutdown complete
2025-04-21 17:24:33 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2025-04-21 17:24:33 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
2025-04-21 17:28:16 [main] INFO com.yang.test.TestApplication - Starting TestApplication using Java 17.0.13 with PID 13076 (D:\project\Mbti\test\target\classes started by DENG in D:\project\Mbti\test)
2025-04-21 17:28:16 [main] DEBUG com.yang.test.TestApplication - Running with Spring Boot v3.4.4, Spring v6.2.5
2025-04-21 17:28:16 [main] INFO com.yang.test.TestApplication - No active profile set, falling back to 1 default profile: "default"
2025-04-21 17:28:17 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http)
2025-04-21 17:28:17 [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
2025-04-21 17:28:17 [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.39]
2025-04-21 17:28:17 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2025-04-21 17:28:17 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 842 ms
2025-04-21 17:28:17 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2025-04-21 17:28:23 [main] INFO com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@2bb62414
2025-04-21 17:28:23 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2025-04-21 17:28:23 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/'
2025-04-21 17:28:23 [main] INFO com.yang.test.TestApplication - Started TestApplication in 7.294 seconds (process running for 7.834)
2025-04-21 17:28:23 [main] INFO com.yang.test.TestApplication - MBTI测试系统启动成功! 服务运行在端口: 8080
2025-04-21 17:28:54 [http-nio-8080-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
2025-04-21 17:28:54 [http-nio-8080-exec-1] INFO o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
2025-04-21 17:28:54 [http-nio-8080-exec-1] INFO o.s.web.servlet.DispatcherServlet - Completed initialization in 0 ms
2025-04-21 17:28:54 [http-nio-8080-exec-1] INFO c.y.test.controller.MbtiController - 开始获取结果, ID: result_1744874809561
2025-04-21 17:28:54 [http-nio-8080-exec-1] DEBUG c.y.t.m.MbtiMapper.getResultById - ==> Preparing: SELECT id, type, dimensions, report, created_at as createdAt FROM results WHERE id = ?
2025-04-21 17:28:54 [http-nio-8080-exec-1] DEBUG c.y.t.m.MbtiMapper.getResultById - ==> Parameters: result_1744874809561(String)
2025-04-21 17:28:54 [http-nio-8080-exec-1] DEBUG c.y.t.m.MbtiMapper.getResultById - <== Total: 1
2025-04-21 17:28:54 [http-nio-8080-exec-1] INFO c.y.test.controller.MbtiController - 获取结果完成, ID: result_1744874809561, 总耗时: PT0.1893936S
2025-04-21 17:29:00 [http-nio-8080-exec-2] INFO c.y.test.controller.MbtiController - 开始获取结果, ID: result_1744874809561
2025-04-21 17:29:00 [http-nio-8080-exec-2] DEBUG c.y.t.m.MbtiMapper.getResultById - ==> Preparing: SELECT id, type, dimensions, report, created_at as createdAt FROM results WHERE id = ?
2025-04-21 17:29:00 [http-nio-8080-exec-2] DEBUG c.y.t.m.MbtiMapper.getResultById - ==> Parameters: result_1744874809561(String)
2025-04-21 17:29:01 [http-nio-8080-exec-2] DEBUG c.y.t.m.MbtiMapper.getResultById - <== Total: 1
2025-04-21 17:29:01 [http-nio-8080-exec-2] INFO c.y.test.controller.MbtiController - 获取结果完成, ID: result_1744874809561, 总耗时: PT0.1230948S
2025-04-21 17:29:13 [http-nio-8080-exec-4] INFO c.y.test.controller.MbtiController - 开始获取结果, ID: result_1744874809561
2025-04-21 17:29:13 [http-nio-8080-exec-4] DEBUG c.y.t.m.MbtiMapper.getResultById - ==> Preparing: SELECT id, type, dimensions, report, created_at as createdAt FROM results WHERE id = ?
2025-04-21 17:29:13 [http-nio-8080-exec-4] DEBUG c.y.t.m.MbtiMapper.getResultById - ==> Parameters: result_1744874809561(String)
2025-04-21 17:29:13 [http-nio-8080-exec-4] DEBUG c.y.t.m.MbtiMapper.getResultById - <== Total: 1
2025-04-21 17:29:13 [http-nio-8080-exec-4] INFO c.y.test.controller.MbtiController - 获取结果完成, ID: result_1744874809561, 总耗时: PT0.1314746S
2025-04-21 17:29:16 [http-nio-8080-exec-3] INFO c.y.test.controller.MbtiController - 开始获取结果, ID: result_1744874809561
2025-04-21 17:29:16 [http-nio-8080-exec-3] DEBUG c.y.t.m.MbtiMapper.getResultById - ==> Preparing: SELECT id, type, dimensions, report, created_at as createdAt FROM results WHERE id = ?
2025-04-21 17:29:16 [http-nio-8080-exec-3] DEBUG c.y.t.m.MbtiMapper.getResultById - ==> Parameters: result_1744874809561(String)
2025-04-21 17:29:16 [http-nio-8080-exec-3] DEBUG c.y.t.m.MbtiMapper.getResultById - <== Total: 1
2025-04-21 17:29:16 [http-nio-8080-exec-3] INFO c.y.test.controller.MbtiController - 获取结果完成, ID: result_1744874809561, 总耗时: PT0.0970814S
2025-04-21 17:29:40 [SpringApplicationShutdownHook] INFO o.s.b.w.e.tomcat.GracefulShutdown - Commencing graceful shutdown. Waiting for active requests to complete
2025-04-21 17:29:40 [tomcat-shutdown] INFO o.s.b.w.e.tomcat.GracefulShutdown - Graceful shutdown complete
2025-04-21 17:29:40 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2025-04-21 17:29:40 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
2025-04-30 09:35:10 [main] INFO com.yang.test.TestApplication - Starting TestApplication using Java 17.0.13 with PID 21548 (D:\project\temporary\temporary\target\classes started by DENG in D:\project\temporary\temporary)
2025-04-30 09:35:10 [main] DEBUG com.yang.test.TestApplication - Running with Spring Boot v3.4.4, Spring v6.2.5
2025-04-30 09:35:10 [main] INFO com.yang.test.TestApplication - No active profile set, falling back to 1 default profile: "default"
2025-04-30 09:35:11 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http)
2025-04-30 09:35:11 [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
2025-04-30 09:35:11 [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.39]
2025-04-30 09:35:11 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2025-04-30 09:35:11 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1427 ms
2025-04-30 09:35:11 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2025-04-30 09:35:28 [main] INFO com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@3cc79c02
2025-04-30 09:35:28 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2025-04-30 09:35:29 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/'
2025-04-30 09:35:29 [main] INFO com.yang.test.TestApplication - Started TestApplication in 19.234 seconds (process running for 20.004)
2025-04-30 09:35:29 [main] INFO com.yang.test.TestApplication - MBTI测试系统启动成功! 服务运行在端口: 8080
2025-04-30 09:35:34 [http-nio-8080-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
2025-04-30 09:35:34 [http-nio-8080-exec-1] INFO o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
2025-04-30 09:35:34 [http-nio-8080-exec-1] INFO o.s.web.servlet.DispatcherServlet - Completed initialization in 0 ms
2025-04-30 09:35:34 [http-nio-8080-exec-1] INFO c.y.test.controller.MbtiController - 开始获取题目, 测试ID: 1
2025-04-30 09:35:34 [http-nio-8080-exec-1] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Preparing: SELECT id, name FROM test WHERE id = ?
2025-04-30 09:35:34 [http-nio-8080-exec-1] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Parameters: 1(String)
2025-04-30 09:35:34 [http-nio-8080-exec-1] DEBUG c.y.t.mapper.MbtiMapper.getTestById - <== Total: 1
2025-04-30 09:35:34 [http-nio-8080-exec-1] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Preparing: SELECT id, name, type, ? as testId FROM question WHERE test_id = ? ORDER BY id
2025-04-30 09:35:34 [http-nio-8080-exec-1] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Parameters: 1(String), 1(String)
2025-04-30 09:35:34 [http-nio-8080-exec-1] DEBUG c.y.t.m.M.getQuestionsByTestId - <== Total: 93
2025-04-30 09:35:34 [http-nio-8080-exec-1] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Preparing: SELECT id, code, name, question_id as questionId, character_type as characterType FROM option_table WHERE question_id IN ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) ORDER BY question_id, id
2025-04-30 09:35:34 [http-nio-8080-exec-1] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Parameters: 1(Integer), 2(Integer), 3(Integer), 4(Integer), 5(Integer), 6(Integer), 7(Integer), 8(Integer), 9(Integer), 10(Integer), 11(Integer), 12(Integer), 13(Integer), 14(Integer), 15(Integer), 16(Integer), 17(Integer), 18(Integer), 19(Integer), 20(Integer), 21(Integer), 22(Integer), 23(Integer), 24(Integer), 25(Integer), 26(Integer), 27(Integer), 28(Integer), 29(Integer), 30(Integer), 31(Integer), 32(Integer), 33(Integer), 34(Integer), 35(Integer), 36(Integer), 37(Integer), 38(Integer), 39(Integer), 40(Integer), 41(Integer), 42(Integer), 43(Integer), 44(Integer), 45(Integer), 46(Integer), 47(Integer), 48(Integer), 49(Integer), 50(Integer), 51(Integer), 52(Integer), 53(Integer), 54(Integer), 55(Integer), 56(Integer), 57(Integer), 58(Integer), 59(Integer), 60(Integer), 61(Integer), 62(Integer), 63(Integer), 64(Integer), 65(Integer), 66(Integer), 67(Integer), 68(Integer), 69(Integer), 70(Integer), 71(Integer), 72(Integer), 73(Integer), 74(Integer), 75(Integer), 76(Integer), 77(Integer), 78(Integer), 79(Integer), 80(Integer), 81(Integer), 82(Integer), 83(Integer), 84(Integer), 85(Integer), 86(Integer), 87(Integer), 88(Integer), 89(Integer), 90(Integer), 91(Integer), 92(Integer), 93(Integer)
2025-04-30 09:35:34 [http-nio-8080-exec-1] DEBUG c.y.t.m.M.getOptionsByQuestionIds - <== Total: 186
2025-04-30 09:35:34 [http-nio-8080-exec-1] INFO c.y.test.controller.MbtiController - 获取题目完成, 测试ID: 1, 题目数量: 93, 总耗时: PT0.2254224S
2025-04-30 09:35:36 [http-nio-8080-exec-2] INFO c.y.test.controller.MbtiController - 开始获取题目, 测试ID: 1
2025-04-30 09:35:36 [http-nio-8080-exec-2] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Preparing: SELECT id, name FROM test WHERE id = ?
2025-04-30 09:35:36 [http-nio-8080-exec-2] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Parameters: 1(String)
2025-04-30 09:35:36 [http-nio-8080-exec-2] DEBUG c.y.t.mapper.MbtiMapper.getTestById - <== Total: 1
2025-04-30 09:35:36 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Preparing: SELECT id, name, type, ? as testId FROM question WHERE test_id = ? ORDER BY id
2025-04-30 09:35:36 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Parameters: 1(String), 1(String)
2025-04-30 09:35:36 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getQuestionsByTestId - <== Total: 93
2025-04-30 09:35:36 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Preparing: SELECT id, code, name, question_id as questionId, character_type as characterType FROM option_table WHERE question_id IN ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) ORDER BY question_id, id
2025-04-30 09:35:36 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Parameters: 1(Integer), 2(Integer), 3(Integer), 4(Integer), 5(Integer), 6(Integer), 7(Integer), 8(Integer), 9(Integer), 10(Integer), 11(Integer), 12(Integer), 13(Integer), 14(Integer), 15(Integer), 16(Integer), 17(Integer), 18(Integer), 19(Integer), 20(Integer), 21(Integer), 22(Integer), 23(Integer), 24(Integer), 25(Integer), 26(Integer), 27(Integer), 28(Integer), 29(Integer), 30(Integer), 31(Integer), 32(Integer), 33(Integer), 34(Integer), 35(Integer), 36(Integer), 37(Integer), 38(Integer), 39(Integer), 40(Integer), 41(Integer), 42(Integer), 43(Integer), 44(Integer), 45(Integer), 46(Integer), 47(Integer), 48(Integer), 49(Integer), 50(Integer), 51(Integer), 52(Integer), 53(Integer), 54(Integer), 55(Integer), 56(Integer), 57(Integer), 58(Integer), 59(Integer), 60(Integer), 61(Integer), 62(Integer), 63(Integer), 64(Integer), 65(Integer), 66(Integer), 67(Integer), 68(Integer), 69(Integer), 70(Integer), 71(Integer), 72(Integer), 73(Integer), 74(Integer), 75(Integer), 76(Integer), 77(Integer), 78(Integer), 79(Integer), 80(Integer), 81(Integer), 82(Integer), 83(Integer), 84(Integer), 85(Integer), 86(Integer), 87(Integer), 88(Integer), 89(Integer), 90(Integer), 91(Integer), 92(Integer), 93(Integer)
2025-04-30 09:35:36 [http-nio-8080-exec-2] DEBUG c.y.t.m.M.getOptionsByQuestionIds - <== Total: 186
2025-04-30 09:35:36 [http-nio-8080-exec-2] INFO c.y.test.controller.MbtiController - 获取题目完成, 测试ID: 1, 题目数量: 93, 总耗时: PT0.149841S
2025-04-30 09:35:44 [http-nio-8080-exec-3] INFO c.y.test.controller.MbtiController - 开始获取题目, 测试ID: 1
2025-04-30 09:35:44 [http-nio-8080-exec-3] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Preparing: SELECT id, name FROM test WHERE id = ?
2025-04-30 09:35:44 [http-nio-8080-exec-3] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Parameters: 1(String)
2025-04-30 09:35:44 [http-nio-8080-exec-3] DEBUG c.y.t.mapper.MbtiMapper.getTestById - <== Total: 1
2025-04-30 09:35:44 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Preparing: SELECT id, name, type, ? as testId FROM question WHERE test_id = ? ORDER BY id
2025-04-30 09:35:44 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Parameters: 1(String), 1(String)
2025-04-30 09:35:44 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getQuestionsByTestId - <== Total: 93
2025-04-30 09:35:44 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Preparing: SELECT id, code, name, question_id as questionId, character_type as characterType FROM option_table WHERE question_id IN ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) ORDER BY question_id, id
2025-04-30 09:35:44 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Parameters: 1(Integer), 2(Integer), 3(Integer), 4(Integer), 5(Integer), 6(Integer), 7(Integer), 8(Integer), 9(Integer), 10(Integer), 11(Integer), 12(Integer), 13(Integer), 14(Integer), 15(Integer), 16(Integer), 17(Integer), 18(Integer), 19(Integer), 20(Integer), 21(Integer), 22(Integer), 23(Integer), 24(Integer), 25(Integer), 26(Integer), 27(Integer), 28(Integer), 29(Integer), 30(Integer), 31(Integer), 32(Integer), 33(Integer), 34(Integer), 35(Integer), 36(Integer), 37(Integer), 38(Integer), 39(Integer), 40(Integer), 41(Integer), 42(Integer), 43(Integer), 44(Integer), 45(Integer), 46(Integer), 47(Integer), 48(Integer), 49(Integer), 50(Integer), 51(Integer), 52(Integer), 53(Integer), 54(Integer), 55(Integer), 56(Integer), 57(Integer), 58(Integer), 59(Integer), 60(Integer), 61(Integer), 62(Integer), 63(Integer), 64(Integer), 65(Integer), 66(Integer), 67(Integer), 68(Integer), 69(Integer), 70(Integer), 71(Integer), 72(Integer), 73(Integer), 74(Integer), 75(Integer), 76(Integer), 77(Integer), 78(Integer), 79(Integer), 80(Integer), 81(Integer), 82(Integer), 83(Integer), 84(Integer), 85(Integer), 86(Integer), 87(Integer), 88(Integer), 89(Integer), 90(Integer), 91(Integer), 92(Integer), 93(Integer)
2025-04-30 09:35:44 [http-nio-8080-exec-3] DEBUG c.y.t.m.M.getOptionsByQuestionIds - <== Total: 186
2025-04-30 09:35:44 [http-nio-8080-exec-3] INFO c.y.test.controller.MbtiController - 获取题目完成, 测试ID: 1, 题目数量: 93, 总耗时: PT0.1455793S
2025-04-30 09:36:01 [http-nio-8080-exec-4] INFO c.y.test.controller.MbtiController - 开始获取题目, 测试ID: 1
2025-04-30 09:36:01 [http-nio-8080-exec-4] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Preparing: SELECT id, name FROM test WHERE id = ?
2025-04-30 09:36:01 [http-nio-8080-exec-4] DEBUG c.y.t.mapper.MbtiMapper.getTestById - ==> Parameters: 1(String)
2025-04-30 09:36:01 [http-nio-8080-exec-4] DEBUG c.y.t.mapper.MbtiMapper.getTestById - <== Total: 1
2025-04-30 09:36:01 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Preparing: SELECT id, name, type, ? as testId FROM question WHERE test_id = ? ORDER BY id
2025-04-30 09:36:01 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getQuestionsByTestId - ==> Parameters: 1(String), 1(String)
2025-04-30 09:36:01 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getQuestionsByTestId - <== Total: 93
2025-04-30 09:36:01 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Preparing: SELECT id, code, name, question_id as questionId, character_type as characterType FROM option_table WHERE question_id IN ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) ORDER BY question_id, id
2025-04-30 09:36:01 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getOptionsByQuestionIds - ==> Parameters: 1(Integer), 2(Integer), 3(Integer), 4(Integer), 5(Integer), 6(Integer), 7(Integer), 8(Integer), 9(Integer), 10(Integer), 11(Integer), 12(Integer), 13(Integer), 14(Integer), 15(Integer), 16(Integer), 17(Integer), 18(Integer), 19(Integer), 20(Integer), 21(Integer), 22(Integer), 23(Integer), 24(Integer), 25(Integer), 26(Integer), 27(Integer), 28(Integer), 29(Integer), 30(Integer), 31(Integer), 32(Integer), 33(Integer), 34(Integer), 35(Integer), 36(Integer), 37(Integer), 38(Integer), 39(Integer), 40(Integer), 41(Integer), 42(Integer), 43(Integer), 44(Integer), 45(Integer), 46(Integer), 47(Integer), 48(Integer), 49(Integer), 50(Integer), 51(Integer), 52(Integer), 53(Integer), 54(Integer), 55(Integer), 56(Integer), 57(Integer), 58(Integer), 59(Integer), 60(Integer), 61(Integer), 62(Integer), 63(Integer), 64(Integer), 65(Integer), 66(Integer), 67(Integer), 68(Integer), 69(Integer), 70(Integer), 71(Integer), 72(Integer), 73(Integer), 74(Integer), 75(Integer), 76(Integer), 77(Integer), 78(Integer), 79(Integer), 80(Integer), 81(Integer), 82(Integer), 83(Integer), 84(Integer), 85(Integer), 86(Integer), 87(Integer), 88(Integer), 89(Integer), 90(Integer), 91(Integer), 92(Integer), 93(Integer)
2025-04-30 09:36:01 [http-nio-8080-exec-4] DEBUG c.y.t.m.M.getOptionsByQuestionIds - <== Total: 186
2025-04-30 09:36:01 [http-nio-8080-exec-4] INFO c.y.test.controller.MbtiController - 获取题目完成, 测试ID: 1, 题目数量: 93, 总耗时: PT0.1809998S
2025-04-30 09:36:23 [SpringApplicationShutdownHook] INFO o.s.b.w.e.tomcat.GracefulShutdown - Commencing graceful shutdown. Waiting for active requests to complete
2025-04-30 09:36:23 [tomcat-shutdown] INFO o.s.b.w.e.tomcat.GracefulShutdown - Graceful shutdown complete
2025-04-30 09:36:23 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2025-04-30 09:36:23 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.

View File

@ -1,7 +1,7 @@
package com.yang.test.controller;
import com.yang.test.domain.DTO.ResultRequest;
import com.yang.test.domain.DTO.ResultResponse;
import com.yang.test.domain.DTO.ResultDTO;
import com.yang.test.domain.VO.ResultHVO;
import com.yang.test.domain.QuestionH;
import com.yang.test.domain.Result;
import com.yang.test.service.HldzyService;
@ -13,7 +13,6 @@ import java.time.Duration;
import java.time.Instant;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
@ -49,12 +48,12 @@ public class HldzyController {
* 提交测试结果并获取分析
*/
@PostMapping("/results")
public Result<?> submitResult(@RequestBody ResultRequest request) {
public Result<?> submitResult(@RequestBody ResultDTO request) {
Instant start = Instant.now();
log.info("开始处理结果提交请求");
try {
ResultResponse result = hldzyService.calculateResult(request.getAnswers());
ResultHVO result = hldzyService.calculateResult(request.getAnswers());
log.info("结果计算完成, 总耗时: {}", Duration.between(start, Instant.now()));

View File

@ -1,5 +1,6 @@
package com.yang.test.controller;
import com.yang.test.domain.DTO.ResultDTO;
import com.yang.test.domain.Result;
import com.yang.test.domain.VO.ResultMVO;
import com.yang.test.domain.VO.TestQuestionsVO;
@ -12,6 +13,8 @@ import java.time.Duration;
import java.time.Instant;
import java.util.Map;
// TODO 改为Restful风格
@Slf4j
@RestController
@RequestMapping("/api")
@ -20,6 +23,7 @@ public class MbtiController {
@Autowired
private MbtiService mbtiService;
// TODO 请使用aop记录日志
@GetMapping("/questions")
public Result<?> getQuestions(@RequestParam(value = "testId", defaultValue = "1") String testId) {
Instant start = Instant.now();
@ -41,9 +45,10 @@ public class MbtiController {
}
}
// TODO 与前端敲定需求再进行开发
@PostMapping("/submit")
public Result<?> submitAnswers(@RequestBody Map<String, Integer> answers,
@RequestParam(value = "testId", defaultValue = "1") String testId) {
public Result<?> submitAnswers(@RequestBody ResultDTO resultDTO,
@RequestParam(value = "testId", defaultValue = "1") String testId) {
Instant start = Instant.now();
log.info("开始处理答案提交请求");

View File

@ -4,9 +4,11 @@ import lombok.Data;
import java.util.Map;
/**
* Hldzy
* HldzyMbti
*/
@Data
public class ResultRequest {
public class ResultDTO {
private Map<String, Integer> answers;
private String name;
private String studentId;
}

View File

@ -1,4 +1,4 @@
package com.yang.test.domain.DTO;
package com.yang.test.domain.VO;
import com.yang.test.domain.Category;
import lombok.Data;
@ -9,7 +9,7 @@ import java.util.Map;
* Hldzy
*/
@Data
public class ResultResponse {
public class ResultHVO {
private String resultCode;
private Map<String, Integer> scores;
private Category primaryType;

View File

@ -1,7 +1,7 @@
package com.yang.test.service;
import com.yang.test.domain.Category;
import com.yang.test.domain.DTO.ResultResponse;
import com.yang.test.domain.VO.ResultHVO;
import com.yang.test.domain.QuestionH;
import com.yang.test.domain.TestResult;
@ -22,7 +22,7 @@ public interface HldzyService {
/**
* 计算测试结果
*/
ResultResponse calculateResult(Map<String, Integer> answers);
ResultHVO calculateResult(Map<String, Integer> answers);
/**
* 保存测试结果

View File

@ -184,6 +184,12 @@ public class DeepseekServiceImpl implements DeepseekService {
</ul>
</section>
</div>
请根据用户在各维度上的具体倾向程度用专业但易懂的语言填充上述HTML结构中的[内容]部分特别注意根据维度分数的强弱来调整建议的针对性请确保生成的HTML格式正确可以直接在网页中显示
""", mbtiType, dimensionsText);
}
/*
<section class="love-relationships">
<h2>爱情关系分析</h2>
<ul>
@ -222,10 +228,5 @@ public class DeepseekServiceImpl implements DeepseekService {
<li><strong>工作环境需求</strong>[内容]</li>
<li><strong>效率提升建议</strong>[内容]</li>
</ul>
</section>
</div>
请根据用户在各维度上的具体倾向程度用专业但易懂的语言填充上述HTML结构中的[内容]部分特别注意根据维度分数的强弱来调整建议的针对性请确保生成的HTML格式正确可以直接在网页中显示
""", mbtiType, dimensionsText);
}
</section>*/
}

View File

@ -1,7 +1,7 @@
package com.yang.test.service.serviceImpl;
import com.yang.test.domain.Category;
import com.yang.test.domain.DTO.ResultResponse;
import com.yang.test.domain.VO.ResultHVO;
import com.yang.test.domain.QuestionH;
import com.yang.test.domain.TestResult;
import com.yang.test.mapper.HldzyMapper;
@ -32,7 +32,7 @@ public class HldzyServiceImpl implements HldzyService {
}
@Override
public ResultResponse calculateResult(Map<String, Integer> answers) {
public ResultHVO calculateResult(Map<String, Integer> answers) {
// 计算各类型分数
Map<String, Integer> scores = new HashMap<>();
@ -61,7 +61,7 @@ public class HldzyServiceImpl implements HldzyService {
Category primaryType = getCategoryByKey(primaryTypeKey);
// 构建响应
ResultResponse response = new ResultResponse();
ResultHVO response = new ResultHVO();
response.setResultCode(resultCode.toString());
response.setScores(scores);
response.setPrimaryType(primaryType);