Przeglądaj źródła

加入qmth.boot.mybatis和redis包

wangliang 2 lat temu
rodzic
commit
83a125f090
52 zmienionych plików z 644 dodań i 979 usunięć
  1. 0 171
      logs/themis-admin.log
  2. 0 2
      logs/themis-task.log
  3. 44 29
      pom.xml
  4. 7 7
      themis-admin/src/main/java/com/qmth/themis/admin/api/SysController.java
  5. 7 7
      themis-admin/src/main/java/com/qmth/themis/admin/api/TBOrgController.java
  6. 23 23
      themis-admin/src/main/java/com/qmth/themis/admin/api/TBUserController.java
  7. 3 3
      themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamActivityController.java
  8. 4 4
      themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamController.java
  9. 2 2
      themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamReexamController.java
  10. 3 4
      themis-admin/src/main/java/com/qmth/themis/admin/api/TENotifyController.java
  11. 3 3
      themis-admin/src/main/java/com/qmth/themis/admin/api/TEStudentController.java
  12. 5 5
      themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateCallMobileController.java
  13. 12 13
      themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateController.java
  14. 7 7
      themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateWarnInfoController.java
  15. 56 56
      themis-admin/src/main/java/com/qmth/themis/admin/config/DruidConfig.java
  16. 3 3
      themis-admin/src/main/java/com/qmth/themis/admin/config/WebMvcConfig.java
  17. 3 3
      themis-admin/src/main/java/com/qmth/themis/admin/interceptor/AuthInterceptor.java
  18. 3 3
      themis-admin/src/main/java/com/qmth/themis/admin/interceptor/AuthThirdInterceptor.java
  19. 14 72
      themis-admin/src/main/resources/application.properties
  20. 32 24
      themis-business/pom.xml
  21. 52 52
      themis-business/src/main/java/com/qmth/themis/business/config/MybatisPlusConfig.java
  22. 106 106
      themis-business/src/main/java/com/qmth/themis/business/config/RedisConfig.java
  23. 3 3
      themis-business/src/main/java/com/qmth/themis/business/constant/SystemConstant.java
  24. 1 1
      themis-business/src/main/java/com/qmth/themis/business/service/ThemisCacheService.java
  25. 7 7
      themis-business/src/main/java/com/qmth/themis/business/service/impl/AuthInfoServiceImpl.java
  26. 3 3
      themis-business/src/main/java/com/qmth/themis/business/service/impl/SysConfigServiceImpl.java
  27. 4 5
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TBAttachmentServiceImpl.java
  28. 5 5
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamServiceImpl.java
  29. 5 5
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEMobileServiceImpl.java
  30. 6 6
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEQrcodeServiceImpl.java
  31. 3 3
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEStudentServiceImpl.java
  32. 4 4
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeReportServiceImpl.java
  33. 8 12
      themis-business/src/main/java/com/qmth/themis/business/service/impl/ThemisCacheServiceImpl.java
  34. 3 3
      themis-business/src/main/java/com/qmth/themis/business/templete/service/impl/TempleteLogicServiceImpl.java
  35. 8 8
      themis-business/src/main/java/com/qmth/themis/business/util/AuthUtil.java
  36. 8 8
      themis-business/src/main/java/com/qmth/themis/business/util/CloudMarkUtil.java
  37. 4 4
      themis-business/src/main/java/com/qmth/themis/business/util/MqUtil.java
  38. 15 15
      themis-business/src/main/java/com/qmth/themis/business/util/TencentYunUtil.java
  39. 4 4
      themis-exam/src/main/java/com/qmth/themis/exam/api/SysController.java
  40. 2 3
      themis-exam/src/main/java/com/qmth/themis/exam/api/TEExamController.java
  41. 3 3
      themis-exam/src/main/java/com/qmth/themis/exam/api/TEMobileController.java
  42. 8 8
      themis-exam/src/main/java/com/qmth/themis/exam/api/TEStudentController.java
  43. 4 5
      themis-exam/src/main/java/com/qmth/themis/exam/api/TIeInvigilateCallMobileController.java
  44. 5 6
      themis-exam/src/main/java/com/qmth/themis/exam/api/TIeInvigilateCallOeController.java
  45. 56 56
      themis-exam/src/main/java/com/qmth/themis/exam/config/DruidConfig.java
  46. 3 3
      themis-exam/src/main/java/com/qmth/themis/exam/config/WebMvcConfig.java
  47. 3 3
      themis-exam/src/main/java/com/qmth/themis/exam/interceptor/AuthInterceptor.java
  48. 10 69
      themis-exam/src/main/resources/application.properties
  49. 56 56
      themis-task/src/main/java/com/qmth/themis/task/config/DruidConfig.java
  50. 2 2
      themis-task/src/main/java/com/qmth/themis/task/quartz/MqActivityJob.java
  51. 1 1
      themis-task/src/main/java/com/qmth/themis/task/quartz/service/impl/QuartzLogicServiceImpl.java
  52. 11 69
      themis-task/src/main/resources/application.properties

+ 0 - 171
logs/themis-admin.log

@@ -1,171 +0,0 @@
-2022-12-23 10:39:57.417| main | INFO |  -  | Starting ThemisAdminApplication on kingdeMacBook-Air.local with PID 2090 (/Users/king/git/backend-service/themis-admin/target/classes started by king in /Users/king/git/backend-service) | [org.springframework.boot.StartupInfoLogger:55]
-2022-12-23 10:39:57.433| main | INFO |  -  | No active profile set, falling back to default profiles: default | [org.springframework.boot.SpringApplication:651]
-2022-12-23 10:40:02.274| main | INFO |  -  | Multiple Spring Data modules found, entering strict repository configuration mode! | [org.springframework.data.repository.config.RepositoryConfigurationDelegate:249]
-2022-12-23 10:40:02.301| main | INFO |  -  | Bootstrapping Spring Data Redis repositories in DEFAULT mode. | [org.springframework.data.repository.config.RepositoryConfigurationDelegate:127]
-2022-12-23 10:40:02.438| main | INFO |  -  | Finished Spring Data repository scanning in 62ms. Found 0 Redis repository interfaces. | [org.springframework.data.repository.config.RepositoryConfigurationDelegate:187]
-2022-12-23 10:40:02.907| main | WARN |  -  | Skipping MapperFactoryBean with name 'sysConfigMapper' and 'com.qmth.themis.business.dao.SysConfigMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.907| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBAppMapper' and 'com.qmth.themis.business.dao.TBAppMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.908| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBAppVersionMapper' and 'com.qmth.themis.business.dao.TBAppVersionMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.908| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBAttachmentMapper' and 'com.qmth.themis.business.dao.TBAttachmentMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.908| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBClientDownloadMapper' and 'com.qmth.themis.business.dao.TBClientDownloadMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.909| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBClientVersionMapper' and 'com.qmth.themis.business.dao.TBClientVersionMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.909| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBExamInvigilateUserMapper' and 'com.qmth.themis.business.dao.TBExamInvigilateUserMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.909| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBExamInvigilateUserTempMapper' and 'com.qmth.themis.business.dao.TBExamInvigilateUserTempMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.910| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBOrgMapper' and 'com.qmth.themis.business.dao.TBOrgMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.910| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBPrivilegeMapper' and 'com.qmth.themis.business.dao.TBPrivilegeMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.911| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBRoleMapper' and 'com.qmth.themis.business.dao.TBRoleMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.911| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBRolePrivilegeMapper' and 'com.qmth.themis.business.dao.TBRolePrivilegeMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.911| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBSessionMapper' and 'com.qmth.themis.business.dao.TBSessionMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.912| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBTaskHistoryMapper' and 'com.qmth.themis.business.dao.TBTaskHistoryMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.912| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBUserMapper' and 'com.qmth.themis.business.dao.TBUserMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.913| main | WARN |  -  | Skipping MapperFactoryBean with name 'TBUserRoleMapper' and 'com.qmth.themis.business.dao.TBUserRoleMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.913| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEAudioMapper' and 'com.qmth.themis.business.dao.TEAudioMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.913| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEConfigMapper' and 'com.qmth.themis.business.dao.TEConfigMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.914| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEExamActivityMapper' and 'com.qmth.themis.business.dao.TEExamActivityMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.914| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEExamBreachLogMapper' and 'com.qmth.themis.business.dao.TEExamBreachLogMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.914| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEExamCourseMapper' and 'com.qmth.themis.business.dao.TEExamCourseMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.915| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEExamMapper' and 'com.qmth.themis.business.dao.TEExamMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.915| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEExamPaperMapper' and 'com.qmth.themis.business.dao.TEExamPaperMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.915| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEExamReexamAuditingMapper' and 'com.qmth.themis.business.dao.TEExamReexamAuditingMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.916| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEExamReexamMapper' and 'com.qmth.themis.business.dao.TEExamReexamMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.916| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEExamStudentLogMapper' and 'com.qmth.themis.business.dao.TEExamStudentLogMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.916| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEExamStudentMapper' and 'com.qmth.themis.business.dao.TEExamStudentMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.917| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEExamStudentOnlineLogMapper' and 'com.qmth.themis.business.dao.TEExamStudentOnlineLogMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.917| main | WARN |  -  | Skipping MapperFactoryBean with name 'TESimulatePaperMapper' and 'com.qmth.themis.business.dao.TESimulatePaperMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.918| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEStudentMapper' and 'com.qmth.themis.business.dao.TEStudentMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.918| main | WARN |  -  | Skipping MapperFactoryBean with name 'TEUserLogMapper' and 'com.qmth.themis.business.dao.TEUserLogMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.918| main | WARN |  -  | Skipping MapperFactoryBean with name 'TGErrorMapper' and 'com.qmth.themis.business.dao.TGErrorMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.919| main | WARN |  -  | Skipping MapperFactoryBean with name 'TIeExamInvigilateCallLogMapper' and 'com.qmth.themis.business.dao.TIeExamInvigilateCallLogMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.919| main | WARN |  -  | Skipping MapperFactoryBean with name 'TIeExamInvigilateCallMapper' and 'com.qmth.themis.business.dao.TIeExamInvigilateCallMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.919| main | WARN |  -  | Skipping MapperFactoryBean with name 'TIeExamInvigilateNoticeMapper' and 'com.qmth.themis.business.dao.TIeExamInvigilateNoticeMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.920| main | WARN |  -  | Skipping MapperFactoryBean with name 'TIeInvigilateExceptionInfoMapper' and 'com.qmth.themis.business.dao.TIeInvigilateExceptionInfoMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.920| main | WARN |  -  | Skipping MapperFactoryBean with name 'TIeInvigilateWarnInfoMapper' and 'com.qmth.themis.business.dao.TIeInvigilateWarnInfoMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.920| main | WARN |  -  | Skipping MapperFactoryBean with name 'TIpRegionMapper' and 'com.qmth.themis.business.dao.TIpRegionMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.921| main | WARN |  -  | Skipping MapperFactoryBean with name 'TMRocketMessageMapper' and 'com.qmth.themis.business.dao.TMRocketMessageMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.922| main | WARN |  -  | Skipping MapperFactoryBean with name 'TMTencentVideoMessageMapper' and 'com.qmth.themis.business.dao.TMTencentVideoMessageMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.923| main | WARN |  -  | Skipping MapperFactoryBean with name 'TOeExamAnswerMapper' and 'com.qmth.themis.business.dao.TOeExamAnswerMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.923| main | WARN |  -  | Skipping MapperFactoryBean with name 'TOeExamBreakHistoryMapper' and 'com.qmth.themis.business.dao.TOeExamBreakHistoryMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.924| main | WARN |  -  | Skipping MapperFactoryBean with name 'TOeExamRecordMapper' and 'com.qmth.themis.business.dao.TOeExamRecordMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.924| main | WARN |  -  | Skipping MapperFactoryBean with name 'TOeExamSimulateHistoryMapper' and 'com.qmth.themis.business.dao.TOeExamSimulateHistoryMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.924| main | WARN |  -  | Skipping MapperFactoryBean with name 'TOeFaceVerifyHistoryMapper' and 'com.qmth.themis.business.dao.TOeFaceVerifyHistoryMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.925| main | WARN |  -  | Skipping MapperFactoryBean with name 'TOeLivenessVerifyHistoryMapper' and 'com.qmth.themis.business.dao.TOeLivenessVerifyHistoryMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.925| main | WARN |  -  | Skipping MapperFactoryBean with name 'TSAuthMapper' and 'com.qmth.themis.business.dao.TSAuthMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.925| main | WARN |  -  | Skipping MapperFactoryBean with name 'TSLogMapper' and 'com.qmth.themis.business.dao.TSLogMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.925| main | WARN |  -  | Skipping MapperFactoryBean with name 'TSyncExamStudentScoreMapper' and 'com.qmth.themis.business.dao.TSyncExamStudentScoreMapper' mapperInterface. Bean already defined with the same name! | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:02.926| main | WARN |  -  | No MyBatis mapper was found in '[com.qmth.themis.business.dao]' package. Please check your configuration. | [org.mybatis.logging.Logger:44]
-2022-12-23 10:40:05.691| main | INFO |  -  | Tomcat initialized with port(s): 6001 (http) | [org.springframework.boot.web.embedded.tomcat.TomcatWebServer:108]
-2022-12-23 10:40:05.725| main | INFO |  -  | Initializing ProtocolHandler ["http-nio-6001"] | [org.apache.juli.logging.DirectJDKLog:173]
-2022-12-23 10:40:05.727| main | INFO |  -  | Starting service [Tomcat] | [org.apache.juli.logging.DirectJDKLog:173]
-2022-12-23 10:40:05.727| main | INFO |  -  | Starting Servlet engine: [Apache Tomcat/9.0.35] | [org.apache.juli.logging.DirectJDKLog:173]
-2022-12-23 10:40:06.061| main | INFO |  -  | Initializing Spring embedded WebApplicationContext | [org.apache.juli.logging.DirectJDKLog:173]
-2022-12-23 10:40:06.061| main | INFO |  -  | Root WebApplicationContext: initialization completed in 8246 ms | [org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext:284]
-2022-12-23 10:40:12.644| main | INFO |  -  | Uid init success, datacenterId=1, machineId=1 | [com.qmth.themis.business.util.UidUtil:56]
-2022-12-23 10:40:14.782| main | INFO |  -  | Solar startup checking... | [com.qmth.boot.core.solar.service.SolarService:119]
-2022-12-23 10:40:15.577| main | INFO |  -  | Solar startup check success, current app name: 在线考试平台开发环境 | [com.qmth.boot.core.solar.service.SolarService:142]
-2022-12-23 10:40:18.131| main | INFO |  -  | Initializing ExecutorService 'taskScheduler' | [org.springframework.scheduling.concurrent.ExecutorConfigurationSupport:181]
-2022-12-23 10:40:18.256| main | INFO |  -  | Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] | [springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping:69]
-2022-12-23 10:40:18.376| main | INFO |  -  | cpuNum:4 | [com.qmth.themis.business.forkjoin.ForkJoinThreadPool:34]
-2022-12-23 10:40:40.528| main | INFO |  -  | {dataSource-1} inited | [com.alibaba.druid.pool.DruidDataSource:1003]
-2022-12-23 10:40:40.634| main | DEBUG |  -  | ==>  Preparing: SELECT id,org_id,config_key,config_name,config_value,enable,create_id,create_time,update_id,update_Time FROM sys_config WHERE (config_key = ?) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:40:41.911| main | DEBUG |  -  | ==> Parameters: mq.config.topic(String) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:40:42.352| main | DEBUG |  -  | <==      Total: 1 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:05.707| main | DEBUG |  -  | ==>  Preparing: SELECT id,org_id,config_key,config_name,config_value,enable,create_id,create_time,update_id,update_Time FROM sys_config WHERE (config_key = ?) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:05.711| main | DEBUG |  -  | ==> Parameters: mq.config.body(String) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:05.819| main | DEBUG |  -  | <==      Total: 1 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:21.822| main | INFO |  -  | Starting ProtocolHandler ["http-nio-6001"] | [org.apache.juli.logging.DirectJDKLog:173]
-2022-12-23 10:41:21.906| main | INFO |  -  | Tomcat started on port(s): 6001 (http) with context path '' | [org.springframework.boot.web.embedded.tomcat.TomcatWebServer:220]
-2022-12-23 10:41:21.909| main | INFO |  -  | Context refreshed | [springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:160]
-2022-12-23 10:41:21.952| main | INFO |  -  | Found 1 custom documentation plugin(s) | [springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:163]
-2022-12-23 10:41:22.082| main | INFO |  -  | Scanning for api listing references | [springfox.documentation.spring.web.scanners.ApiListingReferenceScanner:41]
-2022-12-23 10:41:23.517| main | INFO |  -  | Generating unique operation named: queryUsingPOST_1 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:23.587| main | INFO |  -  | Generating unique operation named: queryUsingPOST_2 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:23.603| main | INFO |  -  | Generating unique operation named: saveUsingPOST_1 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:23.695| main | INFO |  -  | Generating unique operation named: queryUsingPOST_3 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:23.721| main | INFO |  -  | Generating unique operation named: saveUsingPOST_2 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:23.925| main | INFO |  -  | Generating unique operation named: saveUsingPOST_3 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.011| main | INFO |  -  | Generating unique operation named: queryUsingPOST_4 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.152| main | INFO |  -  | Generating unique operation named: queryUsingPOST_5 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.182| main | INFO |  -  | Generating unique operation named: saveUsingPOST_4 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.327| main | INFO |  -  | Generating unique operation named: queryUsingPOST_6 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.369| main | INFO |  -  | Generating unique operation named: saveUsingPOST_5 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.622| main | INFO |  -  | Generating unique operation named: queryUsingPOST_7 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.679| main | INFO |  -  | Generating unique operation named: saveUsingPOST_6 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.734| main | INFO |  -  | Generating unique operation named: queryUsingPOST_8 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.765| main | INFO |  -  | Generating unique operation named: saveUsingPOST_7 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.774| main | INFO |  -  | Generating unique operation named: importDataUsingPOST_1 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.788| main | INFO |  -  | Generating unique operation named: queryUsingPOST_9 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.803| main | INFO |  -  | Generating unique operation named: saveUsingPOST_8 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.876| main | INFO |  -  | Generating unique operation named: detailUsingPOST_1 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:24.888| main | INFO |  -  | Generating unique operation named: listUsingPOST_1 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:25.033| main | INFO |  -  | Generating unique operation named: exportUsingPOST_1 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:25.050| main | INFO |  -  | Generating unique operation named: importDataUsingPOST_2 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:25.121| main | INFO |  -  | Generating unique operation named: queryUsingPOST_10 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:25.135| main | INFO |  -  | Generating unique operation named: saveUsingPOST_9 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:25.282| main | INFO |  -  | Generating unique operation named: queryUsingPOST_11 | [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40]
-2022-12-23 10:41:25.359| main | INFO |  -  | Started ThemisAdminApplication in 90.174 seconds (JVM running for 92.481) | [org.springframework.boot.StartupInfoLogger:61]
-2022-12-23 10:41:25.363| main | INFO |  -  | 服务器启动时执行 start | [com.qmth.themis.admin.start.StartRunning:37]
-2022-12-23 10:41:25.526| main | DEBUG |  -  | ==>  Preparing: SELECT id,org_id,config_key,config_name,config_value,enable,create_id,create_time,update_id,update_Time FROM sys_config WHERE (org_id IS NULL) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.532| main | DEBUG |  -  | ==> Parameters:  | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.553| main | DEBUG |  -  | <==      Total: 14 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.873| main | DEBUG |  -  | ==>  Preparing: SELECT id,code,name,logo,enable,enable_simulate,simulate_paper_id,access_key,access_secret,contact_name,contact_phone,enable_liveness,enable_monitor_record,create_id,create_time,update_id,update_Time FROM t_b_org WHERE (code = ?) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.875| main | DEBUG |  -  | ==> Parameters: test-school-1(String) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.882| main | DEBUG |  -  | <==      Total: 1 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.885| main | DEBUG |  -  | ==>  Preparing: SELECT id,code,name,logo,enable,enable_simulate,simulate_paper_id,access_key,access_secret,contact_name,contact_phone,enable_liveness,enable_monitor_record,create_id,create_time,update_id,update_Time FROM t_b_org WHERE (code = ?) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.886| main | DEBUG |  -  | ==> Parameters: test-school-2(String) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.888| main | DEBUG |  -  | <==      Total: 1 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.896| main | DEBUG |  -  | ==>  Preparing: DELETE FROM t_s_auth WHERE (id >= ?) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.905| main | DEBUG |  -  | ==> Parameters: 0(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.913| main | DEBUG |  -  | <==    Updates: 2 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.921| main | DEBUG |  -  | ==>  Preparing: SELECT id,school_id,access_key,access_secret,description,type,expire_time,file,create_id,create_time,update_id,update_Time FROM t_s_auth WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.924| main | DEBUG |  -  | ==> Parameters: 338994075712098304(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.926| main | DEBUG |  -  | <==      Total: 0 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.934| main | DEBUG |  -  | ==>  Preparing: INSERT INTO t_s_auth ( id, school_id, access_key, access_secret, type, create_time, update_Time ) VALUES ( ?, ?, ?, ?, ?, ?, ? ) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.947| main | DEBUG |  -  | ==> Parameters: 338994075712098304(Long), 1(Long), 8134f6aae0134770b8618913705d3667(String), s1NENpvc8Jq5evcE0B7GfLmoQOvwmlCy(String), ON_LINE(String), 1671763285934(Long), 1671763285934(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.950| main | DEBUG |  -  | ==>  Preparing: SELECT id,school_id,access_key,access_secret,description,type,expire_time,file,create_id,create_time,update_id,update_Time FROM t_s_auth WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.950| main | DEBUG |  -  | ==> Parameters: 338994075829538816(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.952| main | DEBUG |  -  | <==      Total: 0 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.954| main | DEBUG |  -  | ==>  Preparing: INSERT INTO t_s_auth ( id, school_id, access_key, access_secret, type, create_time, update_Time ) VALUES ( ?, ?, ?, ?, ?, ?, ? ) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.957| main | DEBUG |  -  | ==> Parameters: 338994075829538816(Long), 2(Long), 8134f6aae0134770b8618913705d3667(String), s1NENpvc8Jq5evcE0B7GfLmoQOvwmlCy(String), ON_LINE(String), 1671763285954(Long), 1671763285954(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.960| main | DEBUG |  -  | ==>  Preparing: SELECT id,code,name,logo,enable,enable_simulate,simulate_paper_id,access_key,access_secret,contact_name,contact_phone,enable_liveness,enable_monitor_record,create_id,create_time,update_id,update_Time FROM t_b_org WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.962| main | DEBUG |  -  | ==> Parameters: 1(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.965| main | DEBUG |  -  | <==      Total: 1 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.976| main | DEBUG |  -  | ==>  Preparing: UPDATE t_b_org SET code=?, name=?, logo=?, enable=?, enable_simulate=?, access_key=?, access_secret=?, enable_liveness=?, enable_monitor_record=?, create_id=?, create_time=?, update_Time=? WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.989| main | DEBUG |  -  | ==> Parameters: test-school-1(String), 测试学校_1(String), https://solar-file.qmth.com.cn/org/logo/1.png(String), 1(Integer), 1(Integer), 41a9c68b71c9486db62de90980bd7e9a(String), yhe22bNXMRljatkvJA4f56by9dIAJBjv(String), 1(Integer), 1(Integer), 1(Long), 1671702666147(Long), 1671763285976(Long), 1(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.992| main | DEBUG |  -  | ==>  Preparing: SELECT id,code,name,logo,enable,enable_simulate,simulate_paper_id,access_key,access_secret,contact_name,contact_phone,enable_liveness,enable_monitor_record,create_id,create_time,update_id,update_Time FROM t_b_org WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.992| main | DEBUG |  -  | ==> Parameters: 2(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.995| main | DEBUG |  -  | <==      Total: 1 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.996| main | DEBUG |  -  | ==>  Preparing: UPDATE t_b_org SET code=?, name=?, logo=?, enable=?, enable_simulate=?, access_key=?, access_secret=?, enable_liveness=?, enable_monitor_record=?, create_id=?, create_time=?, update_Time=? WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:25.998| main | DEBUG |  -  | ==> Parameters: test-school-2(String), 测试学校_2(String), https://solar-file.qmth.com.cn/org/logo/2.png(String), 1(Integer), 1(Integer), d81badf113d1450c9f554809e1282ae1(String), dmILQXiRESNasxUylMNGl05R0JsaVb9t(String), 1(Integer), 1(Integer), 1(Long), 1671702666138(Long), 1671763285996(Long), 2(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.014| main | DEBUG |  -  | ==>  Preparing: SELECT id,code,name,logo,enable,enable_simulate,simulate_paper_id,access_key,access_secret,contact_name,contact_phone,enable_liveness,enable_monitor_record,create_id,create_time,update_id,update_Time FROM t_b_org | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.015| main | DEBUG |  -  | ==> Parameters:  | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.018| main | DEBUG |  -  | <==      Total: 4 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.020| main | DEBUG |  -  | ==>  Preparing: SELECT id,code,name,logo,enable,enable_simulate,simulate_paper_id,access_key,access_secret,contact_name,contact_phone,enable_liveness,enable_monitor_record,create_id,create_time,update_id,update_Time FROM t_b_org WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.022| main | DEBUG |  -  | ==> Parameters: 1(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.024| main | DEBUG |  -  | <==      Total: 1 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.026| main | DEBUG |  -  | ==>  Preparing: UPDATE t_b_org SET code=?, name=?, logo=?, enable=?, enable_simulate=?, access_key=?, access_secret=?, enable_liveness=?, enable_monitor_record=?, create_id=?, create_time=?, update_Time=? WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.027| main | DEBUG |  -  | ==> Parameters: test-school-1(String), 测试学校_1(String), https://solar-file.qmth.com.cn/org/logo/1.png(String), 1(Integer), 1(Integer), 41a9c68b71c9486db62de90980bd7e9a(String), yhe22bNXMRljatkvJA4f56by9dIAJBjv(String), 1(Integer), 1(Integer), 1(Long), 1671702666147(Long), 1671763286026(Long), 1(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.029| main | DEBUG |  -  | ==>  Preparing: SELECT id,code,name,logo,enable,enable_simulate,simulate_paper_id,access_key,access_secret,contact_name,contact_phone,enable_liveness,enable_monitor_record,create_id,create_time,update_id,update_Time FROM t_b_org WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.030| main | DEBUG |  -  | ==> Parameters: 2(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.033| main | DEBUG |  -  | <==      Total: 1 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.034| main | DEBUG |  -  | ==>  Preparing: UPDATE t_b_org SET code=?, name=?, logo=?, enable=?, enable_simulate=?, access_key=?, access_secret=?, enable_liveness=?, enable_monitor_record=?, create_id=?, create_time=?, update_Time=? WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.036| main | DEBUG |  -  | ==> Parameters: test-school-2(String), 测试学校_2(String), https://solar-file.qmth.com.cn/org/logo/2.png(String), 1(Integer), 1(Integer), d81badf113d1450c9f554809e1282ae1(String), dmILQXiRESNasxUylMNGl05R0JsaVb9t(String), 1(Integer), 1(Integer), 1(Long), 1671702666138(Long), 1671763286034(Long), 2(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.039| main | DEBUG |  -  | ==>  Preparing: SELECT id,code,name,logo,enable,enable_simulate,simulate_paper_id,access_key,access_secret,contact_name,contact_phone,enable_liveness,enable_monitor_record,create_id,create_time,update_id,update_Time FROM t_b_org WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.039| main | DEBUG |  -  | ==> Parameters: 17(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.042| main | DEBUG |  -  | <==      Total: 1 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.043| main | DEBUG |  -  | ==>  Preparing: UPDATE t_b_org SET code=?, name=?, logo=?, enable=?, enable_simulate=?, access_key=?, access_secret=?, enable_liveness=?, enable_monitor_record=?, create_id=?, create_time=?, update_Time=? WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.044| main | DEBUG |  -  | ==> Parameters: xjtu(String), 西安交通大学(String), http://static-test.qmth.com.cn/file/2022/12/22/qdnMaku9jFdU4bB0sBg1t.jpg?Expires=1671702965&OSSAccessKeyId=LTAI4FnJ2pgV6aGceYcCkeEi&Signature=yLwlnZkRQWKICP1JhJjj71pOGjI%3D(String), 0(Integer), 1(Integer), caabd6ddde7d4b0ca98cfd2109f14d95(String), 3KiuJE1Qgjh5tV23ODQFtxuzchAtcLZQ(String), 1(Integer), 1(Integer), 1(Long), 1671702666155(Long), 1671763286043(Long), 17(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.047| main | DEBUG |  -  | ==>  Preparing: SELECT id,code,name,logo,enable,enable_simulate,simulate_paper_id,access_key,access_secret,contact_name,contact_phone,enable_liveness,enable_monitor_record,create_id,create_time,update_id,update_Time FROM t_b_org WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.047| main | DEBUG |  -  | ==> Parameters: 183(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.050| main | DEBUG |  -  | <==      Total: 1 | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.052| main | DEBUG |  -  | ==>  Preparing: UPDATE t_b_org SET code=?, name=?, logo=?, enable=?, enable_simulate=?, access_key=?, access_secret=?, enable_liveness=?, enable_monitor_record=?, create_id=?, create_time=?, update_Time=? WHERE id=? | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.053| main | DEBUG |  -  | ==> Parameters: xjtuyjs(String), 西安交通大学研究生院(String), http://static-test.qmth.com.cn/file/2022/12/22/qycrKtn5r07AMW9DE3vvU.jpg?Expires=1671702966&OSSAccessKeyId=LTAI4FnJ2pgV6aGceYcCkeEi&Signature=ZCZjT9%2FI2Qbm523GPGqxhu1kbHI%3D(String), 0(Integer), 1(Integer), 850b6e9d63c4459c8c7037c63f9ddd6c(String), aWM433KTcVnhLQSEnhhD6TyPT0T24826(String), 1(Integer), 1(Integer), 1(Long), 1671702666120(Long), 1671763286052(Long), 183(Long) | [org.apache.ibatis.logging.jdbc.BaseJdbcLogger:137]
-2022-12-23 10:41:26.061| main | INFO |  -  | 服务器启动时执行 end | [com.qmth.themis.admin.start.StartRunning:42]
-2022-12-23 10:45:00.013| scheduled-task-1 | INFO |  -  | Start renew machindId | [com.qmth.themis.business.util.UidUtil:71]
-2022-12-23 10:47:07.332| SpringContextShutdownHook | INFO |  -  | Shutting down ExecutorService 'taskScheduler' | [org.springframework.scheduling.concurrent.ExecutorConfigurationSupport:218]
-2022-12-23 10:47:07.347| SpringContextShutdownHook | INFO |  -  | Start release machindId | [com.qmth.themis.business.util.UidUtil:81]
-2022-12-23 10:47:07.378| NettyClientSelector_1 | INFO |  -  | closeChannel: close the connection to remote address[192.168.10.36:9876] result: true | [org.apache.rocketmq.logging.Slf4jLoggerFactory$Slf4jLogger:95]
-2022-12-23 10:47:07.382| NettyClientSelector_1 | INFO |  -  | closeChannel: close the connection to remote address[192.168.10.36:10911] result: true | [org.apache.rocketmq.logging.Slf4jLoggerFactory$Slf4jLogger:95]
-2022-12-23 10:47:07.390| NettyClientSelector_1 | INFO |  -  | closeChannel: close the connection to remote address[192.168.10.36:9876] result: true | [org.apache.rocketmq.logging.Slf4jLoggerFactory$Slf4jLogger:95]
-2022-12-23 10:47:07.391| NettyClientSelector_1 | INFO |  -  | closeChannel: close the connection to remote address[192.168.10.36:10911] result: true | [org.apache.rocketmq.logging.Slf4jLoggerFactory$Slf4jLogger:95]
-2022-12-23 10:47:07.397| SpringContextShutdownHook | INFO |  -  | {dataSource-1} closing ... | [com.alibaba.druid.pool.DruidDataSource:1965]
-2022-12-23 10:47:07.441| SpringContextShutdownHook | INFO |  -  | {dataSource-1} closed | [com.alibaba.druid.pool.DruidDataSource:2037]

+ 0 - 2
logs/themis-task.log

@@ -1,2 +0,0 @@
-2022-12-23 11:23:38.647| main | INFO |  -  | Starting ThemisTaskApplication on kingdeMacBook-Air.local with PID 2726 (/Users/king/git/backend-service/themis-task/target/classes started by king in /Users/king/git/backend-service) | [org.springframework.boot.StartupInfoLogger:55]
-2022-12-23 11:23:38.679| main | INFO |  -  | No active profile set, falling back to default profiles: default | [org.springframework.boot.SpringApplication:651]

+ 44 - 29
pom.xml

@@ -28,17 +28,17 @@
         <swagger2.version>2.9.2</swagger2.version>
         <logback.version>1.2.3</logback.version>
         <fastjson.version>1.2.68</fastjson.version>
-        <druid.version>1.1.20</druid.version>
+<!--        <druid.version>1.1.20</druid.version>-->
         <fileupload.version>1.4</fileupload.version>
         <poi.version>3.17</poi.version>
         <aliyun.version>3.8.1</aliyun.version>
         <guava.version>27.1-jre</guava.version>
-        <mysql.version>8.0.20</mysql.version>
+<!--        <mysql.version>8.0.20</mysql.version>-->
         <hutool.version>5.0.6</hutool.version>
         <bcprov.version>1.52</bcprov.version>
-        <redis.version>3.3.0</redis.version>
+<!--        <redis.version>3.3.0</redis.version>-->
         <rocket.version>2.1.0</rocket.version>
-        <mybatis-plus.version>3.4.2</mybatis-plus.version>
+<!--        <mybatis-plus.version>3.4.2</mybatis-plus.version>-->
         <spring-boot.version>2.3.0.RELEASE</spring-boot.version>
         <gson.version>2.8.6</gson.version>
         <commons.version>3.10</commons.version>
@@ -82,16 +82,16 @@
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
-            <dependency>
-                <groupId>mysql</groupId>
-                <artifactId>mysql-connector-java</artifactId>
-                <version>${mysql.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>com.baomidou</groupId>
-                <artifactId>mybatis-plus-boot-starter</artifactId>
-                <version>${mybatis-plus.version}</version>
-            </dependency>
+<!--            <dependency>-->
+<!--                <groupId>mysql</groupId>-->
+<!--                <artifactId>mysql-connector-java</artifactId>-->
+<!--                <version>${mysql.version}</version>-->
+<!--            </dependency>-->
+<!--            <dependency>-->
+<!--                <groupId>com.baomidou</groupId>-->
+<!--                <artifactId>mybatis-plus-boot-starter</artifactId>-->
+<!--                <version>${mybatis-plus.version}</version>-->
+<!--            </dependency>-->
             <dependency>
                 <groupId>ch.qos.logback</groupId>
                 <artifactId>logback-core</artifactId>
@@ -117,11 +117,11 @@
                 <artifactId>springfox-swagger-ui</artifactId>
                 <version>${swagger2.version}</version>
             </dependency>
-            <dependency>
-                <groupId>com.alibaba</groupId>
-                <artifactId>druid</artifactId>
-                <version>${druid.version}</version>
-            </dependency>
+<!--            <dependency>-->
+<!--                <groupId>com.alibaba</groupId>-->
+<!--                <artifactId>druid</artifactId>-->
+<!--                <version>${druid.version}</version>-->
+<!--            </dependency>-->
             <dependency>
                 <groupId>org.apache.commons</groupId>
                 <artifactId>commons-lang3</artifactId>
@@ -199,16 +199,16 @@
                 <version>${bcprov.version}</version>
             </dependency>
             <!-- redis -->
-            <dependency>
-                <groupId>org.springframework.data</groupId>
-                <artifactId>spring-data-redis</artifactId>
-                <version>${spring-boot.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>redis.clients</groupId>
-                <artifactId>jedis</artifactId>
-                <version>${redis.version}</version>
-            </dependency>
+<!--            <dependency>-->
+<!--                <groupId>org.springframework.data</groupId>-->
+<!--                <artifactId>spring-data-redis</artifactId>-->
+<!--                <version>${spring-boot.version}</version>-->
+<!--            </dependency>-->
+<!--            <dependency>-->
+<!--                <groupId>redis.clients</groupId>-->
+<!--                <artifactId>jedis</artifactId>-->
+<!--                <version>${redis.version}</version>-->
+<!--            </dependency>-->
             <!-- ehcache 缓存 -->
             <!--            <dependency>-->
             <!--                <groupId>net.sf.ehcache</groupId>-->
@@ -271,6 +271,21 @@
                 <artifactId>core-solar</artifactId>
                 <version>${qmth.boot.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.qmth.boot</groupId>
+                <artifactId>data-mybatis-plus</artifactId>
+                <version>${qmth.boot.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.qmth.boot</groupId>
+                <artifactId>data-redis</artifactId>
+                <version>${qmth.boot.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.qmth.boot</groupId>
+                <artifactId>core-cache</artifactId>
+                <version>${qmth.boot.version}</version>
+            </dependency>
             <dependency>
                 <groupId>org.apache.httpcomponents</groupId>
                 <artifactId>httpmime</artifactId>

+ 7 - 7
themis-admin/src/main/java/com/qmth/themis/admin/api/SysController.java

@@ -89,7 +89,7 @@ public class SysController {
     TEExamStudentService teExamStudentService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Resource
     TOeExamRecordService tOeExamRecordService;
@@ -175,7 +175,7 @@ public class SysController {
         String url = null;
         String filePath = (String) jsonObject.get(SystemConstant.PATH);
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.ADMIN_FILE_HOST);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.ADMIN_FILE_HOST);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置admin文件host"));
         if (Objects.equals(attachmentType, SystemConstant.LOCAL)) {
             url = "http://" + sysConfig.getConfigValue() + File.separator + filePath;
@@ -233,7 +233,7 @@ public class SysController {
         }
         String filePath = (String) jsonObject.get(SystemConstant.PATH);
         String url = null;
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.ADMIN_FILE_HOST);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.ADMIN_FILE_HOST);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置admin文件host"));
         if (oss) {
             Integer uploadType = (Integer) jsonObject.get(SystemConstant.UPLOAD_TYPE);
@@ -256,12 +256,12 @@ public class SysController {
             throw new BusinessException(ExceptionResultEnum.ORG_CODE_IS_NULL);
         }
         if (!Objects.equals(code.toUpperCase(), SystemConstant.ADMIN)) {
-            TBOrg tbOrg = cacheService.addOrgCodeCache(code);
+            TBOrg tbOrg = themisCacheService.addOrgCodeCache(code);
             Optional.ofNullable(tbOrg).orElseThrow(() -> new BusinessException(ExceptionResultEnum.ORG_NO));
             authInfoService.appHasExpired(code);
             return ResultUtil.ok(Collections.singletonMap("logo", tbOrg.getLogo()));
         } else {
-            SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.ADMIN_LOGO_URL);
+            SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.ADMIN_LOGO_URL);
             Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置超级管理员logo"));
             return ResultUtil.ok(Collections.singletonMap("logo", sysConfig.getConfigValue()));
         }
@@ -317,7 +317,7 @@ public class SysController {
                             @ApiParam(value = "类型(区分实时监考台和考务)") @RequestParam(required = false) String type,
                             @ApiParam(value = "是否查询预警消息条数") @RequestParam(required = false) Boolean warnCount) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         List<TEExam> teExamList = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name()) || authDto.getRoleCodes().toString()
                 .contains(RoleEnum.SUPER_ADMIN.name())) {//管理员
@@ -396,7 +396,7 @@ public class SysController {
         }
         //首先查询当前用户所要监控的roomCode
         QueryWrapper<TBExamInvigilateUser> examInvigilateUserQueryWrapper = new QueryWrapper<>();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         examInvigilateUserQueryWrapper.lambda().eq(TBExamInvigilateUser::getOrgId, tbUser.getOrgId())
                 .eq(TBExamInvigilateUser::getExamId, examId);
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {

+ 7 - 7
themis-admin/src/main/java/com/qmth/themis/admin/api/TBOrgController.java

@@ -8,7 +8,7 @@ import com.qmth.themis.business.dto.response.TBOrgDto;
 import com.qmth.themis.business.entity.TBOrg;
 import com.qmth.themis.business.entity.TBUser;
 import com.qmth.themis.business.enums.FieldUniqueEnum;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.TBOrgService;
 import com.qmth.themis.business.util.ServletUtil;
 import com.qmth.themis.business.util.UidUtil;
@@ -52,7 +52,7 @@ public class TBOrgController {
     UidUtil uidUtil;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @ApiOperation(value = "机构查询分页接口")
     @RequestMapping(value = "/query", method = RequestMethod.POST)
@@ -91,8 +91,8 @@ public class TBOrgController {
                 tbOrg.setUpdateId(tbUser.getId());
             }
             tbOrgService.saveOrUpdate(tbOrg);
-            cacheService.updateOrgCache(tbOrg.getId());
-            cacheService.updateOrgCodeCache(tbOrg.getCode());
+            themisCacheService.updateOrgCache(tbOrg.getId());
+            themisCacheService.updateOrgCodeCache(tbOrg.getCode());
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof DuplicateKeyException) {
@@ -124,15 +124,15 @@ public class TBOrgController {
             throw new BusinessException(ExceptionResultEnum.ENABLE_IS_NULL);
         }
         Integer enable = Integer.parseInt(String.valueOf(user.get("enable")));
-        TBOrg tbOrg = cacheService.addOrgCache(orgId);
+        TBOrg tbOrg = themisCacheService.addOrgCache(orgId);
         if (Objects.isNull(tbOrg)) {
             throw new BusinessException(ExceptionResultEnum.ORG_NO);
         }
         //保存机构
         tbOrg.setEnable(enable);
         tbOrgService.updateById(tbOrg);
-        cacheService.updateOrgCache(orgId);
-        cacheService.updateOrgCodeCache(tbOrg.getCode());
+        themisCacheService.updateOrgCache(orgId);
+        themisCacheService.updateOrgCodeCache(tbOrg.getCode());
         return ResultUtil.ok(true);
     }
 }

+ 23 - 23
themis-admin/src/main/java/com/qmth/themis/admin/api/TBUserController.java

@@ -61,7 +61,7 @@ public class TBUserController {
     TBUserService tbUserService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Resource
     RedisUtil redisUtil;
@@ -106,7 +106,7 @@ public class TBUserController {
         String orgCode = String.valueOf(mapParameter.get("code"));
         TBOrg tbOrg = null;
         if (!Objects.equals(orgCode.toUpperCase(), SystemConstant.ADMIN)) {
-            tbOrg = cacheService.addOrgCodeCache(orgCode);
+            tbOrg = themisCacheService.addOrgCodeCache(orgCode);
             if (Objects.isNull(tbOrg)) {
                 throw new BusinessException(ExceptionResultEnum.ORG_NO);
             }
@@ -186,10 +186,10 @@ public class TBUserController {
         Platform platform = ServletUtil.getRequestPlatform();
         String deviceId = ServletUtil.getRequestDeviceId();
         //添加用户鉴权缓存
-        AuthDto authDto = cacheService.addAccountAuthCache(user.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(user.getId());
         //生成token
         String token = SystemConstant.getNanoId();
-        cacheService.addAccountCache(user.getId());
+        themisCacheService.addAccountCache(user.getId());
         Source source = null;
         if (Platform.WIN == platform || Platform.MAC == platform) {
             source = Source.ADMIN_CLIENT;
@@ -228,7 +228,7 @@ public class TBUserController {
             orgMap.put("logo", authDto.getTbOrg().getLogo());
             orgMap.put("enableMonitorRecord", authDto.getTbOrg().getEnableMonitorRecord());
             map.put(SystemConstant.ORG_INFO, orgMap);
-            cacheService.addOrgCache(authDto.getTbOrg().getId());
+            themisCacheService.addOrgCache(authDto.getTbOrg().getId());
         }
         return ResultUtil.ok(map);
     }
@@ -532,7 +532,7 @@ public class TBUserController {
     public Result logout() throws NoSuchAlgorithmException {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBSession tbSession = (TBSession) ServletUtil.getRequestSession();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         if (Objects.isNull(tbSession)) {
             throw new BusinessException(ExceptionResultEnum.LOGIN_NO);
         }
@@ -548,8 +548,8 @@ public class TBUserController {
             }
         }
         if (delete) {
-            cacheService.removeAccountCache(tbUser.getId());
-            cacheService.removeAccountAuthCache(tbUser.getId());
+            themisCacheService.removeAccountCache(tbUser.getId());
+            themisCacheService.removeAccountAuthCache(tbUser.getId());
         }
         //mq发送消息start
         MqDto mqDto = new MqDto(mqUtil.getTopic(), MqTagEnum.USER.name(), SystemOperationEnum.LOGOUT,
@@ -571,7 +571,7 @@ public class TBUserController {
                         @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
                         @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         if (authDto.getRoleCodes().toString().contains(RoleEnum.SUPER_ADMIN.name())) {
             roleCode = Objects.isNull(roleCode) ? RoleEnum.ADMIN.name() : roleCode;
         }
@@ -618,8 +618,8 @@ public class TBUserController {
         TBUser dbUser = null;
         AuthDto authDto = null;
         if (Objects.nonNull(mapParameter.get(SystemConstant.ID))) {
-            dbUser = cacheService.addAccountCache(Long.parseLong(String.valueOf(mapParameter.get(SystemConstant.ID))));
-            authDto = cacheService.addAccountAuthCache(dbUser.getId());
+            dbUser = themisCacheService.addAccountCache(Long.parseLong(String.valueOf(mapParameter.get(SystemConstant.ID))));
+            authDto = themisCacheService.addAccountAuthCache(dbUser.getId());
         }
         TBUser tbUser = GsonUtil.fromJson(GsonUtil.toJson(mapParameter), TBUser.class);
         if ((Objects.isNull(tbUser.getPassword()) || Objects.equals(tbUser.getPassword(), "")) && Objects.nonNull(dbUser)) {
@@ -673,10 +673,10 @@ public class TBUserController {
                     tbSessionService.removeById(sessionId);
                     redisUtil.deleteUserSession(sessionId);
                 }
-                cacheService.removeAccountCache(tbUser.getId());
-                cacheService.removeAccountAuthCache(tbUser.getId());
+                themisCacheService.removeAccountCache(tbUser.getId());
+                themisCacheService.removeAccountAuthCache(tbUser.getId());
             } else {
-                cacheService.removeAccountCache(tbUser.getId());
+                themisCacheService.removeAccountCache(tbUser.getId());
             }
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
@@ -737,7 +737,7 @@ public class TBUserController {
             throw new BusinessException(ExceptionResultEnum.ENABLE_IS_NULL);
         }
         Integer enable = Integer.parseInt(String.valueOf(user.get("enable")));
-        TBUser tbUser = cacheService.addAccountCache(userId);
+        TBUser tbUser = themisCacheService.addAccountCache(userId);
         if (Objects.isNull(tbUser)) {
             throw new BusinessException(ExceptionResultEnum.USER_NO);
         }
@@ -745,7 +745,7 @@ public class TBUserController {
         tbUser.setEnable(enable);
         tbUserService.updateById(tbUser);
         if (enable == 0) {
-            AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+            AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
             if (Objects.nonNull(authDto)) {
                 for (Source s : Source.values()) {
                     String sessionId = SessionUtil
@@ -755,10 +755,10 @@ public class TBUserController {
                     redisUtil.deleteUserSession(sessionId);
                 }
             }
-            cacheService.removeAccountCache(tbUser.getId());
-            cacheService.removeAccountAuthCache(tbUser.getId());
+            themisCacheService.removeAccountCache(tbUser.getId());
+            themisCacheService.removeAccountAuthCache(tbUser.getId());
         } else {
-            cacheService.removeAccountCache(tbUser.getId());
+            themisCacheService.removeAccountCache(tbUser.getId());
         }
         return ResultUtil.ok(true);
     }
@@ -778,7 +778,7 @@ public class TBUserController {
             throw new BusinessException(ExceptionResultEnum.PASSWORD_IS_NULL);
         }
         String password = String.valueOf(mapParameter.get("password"));
-        TBUser tbUser = cacheService.addAccountCache(id);
+        TBUser tbUser = themisCacheService.addAccountCache(id);
         if (Objects.isNull(tbUser)) {
             throw new BusinessException(ExceptionResultEnum.USER_NO);
         }
@@ -787,7 +787,7 @@ public class TBUserController {
         tbUser.setUpdateId(currentUser.getId());
         tbUserService.updateById(tbUser);
 
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         if (Objects.nonNull(authDto)) {
             for (Source s : Source.values()) {
                 String sessionId = SessionUtil
@@ -798,8 +798,8 @@ public class TBUserController {
             }
         }
 
-        cacheService.removeAccountCache(tbUser.getId());
-        cacheService.removeAccountAuthCache(tbUser.getId());
+        themisCacheService.removeAccountCache(tbUser.getId());
+        themisCacheService.removeAccountAuthCache(tbUser.getId());
         return ResultUtil.ok(true);
     }
 }

+ 3 - 3
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamActivityController.java

@@ -68,7 +68,7 @@ public class TEExamActivityController {
     TEExamService teExamService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
 //    @Resource
 //    private MqUtil mqUtil;
@@ -117,7 +117,7 @@ public class TEExamActivityController {
         if (Objects.nonNull(teAudioIPage) && !CollectionUtils.isEmpty(teAudioIPage.getRecords())) {
             for (TEAudio t : teAudioIPage.getRecords()) {
                 if (Objects.nonNull(t.getAttachmentId())) {
-                    TBAttachment tbAttachment = cacheService.attachmentCache(t.getAttachmentId());
+                    TBAttachment tbAttachment = themisCacheService.attachmentCache(t.getAttachmentId());
                     if (Objects.nonNull(tbAttachment) && Objects.nonNull(tbAttachment.getRemark())) {
                         JSONObject jsonObject = JSONObject.parseObject(tbAttachment.getRemark());
                         t.setAttachmentPath(ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + jsonObject.getString(SystemConstant.PATH));
@@ -214,7 +214,7 @@ public class TEExamActivityController {
             teAudio.setEnable(!enable ? null : enable);
             teAudio.updateInfo(tbUser.getId());
             teAudioService.updateById(teAudio);
-            cacheService.updateExamAudioCache(teAudio.getId());
+            themisCacheService.updateExamAudioCache(teAudio.getId());
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof DuplicateKeyException) {

+ 4 - 4
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamController.java

@@ -83,7 +83,7 @@ public class TEExamController {
     private TEExamPaperService examPaperService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Resource
     TSLogService tsLogService;
@@ -291,7 +291,7 @@ public class TEExamController {
                         @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
                         @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.SELECT_PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INSPECTION.name())) {
             userId = null;
         }
@@ -465,7 +465,7 @@ public class TEExamController {
         }
         //首先查询当前用户所要监控的roomCode
         QueryWrapper<TBExamInvigilateUser> examInvigilateUserQueryWrapper = new QueryWrapper<>();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         examInvigilateUserQueryWrapper.lambda().eq(TBExamInvigilateUser::getOrgId, tbUser.getOrgId())
                 .eq(TBExamInvigilateUser::getExamId, examId);
@@ -726,7 +726,7 @@ public class TEExamController {
                 if ((System.currentTimeMillis() - t.getFinishTime().longValue()) / 1000 / 60 >= 30) {//超过30分钟则改状态
                     try {
                         ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(t.getExamStudentId());
-                        TEStudentCacheDto teStudent = cacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
+                        TEStudentCacheDto teStudent = themisCacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
                         commonService.persisted(t.getId(), teStudent.getId());
                     } catch (Exception e) {
                     }

+ 2 - 2
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamReexamController.java

@@ -67,7 +67,7 @@ public class TEExamReexamController {
     TEExamStudentService teExamStudentService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @ApiOperation(value = "重考申请接口")
     @RequestMapping(value = "/apply", method = RequestMethod.POST)
@@ -259,7 +259,7 @@ public class TEExamReexamController {
                        @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
                        @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {

+ 3 - 4
themis-admin/src/main/java/com/qmth/themis/admin/api/TENotifyController.java

@@ -1,7 +1,6 @@
 package com.qmth.themis.admin.api;
 
 import com.alibaba.fastjson.JSONObject;
-import com.qmth.themis.admin.config.DictionaryConfig;
 import com.qmth.themis.business.bean.admin.TencentEventBean;
 import com.qmth.themis.business.bean.status.MonitorStatusBean;
 import com.qmth.themis.business.cache.ExamRecordCacheUtil;
@@ -9,7 +8,7 @@ import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.dto.MqDto;
 import com.qmth.themis.business.entity.*;
 import com.qmth.themis.business.enums.*;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.MqDtoService;
 import com.qmth.themis.business.service.TMTencentVideoMessageService;
 import com.qmth.themis.business.service.TOeExamRecordService;
@@ -76,7 +75,7 @@ public class TENotifyController {
     MqDtoService mqDtoService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @ApiOperation(value = "腾讯云视频接口回调")
     @RequestMapping(value = "/record/tencent", method = RequestMethod.POST)
@@ -311,7 +310,7 @@ public class TENotifyController {
         MonitorCallStatusSourceEnum callStatus = Objects.nonNull(ExamRecordCacheUtil.getMonitorCallStatus(recordId, MonitorVideoSourceEnum.valueOf(source))) ? ExamRecordCacheUtil.getMonitorCallStatus(recordId, MonitorVideoSourceEnum.valueOf(source)) : null;
         ExamRecordCacheUtil.setMonitorCallStatus(recordId, MonitorVideoSourceEnum.valueOf(source), callStatus, eventTime);
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
         String liveUrl = SystemConstant.setStreamId(sysConfig.getConfigValue(), recordId, MonitorVideoSourceEnum.valueOf(source));

+ 3 - 3
themis-admin/src/main/java/com/qmth/themis/admin/api/TEStudentController.java

@@ -11,7 +11,7 @@ import com.qmth.themis.business.entity.TBUser;
 import com.qmth.themis.business.entity.TEStudent;
 import com.qmth.themis.business.entity.TOeExamRecord;
 import com.qmth.themis.business.enums.MonitorVideoSourceEnum;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.TEStudentService;
 import com.qmth.themis.business.util.OssUtil;
 import com.qmth.themis.business.util.ServletUtil;
@@ -53,7 +53,7 @@ public class TEStudentController {
     OssUtil ossUtil;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @ApiOperation(value = "学生查询接口")
     @RequestMapping(value = "/query", method = RequestMethod.POST)
@@ -106,7 +106,7 @@ public class TEStudentController {
         teStudent.setEnable(enable);
         teStudent.setUpdateId(tbUser.getId());
         teStudentService.updateById(teStudent);
-        cacheService.updateStudentAccountCache(teStudent.getId());
+        themisCacheService.updateStudentAccountCache(teStudent.getId());
         return ResultUtil.ok(true);
     }
 

+ 5 - 5
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateCallMobileController.java

@@ -77,7 +77,7 @@ public class TIeInvigilateCallMobileController {
     MqUtil mqUtil;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @ApiOperation(value = "监考监控通话查询接口")
     @RequestMapping(value = "/call/list", method = RequestMethod.POST)
@@ -101,7 +101,7 @@ public class TIeInvigilateCallMobileController {
             }
         }
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -142,7 +142,7 @@ public class TIeInvigilateCallMobileController {
             }
         }
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -192,7 +192,7 @@ public class TIeInvigilateCallMobileController {
             throw new BusinessException("来源不能为空!");
         }
         MonitorVideoSourceEnum source = MonitorVideoSourceEnum.valueOf(String.valueOf(mapParameter.get(Constants.HEADER_SOURCE)));
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
         //获取考试记录缓存
@@ -247,7 +247,7 @@ public class TIeInvigilateCallMobileController {
         }
         MonitorVideoSourceEnum source = MonitorVideoSourceEnum.valueOf(String.valueOf(mapParameter.get(Constants.HEADER_SOURCE)));
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
         //获取考试记录缓存
         String liveUrl = SystemConstant.setStreamId(sysConfig.getConfigValue(), recordId, source);

+ 12 - 13
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateController.java

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.qmth.themis.admin.config.DictionaryConfig;
 import com.qmth.themis.business.annotation.ApiJsonObject;
 import com.qmth.themis.business.annotation.ApiJsonProperty;
 import com.qmth.themis.business.bean.admin.*;
@@ -86,7 +85,7 @@ public class TIeInvigilateController {
     MqUtil mqUtil;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @ApiOperation(value = "实时监控台视频列表接口")
     @RequestMapping(value = "/list/video", method = RequestMethod.POST)
@@ -109,7 +108,7 @@ public class TIeInvigilateController {
                             @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
                             @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -150,7 +149,7 @@ public class TIeInvigilateController {
                             }
                         });
                     }
-                    SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+                    SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
                     Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
                     if (Objects.nonNull(monitorVideoSource)) {
@@ -185,7 +184,7 @@ public class TIeInvigilateController {
             throw new BusinessException("随机数不能为空");
         }
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -200,7 +199,7 @@ public class TIeInvigilateController {
                     monitorVideoSourceList = Arrays.asList(s.getMonitorVideoSource().trim().toUpperCase().replaceAll(" ", "").split(","));
                 }
                 MonitorVideoSourceEnum mainMonitorVideoSource = SystemConstant.getMainMonitor(monitorVideoSourceList);
-                SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+                SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
                 Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
                 if (Objects.nonNull(mainMonitorVideoSource)) {
@@ -246,7 +245,7 @@ public class TIeInvigilateController {
                               @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
                               @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -274,7 +273,7 @@ public class TIeInvigilateController {
                                   @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
                                   @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount) throws Exception {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -312,7 +311,7 @@ public class TIeInvigilateController {
             breachStatus = Objects.isNull(ExamRecordCacheUtil.getBreachStatus(examRecordId)) ? 1 : ExamRecordCacheUtil.getBreachStatus(examRecordId);
         }
         ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
-        TEStudentCacheDto teStudent = cacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
+        TEStudentCacheDto teStudent = themisCacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
         String basePhotoPath = ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + teStudent.getBasePhotoPath();
         String identity = examStudentCacheBean.getIdentity();
         String examStudentName = examStudentCacheBean.getName();
@@ -344,7 +343,7 @@ public class TIeInvigilateController {
 
         //2020/11/24新增管理员不清除预警状态
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
             //清除预警未阅状态
             UpdateWrapper<TIeInvigilateWarnInfo> tIeExamInvigilateNoticeUpdateWrapper = new UpdateWrapper<>();
@@ -418,7 +417,7 @@ public class TIeInvigilateController {
                              @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
                              @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -461,7 +460,7 @@ public class TIeInvigilateController {
                                @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
                                @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -481,7 +480,7 @@ public class TIeInvigilateController {
                                    @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
                                    @ApiParam(value = "状态", required = false) @RequestParam(required = false) Integer status) throws Exception {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {

+ 7 - 7
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateWarnInfoController.java

@@ -10,7 +10,7 @@ import com.qmth.themis.business.dto.response.TIeWarningNotifyDto;
 import com.qmth.themis.business.entity.TBUser;
 import com.qmth.themis.business.entity.TIeInvigilateWarnInfo;
 import com.qmth.themis.business.enums.RoleEnum;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.TIeInvigilateWarnInfoService;
 import com.qmth.themis.business.service.TOeExamRecordService;
 import com.qmth.themis.business.util.ServletUtil;
@@ -52,7 +52,7 @@ public class TIeInvigilateWarnInfoController {
     TOeExamRecordService tOeExamRecordService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @ApiOperation(value = "预警提醒接口")
     @RequestMapping(value = "/notify", method = RequestMethod.POST)
@@ -61,7 +61,7 @@ public class TIeInvigilateWarnInfoController {
                          @ApiParam(value = "考试场次id", required = false) @RequestParam(required = false) Long examActivityId,
                          @ApiParam(value = "虚拟考场代码", required = false) @RequestParam(required = false) String roomCode) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -89,7 +89,7 @@ public class TIeInvigilateWarnInfoController {
                        @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
                        @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -103,7 +103,7 @@ public class TIeInvigilateWarnInfoController {
     @ApiResponses({@ApiResponse(code = 200, message = "预警通知信息", response = TIeWarningNotifyDto.class)})
     public Result warningMessage(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
@@ -122,7 +122,7 @@ public class TIeInvigilateWarnInfoController {
         }
         //2020/11/24新增管理员不清除预警状态
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
             if (CollectionUtils.isEmpty(warnInfoParams.getWarningIds()) && Objects.isNull(warnInfoParams.getExamRecordId())) {
                 throw new BusinessException("预警id数组或考试记录id不能同时为空");
@@ -156,7 +156,7 @@ public class TIeInvigilateWarnInfoController {
                                           @ApiParam(value = "预警量min", required = false) @RequestParam(required = false) Integer minWarningCount,
                                           @ApiParam(value = "预警量max", required = false) @RequestParam(required = false) Integer maxWarningCount) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
+        AuthDto authDto = themisCacheService.addAccountAuthCache(tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
         Long userId = null;
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {

+ 56 - 56
themis-admin/src/main/java/com/qmth/themis/admin/config/DruidConfig.java

@@ -1,56 +1,56 @@
-package com.qmth.themis.admin.config;
-
-import com.alibaba.druid.pool.DruidDataSource;
-import com.alibaba.druid.support.http.StatViewServlet;
-import com.alibaba.druid.support.http.WebStatFilter;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
-import org.springframework.boot.web.servlet.ServletRegistrationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import javax.sql.DataSource;
-
-/**
- * @Description: druid数据源配置
- * @Param:
- * @return:
- * @Author: wangliang
- * @Date: 2019/10/11
- */
-@Configuration
-public class DruidConfig {
-
-    @Bean
-    public ServletRegistrationBean druidServlet() {
-        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
-        // IP白名单
-        servletRegistrationBean.addInitParameter("allow", "*");
-        // IP黑名单(共同存在时,deny优先于allow)
-//        servletRegistrationBean.addInitParameter("deny", "192.168.1.206");
-        //控制台管理用户
-        servletRegistrationBean.addInitParameter("loginUsername", "admin");
-        servletRegistrationBean.addInitParameter("loginPassword", "admin");
-        //是否能够重置数据 禁用HTML页面上的“Reset All”功能
-        servletRegistrationBean.addInitParameter("resetEnable", "false");
-        return servletRegistrationBean;
-    }
-
-    @Bean
-    public FilterRegistrationBean filterRegistrationBean() {
-        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter());
-        filterRegistrationBean.addUrlPatterns("/*");
-        filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
-        return filterRegistrationBean;
-    }
-
-    /**
-     * 单数据源可以直接放开以下注释行
-     */
-    @Bean
-    @ConfigurationProperties(prefix = "spring.datasource")
-    public DataSource druid() {
-        return new DruidDataSource();
-    }
-}
-
+//package com.qmth.themis.admin.config;
+//
+//import com.alibaba.druid.pool.DruidDataSource;
+//import com.alibaba.druid.support.http.StatViewServlet;
+//import com.alibaba.druid.support.http.WebStatFilter;
+//import org.springframework.boot.context.properties.ConfigurationProperties;
+//import org.springframework.boot.web.servlet.FilterRegistrationBean;
+//import org.springframework.boot.web.servlet.ServletRegistrationBean;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//
+//import javax.sql.DataSource;
+//
+///**
+// * @Description: druid数据源配置
+// * @Param:
+// * @return:
+// * @Author: wangliang
+// * @Date: 2019/10/11
+// */
+//@Configuration
+//public class DruidConfig {
+//
+//    @Bean
+//    public ServletRegistrationBean druidServlet() {
+//        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
+//        // IP白名单
+//        servletRegistrationBean.addInitParameter("allow", "*");
+//        // IP黑名单(共同存在时,deny优先于allow)
+////        servletRegistrationBean.addInitParameter("deny", "192.168.1.206");
+//        //控制台管理用户
+//        servletRegistrationBean.addInitParameter("loginUsername", "admin");
+//        servletRegistrationBean.addInitParameter("loginPassword", "admin");
+//        //是否能够重置数据 禁用HTML页面上的“Reset All”功能
+//        servletRegistrationBean.addInitParameter("resetEnable", "false");
+//        return servletRegistrationBean;
+//    }
+//
+//    @Bean
+//    public FilterRegistrationBean filterRegistrationBean() {
+//        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter());
+//        filterRegistrationBean.addUrlPatterns("/*");
+//        filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
+//        return filterRegistrationBean;
+//    }
+//
+//    /**
+//     * 单数据源可以直接放开以下注释行
+//     */
+//    @Bean
+//    @ConfigurationProperties(prefix = "spring.datasource")
+//    public DataSource druid() {
+//        return new DruidDataSource();
+//    }
+//}
+//

+ 3 - 3
themis-admin/src/main/java/com/qmth/themis/admin/config/WebMvcConfig.java

@@ -4,7 +4,7 @@ import com.qmth.themis.admin.interceptor.AuthInterceptor;
 import com.qmth.themis.admin.interceptor.AuthThirdInterceptor;
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.entity.SysConfig;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.common.exception.BusinessException;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.context.annotation.Bean;
@@ -28,7 +28,7 @@ import java.util.Optional;
 public class WebMvcConfig implements WebMvcConfigurer {
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Bean
     public AuthInterceptor AuthInterceptor() {
@@ -42,7 +42,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
 
     @Override
     public void addInterceptors(InterceptorRegistry registry) {
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.ADMIN_NO_AUTH_URLS);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.ADMIN_NO_AUTH_URLS);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置admin无需鉴权的url"));
 
         List<String> list = Arrays.asList(StringUtils.split(sysConfig.getConfigValue(), ","));

+ 3 - 3
themis-admin/src/main/java/com/qmth/themis/admin/interceptor/AuthInterceptor.java

@@ -2,7 +2,7 @@ package com.qmth.themis.admin.interceptor;
 
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.entity.SysConfig;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.util.AuthUtil;
 import com.qmth.themis.business.util.ServletUtil;
 import com.qmth.themis.common.enums.ExceptionResultEnum;
@@ -31,7 +31,7 @@ public class AuthInterceptor implements HandlerInterceptor {
     private final static Logger log = LoggerFactory.getLogger(AuthInterceptor.class);
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Override
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) {
@@ -47,7 +47,7 @@ public class AuthInterceptor implements HandlerInterceptor {
         Long time = ServletUtil.getRequestTime();
         log.info("Start authorization: url:{}, method:{}, platform:{}, deviceId:{}, authorization:{}, time:{}", url,
                 method, platform, deviceId, authorization, time);
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.ADMIN_COMMON_SYSTEM_URLS);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.ADMIN_COMMON_SYSTEM_URLS);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置admin无需鉴权的url"));
         return AuthUtil.adminAuthInterceptor(platform, deviceId, authorization, time, Arrays.asList(StringUtils.split(sysConfig.getConfigValue(), ",")), request, response);
     }

+ 3 - 3
themis-admin/src/main/java/com/qmth/themis/admin/interceptor/AuthThirdInterceptor.java

@@ -2,7 +2,7 @@ package com.qmth.themis.admin.interceptor;
 
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.entity.SysConfig;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.util.AuthUtil;
 import com.qmth.themis.business.util.ServletUtil;
 import com.qmth.themis.common.enums.ExceptionResultEnum;
@@ -31,7 +31,7 @@ public class AuthThirdInterceptor implements HandlerInterceptor {
     private final static Logger log = LoggerFactory.getLogger(AuthThirdInterceptor.class);
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Override
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {
@@ -47,7 +47,7 @@ public class AuthThirdInterceptor implements HandlerInterceptor {
         Long time = ServletUtil.getRequestTime();
         log.info("Start authorization: url:{}, method:{}, platform:{}, deviceId:{}, authorization:{}, time:{}", url,
                 method, platform, deviceId, authorization, time);
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.ADMIN_COMMON_SYSTEM_URLS);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.ADMIN_COMMON_SYSTEM_URLS);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置admin无需鉴权的url"));
         return AuthUtil.adminAuthInterceptor(platform, deviceId, authorization, time, Arrays.asList(StringUtils.split(sysConfig.getConfigValue(), ",")), request, response);
     }

+ 14 - 72
themis-admin/src/main/resources/application.properties

@@ -24,84 +24,26 @@ db.port=3306
 db.name=themis_v1.1
 db.username=root
 db.password=123456789
+
 #redis\u6570\u636E\u6E90\u914D\u7F6E
-redis.host=${db.host}
-redis.database=13
-redis.port=6379
-redis.password=
-#redis.password=123456
+com.qmth.redis.host=${db.host}
+com.qmth.redis.port=6379
+com.qmth.redis.db=13
+#com.qmth.redis.password=
 
-#mongodb\u6570\u636E\u6E90\u914D\u7F6E
-#mongodb.database=themis-admin
-#mongodb.host=${db.host}
-#mongodb.port=27017
-spring.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8
-spring.datasource.username=${db.username}
-spring.datasource.password=${db.password}
-spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
-spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
-#\u4E0B\u9762\u4E3Adruid\u8FDE\u63A5\u6C60\u7684\u8865\u5145\u8BBE\u7F6E\uFF0C\u5E94\u7528\u5230\u4E0A\u9762\u6240\u6709\u6570\u636E\u6E90\u4E2D
-#\u521D\u59CB\u5316\u65F6\u5EFA\u7ACB\u7269\u7406\u8FDE\u63A5\u7684\u4E2A\u6570\u3002\u521D\u59CB\u5316\u53D1\u751F\u5728\u663E\u793A\u8C03\u7528init\u65B9\u6CD5\uFF0C\u6216\u8005\u7B2C\u4E00\u6B21getConnection\u65F6
-spring.datasource.initial-size=10
-#\u6700\u5C0F\u8FDE\u63A5\u6C60\u6570\u91CF
-spring.datasource.min-idle=40
-#\u6700\u5927\u8FDE\u63A5\u6C60\u6570\u91CF
-spring.datasource.max-active=200
-#\u83B7\u53D6\u8FDE\u63A5\u65F6\u6700\u5927\u7B49\u5F85\u65F6\u95F4\uFF0C\u5355\u4F4D\u6BEB\u79D2\u3002\u914D\u7F6E\u4E86maxWait\u4E4B\u540E\uFF0C\u7F3A\u7701\u542F\u7528\u516C\u5E73\u9501\uFF0C\u5E76\u53D1\u6548\u7387\u4F1A\u6709\u6240\u4E0B\u964D\uFF0C\u5982\u679C\u9700\u8981\u53EF\u4EE5\u901A\u8FC7\u914D\u7F6EuseUnfairLock\u5C5E\u6027\u4E3Atrue\u4F7F\u7528\u975E\u516C\u5E73\u9501\u3002
-spring.datasource.max-wait=60000
-#\u914D\u7F6E\u95F4\u9694\u591A\u4E45\u624D\u8FDB\u884C\u4E00\u6B21\u68C0\u6D4B\uFF0C\u68C0\u6D4B\u9700\u8981\u5173\u95ED\u7684\u7A7A\u95F2\u8FDE\u63A5\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
-spring.datasource.time-between-eviction-runs-millis=60000
-#\u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5C0F\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
-spring.datasource.min-evictable-idle-time-millis=300000
-#\u7528\u6765\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\u7684sql\uFF0C\u8981\u6C42\u662F\u4E00\u4E2A\u67E5\u8BE2\u8BED\u53E5\uFF0C\u5E38\u7528select 'x'\u3002\u5982\u679CvalidationQuery\u4E3Anull\uFF0CtestOnBorrow\u3001testOnReturn\u3001testWhileIdle\u90FD\u4E0D\u4F1A\u8D77\u4F5C\u7528
-spring.datasource.validation-query=SELECT 1 FROM DUAL
-#\u5EFA\u8BAE\u914D\u7F6E\u4E3Atrue\uFF0C\u4E0D\u5F71\u54CD\u6027\u80FD\uFF0C\u5E76\u4E14\u4FDD\u8BC1\u5B89\u5168\u6027\u3002\u7533\u8BF7\u8FDE\u63A5\u7684\u65F6\u5019\u68C0\u6D4B\uFF0C\u5982\u679C\u7A7A\u95F2\u65F6\u95F4\u5927\u4E8EtimeBetweenEvictionRunsMillis\uFF0C\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\u3002
-spring.datasource.test-while-idle=true
-#\u7533\u8BF7\u8FDE\u63A5\u65F6\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\uFF0C\u505A\u4E86\u8FD9\u4E2A\u914D\u7F6E\u4F1A\u964D\u4F4E\u6027\u80FD\u3002
-spring.datasource.test-on-borrow=false
-#\u5F52\u8FD8\u8FDE\u63A5\u65F6\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\uFF0C\u505A\u4E86\u8FD9\u4E2A\u914D\u7F6E\u4F1A\u964D\u4F4E\u6027\u80FD\u3002
-spring.datasource.test-on-return=false
-#\u662F\u5426\u7F13\u5B58preparedStatement\uFF0C\u4E5F\u5C31\u662FPSCache\u3002PSCache\u5BF9\u652F\u6301\u6E38\u6807\u7684\u6570\u636E\u5E93\u6027\u80FD\u63D0\u5347\u5DE8\u5927\uFF0C\u6BD4\u5982\u8BF4oracle\u3002\u5728mysql\u4E0B\u5EFA\u8BAE\u5173\u95ED\u3002(mysql5.5+\u5EFA\u8BAE\u5F00\u542F)
-spring.datasource.pool-prepared-statements=true
-#\u8981\u542F\u7528PSCache\uFF0C\u5FC5\u987B\u914D\u7F6E\u5927\u4E8E0\uFF0C\u5F53\u5927\u4E8E0\u65F6\uFF0CpoolPreparedStatements\u81EA\u52A8\u89E6\u53D1\u4FEE\u6539\u4E3Atrue\u3002\u5728Druid\u4E2D\uFF0C\u4E0D\u4F1A\u5B58\u5728Oracle\u4E0BPSCache\u5360\u7528\u5185\u5B58\u8FC7\u591A\u7684\u95EE\u9898\uFF0C\u53EF\u4EE5\u628A\u8FD9\u4E2A\u6570\u503C\u914D\u7F6E\u5927\u4E00\u4E9B\uFF0C\u6BD4\u5982\u8BF4100
-spring.datasource.max-pool-prepared-statement-per-connection-size=20
-#\u914D\u7F6E\u76D1\u63A7\u7EDF\u8BA1\u62E6\u622A\u7684filters\uFF0C\u53BB\u6389\u540E\u76D1\u63A7\u754C\u9762sql\u65E0\u6CD5\u7EDF\u8BA1\uFF0C'wall'\u7528\u4E8E\u9632\u706B\u5899
-spring.datasource.filters=stat,wall,slf4j
-#\u5408\u5E76\u591A\u4E2Adatasource\u76D1\u63A7
-spring.datasource.use-global-data-source-stat=true
-# \u901A\u8FC7connectProperties\u5C5E\u6027\u6765\u6253\u5F00mergeSql\u529F\u80FD\uFF1B\u6162SQL\u8BB0\u5F55
-spring.datasource.connect-properties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;
-#\u53EA\u8981\u5C06\u5176\u503C\u66F4\u6539\u4E3Afalse\u65F6\u5C31\u53EF\u4EE5\u89E3\u51B3\u5982\u4E0B\u95EE\u9898\uFF0C\u5373\u5B58\u5728id\u6216\u8005name\u76F8\u540C\u7684bean\u65F6\uFF0C\u4E0D\u662F\u6253\u5370\u51FA\u76F8\u5173\u4FE1\u606F\uFF0C\u800C\u662F\u76F4\u63A5\u629B\u5F02\u5E38\uFF0C\u8FD9\u6837\u5C31\u53EF\u4EE5\u8FEB\u4F7F\u5F00\u53D1\u4EBA\u5458\u5FC5\u987B\u89E3\u51B3id\u6216\u8005name\u91CD\u590D\u7684\u95EE\u9898\u540E\u624D\u80FD\u6210\u529F\u542F\u52A8\u5BB9\u5668\u3002\u7136\u540E\u5C31\u5C1D\u8BD5\u4E86\u4E0B\uFF0C
-spring.main.allow-bean-definition-overriding=false
+#mysql\u914D\u7F6E
+com.qmth.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
+com.qmth.datasource.username=${db.username}
+com.qmth.datasource.password=${db.password}
+com.qmth.mybatis.log-level=debug
 
 #\u65E5\u5FD7\u914D\u7F6E
 logging.level.root=info
 
-# MyBatis-Plus\u914D\u7F6E
-mybatis-plus.typeAliasesPackage=com.qmth.themis.business.entity
-mybatis-plus.mapper-locations=classpath:/mapper/*Mapper.xml
-mybatis-plus.global-config.id-type=1
-mybatis-plus.configuration.map-underscore-to-camel-case=true
-mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
-logging.level.com.qmth.themis.business.dao=debug
-mybatis-plus.configuration.call-setters-on-nulls=true
-
-#redis
-spring.redis.database=${redis.database}
-spring.redis.host=${redis.host}
-spring.redis.port=${redis.port}
-spring.redis.password=${redis.password}
-# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
-# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
-spring.redis.jedis.pool.max-active=30
-# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
-spring.redis.jedis.pool.max-wait=-1ms
-# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5
-spring.redis.jedis.pool.max-idle=5
-# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5
-spring.redis.jedis.pool.min-idle=1
-# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
-spring.redis.jedis.timeout=180000
+#mongodb\u6570\u636E\u6E90\u914D\u7F6E
+#mongodb.database=themis-admin
+#mongodb.host=${db.host}
+#mongodb.port=27017
 
 #mongodb
 #spring.data.mongodb.uri=mongodb://${mongodb.host}:${mongodb.port}/${mongodb.database}

+ 32 - 24
themis-business/pom.xml

@@ -40,30 +40,30 @@
 <!--			<groupId>net.sf.ehcache</groupId>-->
 <!--			<artifactId>ehcache</artifactId>-->
 <!--		</dependency>-->
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-cache</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework.data</groupId>
-			<artifactId>spring-data-redis</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>redis.clients</groupId>
-			<artifactId>jedis</artifactId>
-		</dependency>
+<!--		<dependency>-->
+<!--			<groupId>org.springframework.boot</groupId>-->
+<!--			<artifactId>spring-boot-starter-cache</artifactId>-->
+<!--		</dependency>-->
+<!--		<dependency>-->
+<!--			<groupId>org.springframework.data</groupId>-->
+<!--			<artifactId>spring-data-redis</artifactId>-->
+<!--		</dependency>-->
+<!--		<dependency>-->
+<!--			<groupId>redis.clients</groupId>-->
+<!--			<artifactId>jedis</artifactId>-->
+<!--		</dependency>-->
 		<dependency>
 			<groupId>com.aliyun.oss</groupId>
 			<artifactId>aliyun-sdk-oss</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>mysql</groupId>
-			<artifactId>mysql-connector-java</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.baomidou</groupId>
-			<artifactId>mybatis-plus-boot-starter</artifactId>
-		</dependency>
+<!--		<dependency>-->
+<!--			<groupId>mysql</groupId>-->
+<!--			<artifactId>mysql-connector-java</artifactId>-->
+<!--		</dependency>-->
+<!--		<dependency>-->
+<!--			<groupId>com.baomidou</groupId>-->
+<!--			<artifactId>mybatis-plus-boot-starter</artifactId>-->
+<!--		</dependency>-->
 		<dependency>
 			<groupId>ch.qos.logback</groupId>
 			<artifactId>logback-core</artifactId>
@@ -84,10 +84,10 @@
             <groupId>io.springfox</groupId>
             <artifactId>springfox-swagger-ui</artifactId>
         </dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>druid</artifactId>
-		</dependency>
+<!--		<dependency>-->
+<!--			<groupId>com.alibaba</groupId>-->
+<!--			<artifactId>druid</artifactId>-->
+<!--		</dependency>-->
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-aop</artifactId>
@@ -104,5 +104,13 @@
 		<!-- <groupId>org.springframework.boot</groupId> -->
 		<!-- <artifactId>spring-boot-starter-quartz</artifactId> -->
 		<!-- </dependency> -->
+        <dependency>
+            <groupId>com.qmth.boot</groupId>
+            <artifactId>data-mybatis-plus</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.qmth.boot</groupId>
+            <artifactId>data-redis</artifactId>
+        </dependency>
 	</dependencies>
 </project>

+ 52 - 52
themis-business/src/main/java/com/qmth/themis/business/config/MybatisPlusConfig.java

@@ -1,52 +1,52 @@
-package com.qmth.themis.business.config;
-
-import com.baomidou.mybatisplus.annotation.DbType;
-import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
-import com.baomidou.mybatisplus.core.config.GlobalConfig;
-import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
-import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
-import com.qmth.themis.business.base.CustomizedSqlInjector;
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @Description: mybatis-plus配置
- * @Param:
- * @return:
- * @Author: wangliang
- * @Date: 2022/5/11
- */
-@Configuration
-@MapperScan(basePackages = {"com.qmth.themis.business.dao"})
-public class MybatisPlusConfig {
-
-    /**
-     * 自动填充功能
-     *
-     * @return
-     */
-    @Bean
-    public GlobalConfig globalConfig() {
-        GlobalConfig globalConfig = new GlobalConfig();
-        globalConfig.setMetaObjectHandler(new MetaHandler());
-        return globalConfig;
-    }
-
-    @Bean
-    public MybatisPlusInterceptor mybatisPlusInterceptor() {
-        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
-        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
-        return interceptor;
-    }
-
-    @Bean
-    public ConfigurationCustomizer configurationCustomizer() {
-        return configuration -> configuration.setUseDeprecatedExecutor(false);
-    }
-
-    @Bean
-    public CustomizedSqlInjector customizedSqlInjector() {
-        return new CustomizedSqlInjector();
-    }
-}
+//package com.qmth.themis.business.config;
+//
+//import com.baomidou.mybatisplus.annotation.DbType;
+//import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
+//import com.baomidou.mybatisplus.core.config.GlobalConfig;
+//import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+//import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+//import com.qmth.themis.business.base.CustomizedSqlInjector;
+//import org.mybatis.spring.annotation.MapperScan;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//
+///**
+// * @Description: mybatis-plus配置
+// * @Param:
+// * @return:
+// * @Author: wangliang
+// * @Date: 2022/5/11
+// */
+//@Configuration
+//@MapperScan(basePackages = {"com.qmth.themis.business.dao"})
+//public class MybatisPlusConfig {
+//
+//    /**
+//     * 自动填充功能
+//     *
+//     * @return
+//     */
+//    @Bean
+//    public GlobalConfig globalConfig() {
+//        GlobalConfig globalConfig = new GlobalConfig();
+//        globalConfig.setMetaObjectHandler(new MetaHandler());
+//        return globalConfig;
+//    }
+//
+//    @Bean
+//    public MybatisPlusInterceptor mybatisPlusInterceptor() {
+//        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+//        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+//        return interceptor;
+//    }
+//
+//    @Bean
+//    public ConfigurationCustomizer configurationCustomizer() {
+//        return configuration -> configuration.setUseDeprecatedExecutor(false);
+//    }
+//
+//    @Bean
+//    public CustomizedSqlInjector customizedSqlInjector() {
+//        return new CustomizedSqlInjector();
+//    }
+//}

+ 106 - 106
themis-business/src/main/java/com/qmth/themis/business/config/RedisConfig.java

@@ -1,107 +1,107 @@
-package com.qmth.themis.business.config;
-
-import com.fasterxml.jackson.annotation.JsonAutoDetect;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.PropertyAccessor;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
-import com.qmth.themis.business.constant.SystemConstant;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-import org.springframework.data.redis.cache.RedisCacheConfiguration;
-import org.springframework.data.redis.cache.RedisCacheManager;
-import org.springframework.data.redis.cache.RedisCacheWriter;
-import org.springframework.data.redis.connection.RedisConnectionFactory;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
-import org.springframework.data.redis.serializer.RedisSerializationContext;
-import org.springframework.data.redis.serializer.StringRedisSerializer;
-
-import java.time.Duration;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @Description: redis config
- * @Param:
- * @return:
- * @Author: wangliang
- * @Date: 2020/4/16
- */
-@Configuration
-public class RedisConfig {
-
-    @Bean
-    public RedisCacheManager cacheManager(RedisConnectionFactory redisConnectionFactory) {
-        return new RedisCacheManager(RedisCacheWriter.nonLockingRedisCacheWriter(redisConnectionFactory),
-                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_DEFAULT_EXPIRE_TIME)
-//                , // 默认策略,未配置的 key 会使用这个
-//                this.getRedisCacheConfigurationMap() // 指定 key 策略
-        );
-    }
-
-//    private Map<String, RedisCacheConfiguration> getRedisCacheConfigurationMap() {
-//        Map<String, RedisCacheConfiguration> redisCacheConfigurationMap = new HashMap<>();
-//        redisCacheConfigurationMap.put(SystemConstant.userOauth,
-//                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
-//        redisCacheConfigurationMap.put(SystemConstant.studentOauth,
-//                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
-//        redisCacheConfigurationMap.put(SystemConstant.userAccount,
-//                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
-//        redisCacheConfigurationMap.put(SystemConstant.studentAccount,
-//                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
-//        redisCacheConfigurationMap.put(SystemConstant.orgCache,
-//                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
-//        redisCacheConfigurationMap.put(SystemConstant.orgCodeCache,
-//                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
-//        redisCacheConfigurationMap.put(SystemConstant.roleCache,
-//                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
-//        redisCacheConfigurationMap.put(SystemConstant.configCache,
-//                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
-//        return redisCacheConfigurationMap;
+//package com.qmth.themis.business.config;
+//
+//import com.fasterxml.jackson.annotation.JsonAutoDetect;
+//import com.fasterxml.jackson.annotation.JsonTypeInfo;
+//import com.fasterxml.jackson.annotation.PropertyAccessor;
+//import com.fasterxml.jackson.databind.ObjectMapper;
+//import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
+//import com.qmth.themis.business.constant.SystemConstant;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.Primary;
+//import org.springframework.data.redis.cache.RedisCacheConfiguration;
+//import org.springframework.data.redis.cache.RedisCacheManager;
+//import org.springframework.data.redis.cache.RedisCacheWriter;
+//import org.springframework.data.redis.connection.RedisConnectionFactory;
+//import org.springframework.data.redis.core.RedisTemplate;
+//import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+//import org.springframework.data.redis.serializer.RedisSerializationContext;
+//import org.springframework.data.redis.serializer.StringRedisSerializer;
+//
+//import java.time.Duration;
+//import java.util.HashMap;
+//import java.util.Map;
+//
+///**
+// * @Description: redis config
+// * @Param:
+// * @return:
+// * @Author: wangliang
+// * @Date: 2020/4/16
+// */
+//@Configuration
+//public class RedisConfig {
+//
+//    @Bean
+//    public RedisCacheManager cacheManager(RedisConnectionFactory redisConnectionFactory) {
+//        return new RedisCacheManager(RedisCacheWriter.nonLockingRedisCacheWriter(redisConnectionFactory),
+//                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_DEFAULT_EXPIRE_TIME)
+////                , // 默认策略,未配置的 key 会使用这个
+////                this.getRedisCacheConfigurationMap() // 指定 key 策略
+//        );
 //    }
-
-    private RedisCacheConfiguration getRedisCacheConfigurationWithTtl(Long seconds) {
-        Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(
-                Object.class);
-        ObjectMapper om = new ObjectMapper();
-        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
-        om.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL,
-                JsonTypeInfo.As.WRAPPER_ARRAY);
-        //om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
-        jackson2JsonRedisSerializer.setObjectMapper(om);
-
-        RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig();
-        redisCacheConfiguration = redisCacheConfiguration.serializeKeysWith(
-                RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer()))
-                .serializeValuesWith(
-                        RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer))
-                .entryTtl(Duration.ofSeconds(seconds))
-                .disableCachingNullValues()
-                .computePrefixWith(cacheName -> cacheName + ":");
-        return redisCacheConfiguration;
-    }
-
-    @Bean
-    @Primary
-    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory connectionFactory) {
-        RedisTemplate<String, Object> template = new RedisTemplate<String, Object>();
-        template.setConnectionFactory(connectionFactory);
-        //使用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值
-        Jackson2JsonRedisSerializer<Object> serializer = new Jackson2JsonRedisSerializer<>(Object.class);
-        ObjectMapper mapper = new ObjectMapper();
-        mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
-        mapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL,
-                JsonTypeInfo.As.WRAPPER_ARRAY);
-        //mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
-        serializer.setObjectMapper(mapper);
-        template.setValueSerializer(serializer);
-        template.setHashValueSerializer(serializer);
-        //使用StringRedisSerializer来序列化和反序列化redis的key值
-        template.setKeySerializer(new StringRedisSerializer());
-        template.setHashKeySerializer(new StringRedisSerializer());
-        template.afterPropertiesSet();
-        return template;
-    }
-}
+//
+////    private Map<String, RedisCacheConfiguration> getRedisCacheConfigurationMap() {
+////        Map<String, RedisCacheConfiguration> redisCacheConfigurationMap = new HashMap<>();
+////        redisCacheConfigurationMap.put(SystemConstant.userOauth,
+////                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
+////        redisCacheConfigurationMap.put(SystemConstant.studentOauth,
+////                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
+////        redisCacheConfigurationMap.put(SystemConstant.userAccount,
+////                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
+////        redisCacheConfigurationMap.put(SystemConstant.studentAccount,
+////                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
+////        redisCacheConfigurationMap.put(SystemConstant.orgCache,
+////                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
+////        redisCacheConfigurationMap.put(SystemConstant.orgCodeCache,
+////                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
+////        redisCacheConfigurationMap.put(SystemConstant.roleCache,
+////                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
+////        redisCacheConfigurationMap.put(SystemConstant.configCache,
+////                this.getRedisCacheConfigurationWithTtl(SystemConstant.REDIS_EXPIRE_TIME));
+////        return redisCacheConfigurationMap;
+////    }
+//
+//    private RedisCacheConfiguration getRedisCacheConfigurationWithTtl(Long seconds) {
+//        Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(
+//                Object.class);
+//        ObjectMapper om = new ObjectMapper();
+//        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+//        om.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL,
+//                JsonTypeInfo.As.WRAPPER_ARRAY);
+//        //om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
+//        jackson2JsonRedisSerializer.setObjectMapper(om);
+//
+//        RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig();
+//        redisCacheConfiguration = redisCacheConfiguration.serializeKeysWith(
+//                RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer()))
+//                .serializeValuesWith(
+//                        RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer))
+//                .entryTtl(Duration.ofSeconds(seconds))
+//                .disableCachingNullValues()
+//                .computePrefixWith(cacheName -> cacheName + ":");
+//        return redisCacheConfiguration;
+//    }
+//
+//    @Bean
+//    @Primary
+//    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory connectionFactory) {
+//        RedisTemplate<String, Object> template = new RedisTemplate<String, Object>();
+//        template.setConnectionFactory(connectionFactory);
+//        //使用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值
+//        Jackson2JsonRedisSerializer<Object> serializer = new Jackson2JsonRedisSerializer<>(Object.class);
+//        ObjectMapper mapper = new ObjectMapper();
+//        mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+//        mapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL,
+//                JsonTypeInfo.As.WRAPPER_ARRAY);
+//        //mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
+//        serializer.setObjectMapper(mapper);
+//        template.setValueSerializer(serializer);
+//        template.setHashValueSerializer(serializer);
+//        //使用StringRedisSerializer来序列化和反序列化redis的key值
+//        template.setKeySerializer(new StringRedisSerializer());
+//        template.setHashKeySerializer(new StringRedisSerializer());
+//        template.afterPropertiesSet();
+//        return template;
+//    }
+//}

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/constant/SystemConstant.java

@@ -15,7 +15,7 @@ import com.qmth.themis.business.dto.ExpireTimeDTO;
 import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
 import com.qmth.themis.business.entity.TOeExamRecord;
 import com.qmth.themis.business.enums.*;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.TEExamPaperService;
 import com.qmth.themis.business.service.TOeExamRecordService;
 import com.qmth.themis.business.util.OssUtil;
@@ -742,11 +742,11 @@ public class SystemConstant {
      */
     public static void mobileMonitorStatusStop(Long studentId, Long recordId, boolean deleteSession)
             throws NoSuchAlgorithmException {
-        CacheService cacheService = SpringContextHolder.getBean(CacheService.class);
+        ThemisCacheService themisCacheService = SpringContextHolder.getBean(ThemisCacheService.class);
         RedisUtil redisUtil = SpringContextHolder.getBean(RedisUtil.class);
         Long timestamp = System.currentTimeMillis();
 
-        TEStudentCacheDto teStudent = cacheService.addStudentAccountCache(studentId);
+        TEStudentCacheDto teStudent = themisCacheService.addStudentAccountCache(studentId);
         Optional.ofNullable(teStudent).orElseThrow(() -> new BusinessException("学生数据为空"));
 
         //更新移动端第一机位推流状态为stop

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/service/CacheService.java → themis-business/src/main/java/com/qmth/themis/business/service/ThemisCacheService.java

@@ -12,7 +12,7 @@ import com.qmth.themis.business.entity.*;
  * @Author: wangliang
  * @Date: 2020/6/27
  */
-public interface CacheService {
+public interface ThemisCacheService {
 
     /**
      * 添加机构缓存

+ 7 - 7
themis-business/src/main/java/com/qmth/themis/business/service/impl/AuthInfoServiceImpl.java

@@ -12,7 +12,7 @@ import com.qmth.themis.business.entity.TSAuth;
 import com.qmth.themis.business.enums.AuthEnum;
 import com.qmth.themis.business.enums.UploadFileEnum;
 import com.qmth.themis.business.service.AuthInfoService;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.TBOrgService;
 import com.qmth.themis.business.service.TSAuthService;
 import com.qmth.themis.business.util.OssUtil;
@@ -50,7 +50,7 @@ public class AuthInfoServiceImpl implements AuthInfoService {
     TSAuthService tsAuthService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Resource
     TBOrgService tbOrgService;
@@ -106,7 +106,7 @@ public class AuthInfoServiceImpl implements AuthInfoService {
      */
     @Override
     public void appHasExpired(String code) {
-        TBOrg tbOrg = cacheService.addOrgCodeCache(code);
+        TBOrg tbOrg = themisCacheService.addOrgCodeCache(code);
         if ((Objects.nonNull(tbOrg) && Objects.nonNull(tbOrg.getEnable()) && tbOrg.getEnable().intValue() == 0)
                 || (Objects.isNull(solarService.getAppInfo()) || solarService.getAppInfo().getControl().hasExpired())
                 || (Objects.isNull(solarService.getAppControl()) || solarService.getAppControl().hasExpired())) {
@@ -228,8 +228,8 @@ public class AuthInfoServiceImpl implements AuthInfoService {
 
             if (!CollectionUtils.isEmpty(tbOrgSet)) {
                 tbOrgService.saveOrUpdateBatch(tbOrgSet);
-                cacheService.removeOrgIdCache();
-                cacheService.removeOrgCodeCache();
+                themisCacheService.removeOrgIdCache();
+                themisCacheService.removeOrgCodeCache();
             }
 
             AuthInfoService authInfoService = SpringContextHolder.getBean(AuthInfoService.class);
@@ -254,8 +254,8 @@ public class AuthInfoServiceImpl implements AuthInfoService {
                 }
             }
             tbOrgService.saveOrUpdateBatch(tbOrgList);
-            cacheService.removeOrgIdCache();
-            cacheService.removeOrgCodeCache();
+            themisCacheService.removeOrgIdCache();
+            themisCacheService.removeOrgCodeCache();
         }
     }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/service/impl/SysConfigServiceImpl.java

@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.dao.SysConfigMapper;
 import com.qmth.themis.business.entity.SysConfig;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.SysConfigService;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
@@ -24,7 +24,7 @@ import java.util.List;
 public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig> implements SysConfigService {
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     /**
      * 查询所有系统配置项
@@ -40,7 +40,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
             sysConfigList = this.list(sysConfigQueryWrapper);
             if (!CollectionUtils.isEmpty(sysConfigList)) {
                 for (SysConfig s : sysConfigList) {
-                    cacheService.updateSysConfigCacheForDb(s.getConfigKey(), s);
+                    themisCacheService.updateSysConfigCacheForDb(s.getConfigKey(), s);
                 }
             }
         } catch (Exception e) {

+ 4 - 5
themis-business/src/main/java/com/qmth/themis/business/service/impl/TBAttachmentServiceImpl.java

@@ -8,7 +8,7 @@ import com.qmth.themis.business.dao.TBAttachmentMapper;
 import com.qmth.themis.business.entity.SysConfig;
 import com.qmth.themis.business.entity.TBAttachment;
 import com.qmth.themis.business.enums.UploadFileEnum;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.TBAttachmentService;
 import com.qmth.themis.business.util.JacksonUtil;
 import com.qmth.themis.business.util.OssUtil;
@@ -28,7 +28,6 @@ import javax.annotation.Resource;
 import java.io.File;
 import java.io.IOException;
 import java.math.BigDecimal;
-import java.time.LocalDateTime;
 import java.util.*;
 
 /**
@@ -47,7 +46,7 @@ public class TBAttachmentServiceImpl extends ServiceImpl<TBAttachmentMapper, TBA
     OssUtil ossUtil;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     /**
      * 保存附件
@@ -71,7 +70,7 @@ public class TBAttachmentServiceImpl extends ServiceImpl<TBAttachmentMapper, TBA
             String fileName = FilenameUtils.getBaseName(file.getOriginalFilename());
             String format = "." + FilenameUtils.getExtension(file.getOriginalFilename());
 
-            SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.ATTACHMENT_TYPE);
+            SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.ATTACHMENT_TYPE);
             Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置附件类型"));
             List<String> attachmentTypeList = Arrays.asList(sysConfig.getConfigValue().replaceAll("\\[", "").replaceAll("\\]", "").split(","));
             if (Objects.nonNull(format)) {
@@ -169,7 +168,7 @@ public class TBAttachmentServiceImpl extends ServiceImpl<TBAttachmentMapper, TBA
             String fileName = file.getName().substring(0, temp);
             String format = file.getName().substring(temp, file.getName().length());
 
-            SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.ATTACHMENT_TYPE);
+            SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.ATTACHMENT_TYPE);
             Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置附件类型"));
             List<String> attachmentTypeList = Arrays.asList(sysConfig.getConfigValue().replaceAll("\\[", "").replaceAll("\\]", "").split(","));
             if (Objects.nonNull(format)) {

+ 5 - 5
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamServiceImpl.java

@@ -109,7 +109,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
     TOeExamBreakHistoryService tOeExamBreakHistoryService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     /**
      * 查询考试批次
@@ -281,7 +281,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
                 } else {
                     cache = true;
                 }
-                SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+                SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
                 Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
                 TEExamActivityDto teExamActivityDto = new TEExamActivityDto(examCache, ac, examStudentCacheBean,
                         examStudentId, ec, recordId, sysConfig.getConfigValue(), cache);
@@ -353,7 +353,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
                 tencentYunUtil.getSign(monitorUserId, SystemConstant.TENCENT_EXPIRE_TIME),
                 tencentYunUtil.getAppId());
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
         TEExamActivityDto teExamActivityDto = teExamActivityService
                 .getWaitingExam(activityId, examStudentId, es.getCourseCode(),
@@ -951,7 +951,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
         ExamCourseCacheBean examCourseCacheBean = teExamCourseService
                 .getExamCourseCacheBean(es.getExamId(), es.getCourseCode());
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
         TEExamActivityDto teExamActivityDto = new TEExamActivityDto(ec, ac, es, examStudentId, examCourseCacheBean,
                 recordId, sysConfig.getConfigValue(), true);
@@ -1214,7 +1214,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
             throw new BusinessException(ExceptionResultEnum.EXAM_STATUS_UPDATE_ERROR);
         }
         //更新未完成考试记录id
-        TEStudentCacheDto teStudentCacheDto = cacheService.addStudentAccountCache(es.getStudentId());
+        TEStudentCacheDto teStudentCacheDto = themisCacheService.addStudentAccountCache(es.getStudentId());
         Map<String, Object> properties = new HashMap<>();
         properties.put(SystemConstant.REMOVE_WEBSOCKET, true);
 

+ 5 - 5
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEMobileServiceImpl.java

@@ -59,7 +59,7 @@ public class TEMobileServiceImpl implements TEMobileService {
     TBAppVersionService tbAppVersionService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Override
     public MobileAuthorizationBean authorization(MobileAuthorizationParamBean param) throws NoSuchAlgorithmException {
@@ -96,7 +96,7 @@ public class TEMobileServiceImpl implements TEMobileService {
             throw new BusinessException(ExceptionResultEnum.EXAM_FINISH);
         }
         String deviceId = ServletUtil.getRequestDeviceId();
-        AuthDto authDto = cacheService.addStudentAuthCache(es.getStudentId());
+        AuthDto authDto = themisCacheService.addStudentAuthCache(es.getStudentId());
         // 生成token
         String token = SystemConstant.getNanoId();
         String sessionId = ret.getSessionId();
@@ -134,7 +134,7 @@ public class TEMobileServiceImpl implements TEMobileService {
         ret.setMonitorKey(ExamRecordCacheUtil.getMonitorKey(recordId));
         ret.setMonitorVideoSource(monitorVideoSource);
         ret.setMonitorAudioEnable(getMonitorAudioEnable(recordId, monitorVideoSource));
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
         ret.setMonitorStreamId(SystemConstant.setStreamId(sysConfig.getConfigValue(), recordId, monitorVideoSource));
         Map<String, String> monitorRecordMap = null;
@@ -150,7 +150,7 @@ public class TEMobileServiceImpl implements TEMobileService {
         ExamStudentCacheBean es = examStudentService
                 .getExamStudentCacheBean(ExamRecordCacheUtil.getExamStudentId(ret.getRecordId()));
         String userType = MobileAuthCacheUtil.getUserType(mode, code);
-        AuthDto authDto = cacheService.addStudentAuthCache(es.getStudentId());
+        AuthDto authDto = themisCacheService.addStudentAuthCache(es.getStudentId());
         String sessionId = SessionUtil
                 .digest(es.getStudentId(), Math.abs(authDto.getRoleCodes().toString().hashCode()), sourceEnum);
         if (Objects.nonNull(userType) && userType.contains(RoleEnum.STUDENT.name())) {
@@ -176,7 +176,7 @@ public class TEMobileServiceImpl implements TEMobileService {
         ExamStudentCacheBean es = examStudentService
                 .getExamStudentCacheBean(ExamRecordCacheUtil.getExamStudentId(recordId));
         Source sourceEnum = Source.OE_ANSWER;
-        AuthDto authDto = cacheService.addStudentAuthCache(es.getStudentId());
+        AuthDto authDto = themisCacheService.addStudentAuthCache(es.getStudentId());
         String sessionId = SessionUtil
                 .digest(es.getStudentId(), Math.abs(authDto.getRoleCodes().toString().hashCode()), sourceEnum);
         ret.setRecordId(recordId);

+ 6 - 6
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEQrcodeServiceImpl.java

@@ -9,7 +9,7 @@ import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.entity.SysConfig;
 import com.qmth.themis.business.enums.MobileModeEnum;
 import com.qmth.themis.business.enums.RoleEnum;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.TEQrcodeService;
 import com.qmth.themis.business.util.RedisUtil;
 import com.qmth.themis.common.exception.BusinessException;
@@ -27,11 +27,11 @@ public class TEQrcodeServiceImpl implements TEQrcodeService {
     RedisUtil redisUtil;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Override
     public QrResponseBean mobileMonitor(QrMobileMonitorParamBean param) throws NoSuchAlgorithmException {
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.WXAPP_UPLOAD_URL);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.WXAPP_UPLOAD_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置微信上传url"));
 
         String domain = sysConfig.getConfigValue();
@@ -45,7 +45,7 @@ public class TEQrcodeServiceImpl implements TEQrcodeService {
         MobileAuthCacheUtil.setRecordId(mode, code, param.getRecordId());
         MobileAuthCacheUtil.setMonitorVideoSource(mode, code, param.getSource());
 
-        SysConfig sysConfigQrExpireTime = cacheService.addSysConfigCache(SystemConstant.QR_EXPIRE_TIME);
+        SysConfig sysConfigQrExpireTime = themisCacheService.addSysConfigCache(SystemConstant.QR_EXPIRE_TIME);
         Optional.ofNullable(sysConfigQrExpireTime).orElseThrow(() -> new BusinessException("未设置二维码失效时间"));
 
         Integer qrExpireTime = Integer.parseInt(sysConfigQrExpireTime.getConfigValue());
@@ -62,7 +62,7 @@ public class TEQrcodeServiceImpl implements TEQrcodeService {
 
     @Override
     public QrResponseBean upload(QrUploadParamBean param, MobileModeEnum mode) {
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.WXAPP_UPLOAD_URL);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.WXAPP_UPLOAD_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置微信上传url"));
 
         String domain = sysConfig.getConfigValue();
@@ -76,7 +76,7 @@ public class TEQrcodeServiceImpl implements TEQrcodeService {
         if (param.getSubIndex() != null) {
             MobileAuthCacheUtil.setSubIndex(mode, code, param.getSubIndex());
         }
-        SysConfig sysConfigQrExpireTime = cacheService.addSysConfigCache(SystemConstant.QR_EXPIRE_TIME);
+        SysConfig sysConfigQrExpireTime = themisCacheService.addSysConfigCache(SystemConstant.QR_EXPIRE_TIME);
         Optional.ofNullable(sysConfigQrExpireTime).orElseThrow(() -> new BusinessException("未设置二维码失效时间"));
 
         Integer qrExpireTime = Integer.parseInt(sysConfigQrExpireTime.getConfigValue());

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEStudentServiceImpl.java

@@ -55,7 +55,7 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
     OssUtil ossUtil;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Resource
     TEExamService teExamService;
@@ -142,7 +142,7 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
             try {
                 student.setBasePhotoPath(filePath);
                 this.saveOrUpdate(student);
-                cacheService.updateStudentAccountCache(student.getId());
+                themisCacheService.updateStudentAccountCache(student.getId());
                 in = file.getInputStream();
                 ossUtil.upload(true, filePath, in, BinaryUtil.toBase64String(HexUtils.decodeHex(md5)));
 //                String url = ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + filePath;
@@ -182,7 +182,7 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
         teStudent.setPassword(studentParams.getPassword());
         teStudent.setUpdateId(Objects.nonNull(tbUser) ? tbUser.getId() : -1);
         this.updateById(teStudent);
-        cacheService.updateStudentAccountCache(teStudent.getId());
+        themisCacheService.updateStudentAccountCache(teStudent.getId());
     }
 
     /**

+ 4 - 4
themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeReportServiceImpl.java

@@ -70,7 +70,7 @@ public class TIeReportServiceImpl implements TIeReportService {
     TOeExamRecordService tOeExamRecordService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     /**
      * 考试概览
@@ -349,7 +349,7 @@ public class TIeReportServiceImpl implements TIeReportService {
         if (Objects.isNull(tbUser.getOrgId())) {
             return ret;
         } else {
-            TBOrg tbOrg = cacheService.addOrgCache(tbUser.getOrgId());
+            TBOrg tbOrg = themisCacheService.addOrgCache(tbUser.getOrgId());
             ret = new ExaminationMonitorCountBean(tbOrg.getId(), tbOrg.getName(), tbOrg.getCode());
         }
         List<Long> countList = tOeExamRecordService.findByOrgId(tbUser.getOrgId());
@@ -391,10 +391,10 @@ public class TIeReportServiceImpl implements TIeReportService {
     public List<TimeScaleDataResult> warnTrend() {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
 //        TBUser tbUser = tbUserService.getById(321565832042266624L);//测试用
-        SysConfig onlineWarnScaleSize = cacheService.addSysConfigCache(SystemConstant.ONLINE_WARN_SCALESIZE);
+        SysConfig onlineWarnScaleSize = themisCacheService.addSysConfigCache(SystemConstant.ONLINE_WARN_SCALESIZE);
         Optional.ofNullable(onlineWarnScaleSize).orElseThrow(() -> new BusinessException("在线人数/预警时间趋势统计格数未配置"));
 
-        SysConfig onlineWarnInterval = cacheService.addSysConfigCache(SystemConstant.ONLINE_WARN_INTERVAL);
+        SysConfig onlineWarnInterval = themisCacheService.addSysConfigCache(SystemConstant.ONLINE_WARN_INTERVAL);
         Optional.ofNullable(onlineWarnInterval).orElseThrow(() -> new BusinessException("在线人数/预警时间趋势统计间隔未配置"));
 
         int scaleSize = Integer.parseInt(onlineWarnScaleSize.getConfigValue()), interval = Integer.parseInt(onlineWarnInterval.getConfigValue());

+ 8 - 12
themis-business/src/main/java/com/qmth/themis/business/service/impl/CacheServiceImpl.java → themis-business/src/main/java/com/qmth/themis/business/service/impl/ThemisCacheServiceImpl.java

@@ -1,13 +1,9 @@
 package com.qmth.themis.business.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.qmth.boot.core.solar.model.AppInfo;
-import com.qmth.boot.core.solar.model.OrgInfo;
-import com.qmth.boot.core.solar.service.SolarService;
 import com.qmth.themis.business.constant.SpringContextHolder;
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.dto.AuthDto;
-import com.qmth.themis.business.dto.AuthOrgInfoDto;
 import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
 import com.qmth.themis.business.entity.*;
 import com.qmth.themis.business.enums.RoleEnum;
@@ -38,8 +34,8 @@ import java.util.stream.Collectors;
  * @Date: 2020/6/27
  */
 @Service
-public class CacheServiceImpl implements CacheService {
-    private final static Logger log = LoggerFactory.getLogger(CacheServiceImpl.class);
+public class ThemisCacheServiceImpl implements ThemisCacheService {
+    private final static Logger log = LoggerFactory.getLogger(ThemisCacheServiceImpl.class);
 
     @Resource
     TBUserRoleService tbUserRoleService;
@@ -176,8 +172,8 @@ public class CacheServiceImpl implements CacheService {
     public AuthDto addAccountAuthCache(Long userId) {
         AuthDto authDto = null;
         try {
-            CacheService cacheService = SpringContextHolder.getBean(CacheService.class);
-            TBUser user = cacheService.addAccountCache(userId);
+            ThemisCacheService themisCacheService = SpringContextHolder.getBean(ThemisCacheService.class);
+            TBUser user = themisCacheService.addAccountCache(userId);
             if (Objects.isNull(user)) {
                 throw new BusinessException(ExceptionResultEnum.USER_NO);
             }
@@ -186,7 +182,7 @@ public class CacheServiceImpl implements CacheService {
             uWrapper.lambda().eq(TBUserRole::getUserId, user.getId());
             List<TBUserRole> tbUserRoleList = tbUserRoleService.list(uWrapper);
             if (Objects.nonNull(tbUserRoleList)) {
-                TBOrg tbOrg = Objects.nonNull(user.getOrgId()) ? cacheService.addOrgCache(user.getOrgId()) : null;
+                TBOrg tbOrg = Objects.nonNull(user.getOrgId()) ? themisCacheService.addOrgCache(user.getOrgId()) : null;
                 //根据角色名查权限
                 Set<String> roleCodes = tbUserRoleList.stream().map(s -> s.getRoleCode()).collect(Collectors.toSet());
                 QueryWrapper<TBRolePrivilege> rpWrapper = new QueryWrapper<>();
@@ -262,12 +258,12 @@ public class CacheServiceImpl implements CacheService {
     public AuthDto addStudentAuthCache(Long studentId) {
         AuthDto authDto = null;
         try {
-            CacheService cacheService = SpringContextHolder.getBean(CacheService.class);
-            TEStudentCacheDto teStudentCacheDto = cacheService.addStudentAccountCache(studentId);
+            ThemisCacheService themisCacheService = SpringContextHolder.getBean(ThemisCacheService.class);
+            TEStudentCacheDto teStudentCacheDto = themisCacheService.addStudentAccountCache(studentId);
             if (Objects.isNull(teStudentCacheDto)) {
                 throw new BusinessException(ExceptionResultEnum.STUDENT_NO);
             }
-            TBOrg tbOrg = cacheService.addOrgCache(teStudentCacheDto.getOrgId());
+            TBOrg tbOrg = themisCacheService.addOrgCache(teStudentCacheDto.getOrgId());
             //根据学生角色查权限
             QueryWrapper<TBRolePrivilege> rpWrapper = new QueryWrapper<>();
             rpWrapper.lambda().eq(TBRolePrivilege::getRoleCode, RoleEnum.STUDENT.name());

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/templete/service/impl/TempleteLogicServiceImpl.java

@@ -93,7 +93,7 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
     TEExamPaperService teExamPaperService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Resource
     TOeExamRecordService tOeExamRecordService;
@@ -503,7 +503,7 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
         TBTaskHistory tbTaskHistory = (TBTaskHistory) map.get("tbTaskHistory");
         BigDecimal progress = new BigDecimal(0);
         BigDecimal b = new BigDecimal(100);
-        TBOrg tbOrg = cacheService.addOrgCache(orgId);
+        TBOrg tbOrg = themisCacheService.addOrgCache(orgId);
 
         Integer totalTaskSize = jsonObject.getInteger("totalTaskSize");
         Integer currentTaskSize = jsonObject.getInteger("currentTaskSize");
@@ -790,7 +790,7 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
         if (Objects.isNull(examCode)) {
             throw new RuntimeException("考试编码为空");
         }
-        TBOrg tbOrg = cacheService.addOrgCache(orgId);
+        TBOrg tbOrg = themisCacheService.addOrgCache(orgId);
         Optional.ofNullable(tbOrg).orElseThrow(() -> new BusinessException(ExceptionResultEnum.ORG_NO));
 
         //先推送考试

+ 8 - 8
themis-business/src/main/java/com/qmth/themis/business/util/AuthUtil.java

@@ -7,7 +7,7 @@ import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
 import com.qmth.themis.business.entity.TBSession;
 import com.qmth.themis.business.entity.TBUser;
 import com.qmth.themis.business.service.AuthInfoService;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.common.enums.ExceptionResultEnum;
 import com.qmth.themis.common.enums.Platform;
 import com.qmth.themis.common.exception.BusinessException;
@@ -51,12 +51,12 @@ public class AuthUtil {
                                                List<String> sysUrls,
                                                HttpServletRequest request,
                                                HttpServletResponse response) {
-        CacheService cacheService = SpringContextHolder.getBean(CacheService.class);
+        ThemisCacheService themisCacheService = SpringContextHolder.getBean(ThemisCacheService.class);
         String url = request.getServletPath();
         String method = request.getMethod();
         TBSession tbSession = authHeadCommon(platform, deviceId, authorization, time, method, url);
         Long userId = Long.parseLong(tbSession.getIdentity());
-        TBUser tbUser = cacheService.addAccountCache(userId);
+        TBUser tbUser = themisCacheService.addAccountCache(userId);
         request.setAttribute(SystemConstant.SESSION, tbSession);
         request.setAttribute(SystemConstant.ACCOUNT, tbUser);
         return authFootCommon(userId, SystemConstant.userOauth, sysUrls, request, response);
@@ -81,12 +81,12 @@ public class AuthUtil {
                                               List<String> sysUrls,
                                               HttpServletRequest request,
                                               HttpServletResponse response) {
-        CacheService cacheService = SpringContextHolder.getBean(CacheService.class);
+        ThemisCacheService themisCacheService = SpringContextHolder.getBean(ThemisCacheService.class);
         String url = request.getServletPath();
         String method = request.getMethod();
         TBSession tbSession = authHeadCommon(platform, deviceId, authorization, time, method, url);
         Long studentId = Long.parseLong(tbSession.getIdentity());
-        TEStudentCacheDto teStudentCacheDto = cacheService.addStudentAccountCache(studentId);
+        TEStudentCacheDto teStudentCacheDto = themisCacheService.addStudentAccountCache(studentId);
         request.setAttribute(SystemConstant.SESSION, tbSession);
         request.setAttribute(SystemConstant.STUDENT_ACCOUNT, teStudentCacheDto);
         return authFootCommon(studentId, SystemConstant.studentOauth, sysUrls, request, response);
@@ -186,13 +186,13 @@ public class AuthUtil {
                                   HttpServletRequest request,
                                   HttpServletResponse response) {
         String url = request.getServletPath();
-        CacheService cacheService = SpringContextHolder.getBean(CacheService.class);
+        ThemisCacheService themisCacheService = SpringContextHolder.getBean(ThemisCacheService.class);
         //验证权限
         AuthDto authDto = null;
         if (type.contains(SystemConstant.userOauth)) {
-            authDto = cacheService.addAccountAuthCache(userId);
+            authDto = themisCacheService.addAccountAuthCache(userId);
         } else if (type.contains(SystemConstant.studentOauth)) {
-            authDto = cacheService.addStudentAuthCache(userId);
+            authDto = themisCacheService.addStudentAuthCache(userId);
         }
         request.setAttribute(SystemConstant.ORG, authDto.getTbOrg());
 

+ 8 - 8
themis-business/src/main/java/com/qmth/themis/business/util/CloudMarkUtil.java

@@ -6,7 +6,7 @@ import com.qmth.themis.business.bean.cloudmark.*;
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.entity.SysConfig;
 import com.qmth.themis.business.entity.TBOrg;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.common.enums.ExceptionResultEnum;
 import com.qmth.themis.common.exception.BusinessException;
 import com.qmth.themis.common.signature.SignatureInfo;
@@ -30,7 +30,7 @@ public class CloudMarkUtil {
     private final static Logger log = LoggerFactory.getLogger(CloudMarkUtil.class);
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     /**
      * 获取accessKey和accessSecret
@@ -40,7 +40,7 @@ public class CloudMarkUtil {
      */
     public BaseParams getAccessKeyAndAccessSecret(BaseParams baseParams) {
         if (Objects.isNull(baseParams.getAccessKey()) && Objects.isNull(baseParams.getAccessSecret())) {
-            TBOrg tbOrg = cacheService.addOrgCache(baseParams.getOrgId());
+            TBOrg tbOrg = themisCacheService.addOrgCache(baseParams.getOrgId());
             Optional.ofNullable(tbOrg).orElseThrow(() -> new BusinessException(ExceptionResultEnum.ORG_NO));
             baseParams.setAccessKey(tbOrg.getAccessKey());
             baseParams.setAccessSecret(tbOrg.getAccessSecret());
@@ -60,7 +60,7 @@ public class CloudMarkUtil {
         this.getAccessKeyAndAccessSecret(studentScoreParams);
         Map<String, Object> params = JSON.parseObject(JSON.toJSONString(studentScoreParams), Map.class);
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.CLOUD_MARK_URL);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.CLOUD_MARK_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置云阅卷地址"));
 
         String url = sysConfig.getConfigValue() + SystemConstant.CLOUD_MARK_EXAM_STUDENT_SCORE_API;
@@ -107,7 +107,7 @@ public class CloudMarkUtil {
         saveExamParams.vaildParams();
         this.getAccessKeyAndAccessSecret(saveExamParams);
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.CLOUD_MARK_URL);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.CLOUD_MARK_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置云阅卷地址"));
 
         String url = sysConfig.getConfigValue() + SystemConstant.CLOUD_MARK_EXAM_SAVE_API;
@@ -136,7 +136,7 @@ public class CloudMarkUtil {
         saveSubjectParams.vaildParams();
         this.getAccessKeyAndAccessSecret(saveSubjectParams);
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.CLOUD_MARK_URL);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.CLOUD_MARK_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置云阅卷地址"));
 
         String url = sysConfig.getConfigValue() + SystemConstant.CLOUD_MARK_SUBJECT_SAVE_API;
@@ -165,7 +165,7 @@ public class CloudMarkUtil {
         saveStudentParams.vaildParams();
         this.getAccessKeyAndAccessSecret(saveStudentParams);
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.CLOUD_MARK_URL);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.CLOUD_MARK_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置云阅卷地址"));
 
         String url = sysConfig.getConfigValue() + SystemConstant.CLOUD_MARK_STUDENT_SAVE_API;
@@ -194,7 +194,7 @@ public class CloudMarkUtil {
         fileUploadParams.vaildParams();
         this.getAccessKeyAndAccessSecret(fileUploadParams);
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.CLOUD_MARK_URL);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.CLOUD_MARK_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置云阅卷地址"));
 
         String host = sysConfig.getConfigValue();

+ 4 - 4
themis-business/src/main/java/com/qmth/themis/business/util/MqUtil.java

@@ -2,7 +2,7 @@ package com.qmth.themis.business.util;
 
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.entity.SysConfig;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.common.exception.BusinessException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -29,14 +29,14 @@ public class MqUtil {
     Map<String, String> map;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Bean
     public void mqUtilEnv() {
-        SysConfig sysConfigMqTopic = cacheService.addSysConfigCache(SystemConstant.MQ_CONFIG_TOPIC);
+        SysConfig sysConfigMqTopic = themisCacheService.addSysConfigCache(SystemConstant.MQ_CONFIG_TOPIC);
         Optional.ofNullable(sysConfigMqTopic).orElseThrow(() -> new BusinessException("未配置消息队列topic"));
 
-        SysConfig sysConfigMqBody = cacheService.addSysConfigCache(SystemConstant.MQ_CONFIG_BODY);
+        SysConfig sysConfigMqBody = themisCacheService.addSysConfigCache(SystemConstant.MQ_CONFIG_BODY);
         Optional.ofNullable(sysConfigMqBody).orElseThrow(() -> new BusinessException("未配置消息队列主体"));
 
         this.topic = sysConfigMqTopic.getConfigValue();

+ 15 - 15
themis-business/src/main/java/com/qmth/themis/business/util/TencentYunUtil.java

@@ -4,7 +4,7 @@ import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.entity.SysConfig;
 import com.qmth.themis.business.entity.TOeExamRecord;
 import com.qmth.themis.business.enums.MonitorVideoSourceEnum;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.TGErrorService;
 import com.qmth.themis.common.exception.BusinessException;
 import com.tencentcloudapi.common.Credential;
@@ -45,7 +45,7 @@ public class TencentYunUtil {
     TGErrorService tgErrorService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     private String appId;
     private String key;
@@ -62,51 +62,51 @@ public class TencentYunUtil {
 
     @Bean
     public void tencentCloudEnv() {
-        SysConfig sysConfigTencentCloudSdkAppId = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_APPID);
+        SysConfig sysConfigTencentCloudSdkAppId = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_APPID);
         Optional.ofNullable(sysConfigTencentCloudSdkAppId).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_app_id"));
         this.appId = sysConfigTencentCloudSdkAppId.getConfigValue();
 
-        SysConfig sysConfigTencentCloudSdkKey = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_KEY);
+        SysConfig sysConfigTencentCloudSdkKey = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_KEY);
         Optional.ofNullable(sysConfigTencentCloudSdkKey).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_key"));
         this.key = sysConfigTencentCloudSdkKey.getConfigValue();
 
-        SysConfig sysConfigTencentCloudSdkUrls = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_URLS);
+        SysConfig sysConfigTencentCloudSdkUrls = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_URLS);
         Optional.ofNullable(sysConfigTencentCloudSdkUrls).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_url"));
         this.urls = Arrays.asList(StringUtils.split(sysConfigTencentCloudSdkUrls.getConfigValue(), ","));
 
-        SysConfig sysConfigTencentCloudSdkService = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_SERVICE);
+        SysConfig sysConfigTencentCloudSdkService = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_SERVICE);
         Optional.ofNullable(sysConfigTencentCloudSdkService).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_service"));
         this.service = sysConfigTencentCloudSdkService.getConfigValue();
 
-        SysConfig sysConfigTencentCloudSdkQueryUrl = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_QUERY_URL);
+        SysConfig sysConfigTencentCloudSdkQueryUrl = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_QUERY_URL);
         Optional.ofNullable(sysConfigTencentCloudSdkQueryUrl).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_query_url"));
         this.queryUrl = sysConfigTencentCloudSdkQueryUrl.getConfigValue();
 
-        SysConfig sysConfigTencentCloudSdkSecretId = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_SECRET_ID);
+        SysConfig sysConfigTencentCloudSdkSecretId = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_SECRET_ID);
         Optional.ofNullable(sysConfigTencentCloudSdkSecretId).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_secret_id"));
         this.secretId = sysConfigTencentCloudSdkSecretId.getConfigValue();
 
-        SysConfig sysConfigTencentCloudSdkSecretKey = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_SECRET_KEY);
+        SysConfig sysConfigTencentCloudSdkSecretKey = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_SECRET_KEY);
         Optional.ofNullable(sysConfigTencentCloudSdkSecretKey).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_secret_key"));
         this.secretKey = sysConfigTencentCloudSdkSecretKey.getConfigValue();
 
-        SysConfig sysConfigTencentCloudSdkVodAppId = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_VOD_APP_ID);
+        SysConfig sysConfigTencentCloudSdkVodAppId = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_VOD_APP_ID);
         Optional.ofNullable(sysConfigTencentCloudSdkVodAppId).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_vod_app_id"));
         this.vodAppId = Long.parseLong(sysConfigTencentCloudSdkVodAppId.getConfigValue());
 
-        SysConfig sysConfigTencentCloudSdkCallBackPwd = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_CALLBACK_PWD);
+        SysConfig sysConfigTencentCloudSdkCallBackPwd = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_CALLBACK_PWD);
         Optional.ofNullable(sysConfigTencentCloudSdkCallBackPwd).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_回调密码"));
         this.callbackPwd = sysConfigTencentCloudSdkCallBackPwd.getConfigValue();
 
-        SysConfig sysConfigTencentCloudSdkCallBackTime = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_CALLBACK_TIME);
+        SysConfig sysConfigTencentCloudSdkCallBackTime = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_CALLBACK_TIME);
         Optional.ofNullable(sysConfigTencentCloudSdkCallBackTime).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_回调时间"));
         this.callbackTime = sysConfigTencentCloudSdkCallBackTime.getConfigValue();
 
-        SysConfig sysConfigTencentCloudSdkTrtcQueryUrl = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_TRTC_QUERY_URL);
+        SysConfig sysConfigTencentCloudSdkTrtcQueryUrl = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_TRTC_QUERY_URL);
         Optional.ofNullable(sysConfigTencentCloudSdkTrtcQueryUrl).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_trtc_query_url"));
         this.trtcQueryUrl = sysConfigTencentCloudSdkTrtcQueryUrl.getConfigValue();
 
-        SysConfig sysConfigTencentCloudSdkTrtcRegion = cacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_TRTC_REGION);
+        SysConfig sysConfigTencentCloudSdkTrtcRegion = themisCacheService.addSysConfigCache(SystemConstant.TENCENT_CLOUD_SDK_TRTC_REGION);
         Optional.ofNullable(sysConfigTencentCloudSdkTrtcRegion).orElseThrow(() -> new BusinessException("未配置腾讯云sdk_trtc_region"));
         this.trtcRegion = sysConfigTencentCloudSdkTrtcRegion.getConfigValue();
     }
@@ -133,7 +133,7 @@ public class TencentYunUtil {
         TOeExamRecord tOeExamRecord = SystemConstant.getExamRecord(recordId);
         List<String> monitorRecordList = Arrays.asList(tOeExamRecord.getMonitorRecord().trim().toUpperCase().split(","));
         String[] streamIds = new String[monitorRecordList.size()];
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
         for (int i = 0; i < monitorRecordList.size(); i++) {

+ 4 - 4
themis-exam/src/main/java/com/qmth/themis/exam/api/SysController.java

@@ -10,7 +10,7 @@ import com.qmth.themis.business.entity.SysConfig;
 import com.qmth.themis.business.entity.TBClientVersion;
 import com.qmth.themis.business.entity.TBOrg;
 import com.qmth.themis.business.enums.UploadFileEnum;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.TBClientVersionService;
 import com.qmth.themis.common.exception.BusinessException;
 import com.qmth.themis.common.util.Result;
@@ -40,7 +40,7 @@ public class SysController {
     TBClientVersionService tbClientVersionService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @ApiOperation(value = "获取环境接口")
     @RequestMapping(value = "/env", method = RequestMethod.POST)
@@ -51,7 +51,7 @@ public class SysController {
         EnvBean env = new EnvBean();
         if (Objects.nonNull(mapParameter.get(SystemConstant.ORG_ID))) {
             Long orgId = Long.parseLong(String.valueOf(mapParameter.get(SystemConstant.ORG_ID)));
-            TBOrg org = cacheService.addOrgCache(orgId);
+            TBOrg org = themisCacheService.addOrgCache(orgId);
             if (Objects.nonNull(org)) {
                 OrgInfoBean orgInfo = new OrgInfoBean(org.getName(), org.getLogo(), (org.getUpdateTime() == null ? null : org.getUpdateTime()));
                 env.setOrgInfo(orgInfo);
@@ -67,7 +67,7 @@ public class SysController {
         }
         boolean oss = dictionaryConfig.sysDomain().isOss();
         String url = null;
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.EXAM_FILE_HOST);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.EXAM_FILE_HOST);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置exam文件host"));
 
         if (oss) {

+ 2 - 3
themis-exam/src/main/java/com/qmth/themis/exam/api/TEExamController.java

@@ -26,7 +26,6 @@ import com.qmth.themis.common.enums.ExceptionResultEnum;
 import com.qmth.themis.common.exception.BusinessException;
 import com.qmth.themis.common.util.Result;
 import com.qmth.themis.common.util.ResultUtil;
-import com.qmth.themis.exam.config.DictionaryConfig;
 import com.qmth.themis.exam.config.ExamConstant;
 import com.qmth.themis.exam.websocket.WebSocketOeServer;
 import io.swagger.annotations.*;
@@ -63,7 +62,7 @@ public class TEExamController {
     MqUtil mqUtil;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @ApiOperation(value = "验证考试口令接口")
     @RequestMapping(value = "/short_code", method = RequestMethod.POST)
@@ -145,7 +144,7 @@ public class TEExamController {
         }
 
         MonitorVideoSourceEnum source = MonitorVideoSourceEnum.CLIENT_CAMERA;
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
         String liveUrl = SystemConstant.setStreamId(sysConfig.getConfigValue(), recordId, source);

+ 3 - 3
themis-exam/src/main/java/com/qmth/themis/exam/api/TEMobileController.java

@@ -60,7 +60,7 @@ public class TEMobileController {
     TEAudioService teAudioService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Resource
     OssUtil ossUtil;
@@ -84,7 +84,7 @@ public class TEMobileController {
             MobileAuthorizationBean mobileAuthorizationBean = mobileService.authorization(param);
             MobileModeEnum mode = MobileModeEnum.valueOf(param.getMode().toUpperCase());
             if (Objects.nonNull(mode) && MobileModeEnum.MOBILE_MONITOR.equals(mode)) {
-                SysConfig sysConfigQrExpireTime = cacheService.addSysConfigCache(SystemConstant.QR_EXPIRE_TIME);
+                SysConfig sysConfigQrExpireTime = themisCacheService.addSysConfigCache(SystemConstant.QR_EXPIRE_TIME);
                 Optional.ofNullable(sysConfigQrExpireTime).orElseThrow(() -> new BusinessException("未设置二维码失效时间"));
 
                 Integer qrExpireTime = Integer.parseInt(sysConfigQrExpireTime.getConfigValue());
@@ -221,7 +221,7 @@ public class TEMobileController {
             if (!CollectionUtils.isEmpty(teAudioList)) {
                 for (TEAudioResult t : teAudioList) {
                     if (Objects.nonNull(t.getAttachmentId())) {
-                        TBAttachment tbAttachment = cacheService.attachmentCache(t.getAttachmentId());
+                        TBAttachment tbAttachment = themisCacheService.attachmentCache(t.getAttachmentId());
                         if (Objects.nonNull(tbAttachment) && Objects.nonNull(tbAttachment.getRemark())) {
                             JSONObject jsonObject = JSONObject.parseObject(tbAttachment.getRemark());
                             t.setAttachmentPath(ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + jsonObject.getString(SystemConstant.PATH));

+ 8 - 8
themis-exam/src/main/java/com/qmth/themis/exam/api/TEStudentController.java

@@ -76,7 +76,7 @@ public class TEStudentController {
     TEStudentService teStudentService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Resource
     RedisUtil redisUtil;
@@ -135,13 +135,13 @@ public class TEStudentController {
         if (Objects.nonNull(mapParameter.get(SystemConstant.EXAM_ID))) {
             examId = Long.parseLong(String.valueOf(mapParameter.get(SystemConstant.EXAM_ID)));
             ExamCacheBean ec = teExamService.getExamCacheBean(examId);
-            tbOrg = cacheService.addOrgCache(ec.getOrgId());
+            tbOrg = themisCacheService.addOrgCache(ec.getOrgId());
         }
         if (Objects.isNull(orgId) && Objects.isNull(examId)) {
             throw new BusinessException(ExceptionResultEnum.ORG_ID_OR_EXAM_ID_NOT_CHOOSE);
         }
         if (Objects.nonNull(orgId)) {
-            tbOrg = cacheService.addOrgCache(orgId);
+            tbOrg = themisCacheService.addOrgCache(orgId);
         }
         if (Objects.isNull(tbOrg)) {
             throw new BusinessException(ExceptionResultEnum.ORG_NO);
@@ -204,10 +204,10 @@ public class TEStudentController {
         Platform platform = ServletUtil.getRequestPlatform();
         String deviceId = ServletUtil.getRequestDeviceId();
         //添加用户鉴权缓存
-        AuthDto authDto = cacheService.addStudentAuthCache(teStudent.getId());
+        AuthDto authDto = themisCacheService.addStudentAuthCache(teStudent.getId());
         //生成token
         String token = SystemConstant.getNanoId();
-        cacheService.addStudentAccountCache(teStudent.getId());
+        themisCacheService.addStudentAccountCache(teStudent.getId());
         //判断会话来源
         Source source = null;
         if (Platform.WIN == platform || Platform.MAC == platform) {
@@ -297,7 +297,7 @@ public class TEStudentController {
         if (Objects.isNull(tbSession)) {
             throw new BusinessException(ExceptionResultEnum.LOGIN_NO);
         }
-        AuthDto authDto = cacheService.addStudentAuthCache(teStudent.getId());
+        AuthDto authDto = themisCacheService.addStudentAuthCache(teStudent.getId());
         redisUtil.deleteUserSession(tbSession.getId());
         //循环检查该用户下其他平台是否存在session,不存在则删除用户缓存和鉴权缓存
         boolean delete = true;
@@ -310,8 +310,8 @@ public class TEStudentController {
             }
         }
         if (delete) {
-            cacheService.removeStudentAuthCache(teStudent.getId());
-            cacheService.removeStudentAccountCache(teStudent.getId());
+            themisCacheService.removeStudentAuthCache(teStudent.getId());
+            themisCacheService.removeStudentAccountCache(teStudent.getId());
         }
         //mq发送消息start
         MqDto mqDto = new MqDto(mqUtil.getTopic(), MqTagEnum.STUDENT.name(),

+ 4 - 5
themis-exam/src/main/java/com/qmth/themis/exam/api/TIeInvigilateCallMobileController.java

@@ -9,7 +9,7 @@ import com.qmth.themis.business.entity.SysConfig;
 import com.qmth.themis.business.entity.TIeExamInvigilateCallLog;
 import com.qmth.themis.business.entity.TOeExamRecord;
 import com.qmth.themis.business.enums.*;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.MqDtoService;
 import com.qmth.themis.business.service.TOeExamRecordService;
 import com.qmth.themis.business.util.MqUtil;
@@ -18,7 +18,6 @@ import com.qmth.themis.common.enums.ExceptionResultEnum;
 import com.qmth.themis.common.exception.BusinessException;
 import com.qmth.themis.common.util.Result;
 import com.qmth.themis.common.util.ResultUtil;
-import com.qmth.themis.exam.config.DictionaryConfig;
 import io.swagger.annotations.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -57,7 +56,7 @@ public class TIeInvigilateCallMobileController {
     TOeExamRecordService tOeExamRecordService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
 //    @Deprecated
 //    @ApiOperation(value = "监控观看地址更新接口")
@@ -152,7 +151,7 @@ public class TIeInvigilateCallMobileController {
             }
         }
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
         String liveUrl = SystemConstant.setStreamId(sysConfig.getConfigValue(), recordId, source);
@@ -285,7 +284,7 @@ public class TIeInvigilateCallMobileController {
             }
         }
 
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
         String liveUrl = SystemConstant.setStreamId(sysConfig.getConfigValue(), recordId, source);

+ 5 - 6
themis-exam/src/main/java/com/qmth/themis/exam/api/TIeInvigilateCallOeController.java

@@ -11,7 +11,7 @@ import com.qmth.themis.business.entity.SysConfig;
 import com.qmth.themis.business.entity.TIeExamInvigilateCallLog;
 import com.qmth.themis.business.entity.TOeExamRecord;
 import com.qmth.themis.business.enums.*;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.service.MqDtoService;
 import com.qmth.themis.business.service.TOeExamRecordService;
 import com.qmth.themis.business.util.MqUtil;
@@ -21,7 +21,6 @@ import com.qmth.themis.common.enums.ExceptionResultEnum;
 import com.qmth.themis.common.exception.BusinessException;
 import com.qmth.themis.common.util.Result;
 import com.qmth.themis.common.util.ResultUtil;
-import com.qmth.themis.exam.config.DictionaryConfig;
 import io.swagger.annotations.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -57,7 +56,7 @@ public class TIeInvigilateCallOeController {
     MqUtil mqUtil;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
 //    @Deprecated
 //    @ApiOperation(value = "监控观看地址更新接口")
@@ -162,7 +161,7 @@ public class TIeInvigilateCallOeController {
         }
 
         //获取考试记录缓存
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
         String liveUrl = SystemConstant.setStreamId(sysConfig.getConfigValue(), recordId, source);
@@ -200,7 +199,7 @@ public class TIeInvigilateCallOeController {
         Long recordId = Long.parseLong(String.valueOf(mapParameter.get(SystemConstant.RECORD_ID)));
         //获取考试记录缓存
         MonitorVideoSourceEnum source = MonitorVideoSourceEnum.CLIENT_CAMERA;
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
         String liveUrl = SystemConstant.setStreamId(sysConfig.getConfigValue(), recordId, source);
@@ -262,7 +261,7 @@ public class TIeInvigilateCallOeController {
         Long recordId = Long.parseLong(String.valueOf(mapParameter.get(SystemConstant.RECORD_ID)));
         //获取考试记录缓存
         MonitorVideoSourceEnum source = MonitorVideoSourceEnum.CLIENT_CAMERA;
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
 
         String liveUrl = SystemConstant.setStreamId(sysConfig.getConfigValue(), recordId, source);

+ 56 - 56
themis-exam/src/main/java/com/qmth/themis/exam/config/DruidConfig.java

@@ -1,56 +1,56 @@
-package com.qmth.themis.exam.config;
-
-import com.alibaba.druid.pool.DruidDataSource;
-import com.alibaba.druid.support.http.StatViewServlet;
-import com.alibaba.druid.support.http.WebStatFilter;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
-import org.springframework.boot.web.servlet.ServletRegistrationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import javax.sql.DataSource;
-
-/**
- * @Description: druid数据源配置
- * @Param:
- * @return:
- * @Author: wangliang
- * @Date: 2019/10/11
- */
-@Configuration
-public class DruidConfig {
-
-    @Bean
-    public ServletRegistrationBean druidServlet() {
-        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
-        // IP白名单
-        servletRegistrationBean.addInitParameter("allow", "*");
-        // IP黑名单(共同存在时,deny优先于allow)
-//        servletRegistrationBean.addInitParameter("deny", "192.168.1.206");
-        //控制台管理用户
-        servletRegistrationBean.addInitParameter("loginUsername", "admin");
-        servletRegistrationBean.addInitParameter("loginPassword", "admin");
-        //是否能够重置数据 禁用HTML页面上的“Reset All”功能
-        servletRegistrationBean.addInitParameter("resetEnable", "false");
-        return servletRegistrationBean;
-    }
-
-    @Bean
-    public FilterRegistrationBean filterRegistrationBean() {
-        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter());
-        filterRegistrationBean.addUrlPatterns("/*");
-        filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
-        return filterRegistrationBean;
-    }
-
-    /**
-     * 单数据源可以直接放开以下注释行
-     */
-    @Bean
-    @ConfigurationProperties(prefix = "spring.datasource")
-    public DataSource druid() {
-        return new DruidDataSource();
-    }
-}
-
+//package com.qmth.themis.exam.config;
+//
+//import com.alibaba.druid.pool.DruidDataSource;
+//import com.alibaba.druid.support.http.StatViewServlet;
+//import com.alibaba.druid.support.http.WebStatFilter;
+//import org.springframework.boot.context.properties.ConfigurationProperties;
+//import org.springframework.boot.web.servlet.FilterRegistrationBean;
+//import org.springframework.boot.web.servlet.ServletRegistrationBean;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//
+//import javax.sql.DataSource;
+//
+///**
+// * @Description: druid数据源配置
+// * @Param:
+// * @return:
+// * @Author: wangliang
+// * @Date: 2019/10/11
+// */
+//@Configuration
+//public class DruidConfig {
+//
+//    @Bean
+//    public ServletRegistrationBean druidServlet() {
+//        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
+//        // IP白名单
+//        servletRegistrationBean.addInitParameter("allow", "*");
+//        // IP黑名单(共同存在时,deny优先于allow)
+////        servletRegistrationBean.addInitParameter("deny", "192.168.1.206");
+//        //控制台管理用户
+//        servletRegistrationBean.addInitParameter("loginUsername", "admin");
+//        servletRegistrationBean.addInitParameter("loginPassword", "admin");
+//        //是否能够重置数据 禁用HTML页面上的“Reset All”功能
+//        servletRegistrationBean.addInitParameter("resetEnable", "false");
+//        return servletRegistrationBean;
+//    }
+//
+//    @Bean
+//    public FilterRegistrationBean filterRegistrationBean() {
+//        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter());
+//        filterRegistrationBean.addUrlPatterns("/*");
+//        filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
+//        return filterRegistrationBean;
+//    }
+//
+//    /**
+//     * 单数据源可以直接放开以下注释行
+//     */
+//    @Bean
+//    @ConfigurationProperties(prefix = "spring.datasource")
+//    public DataSource druid() {
+//        return new DruidDataSource();
+//    }
+//}
+//

+ 3 - 3
themis-exam/src/main/java/com/qmth/themis/exam/config/WebMvcConfig.java

@@ -2,7 +2,7 @@ package com.qmth.themis.exam.config;
 
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.entity.SysConfig;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.common.exception.BusinessException;
 import com.qmth.themis.exam.interceptor.AuthInterceptor;
 import org.apache.commons.lang3.StringUtils;
@@ -26,7 +26,7 @@ import java.util.Optional;
 public class WebMvcConfig implements WebMvcConfigurer {
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Bean
     public AuthInterceptor AuthInterceptor() {
@@ -35,7 +35,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
 
     @Override
     public void addInterceptors(InterceptorRegistry registry) {
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.EXAM_NO_AUTH_URLS);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.EXAM_NO_AUTH_URLS);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置exam无需鉴权的url"));
 
         registry.addInterceptor(AuthInterceptor()).addPathPatterns(SystemConstant.ALL_PATH)

+ 3 - 3
themis-exam/src/main/java/com/qmth/themis/exam/interceptor/AuthInterceptor.java

@@ -2,7 +2,7 @@ package com.qmth.themis.exam.interceptor;
 
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.entity.SysConfig;
-import com.qmth.themis.business.service.CacheService;
+import com.qmth.themis.business.service.ThemisCacheService;
 import com.qmth.themis.business.util.AuthUtil;
 import com.qmth.themis.business.util.ServletUtil;
 import com.qmth.themis.common.enums.ExceptionResultEnum;
@@ -32,7 +32,7 @@ public class AuthInterceptor implements HandlerInterceptor {
     private final static Logger log = LoggerFactory.getLogger(AuthInterceptor.class);
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Override
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) {
@@ -47,7 +47,7 @@ public class AuthInterceptor implements HandlerInterceptor {
         long time = ServletUtil.getRequestTime();
         log.info("Start authorization: url:{}, method:{}, platform:{}, deviceId:{}, authorization:{}, time:{}", url,
                 method, platform, deviceId, authorization, time);
-        SysConfig sysConfig = cacheService.addSysConfigCache(SystemConstant.EXAM_COMMON_SYSTEM_URLS);
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.EXAM_COMMON_SYSTEM_URLS);
         Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置exam无需鉴权的url"));
         return AuthUtil.examAuthInterceptor(platform, deviceId, authorization, time, Arrays.asList(StringUtils.split(sysConfig.getConfigValue(), ",")), request, response);
     }

+ 10 - 69
themis-exam/src/main/resources/application.properties

@@ -16,81 +16,22 @@ db.port=3306
 db.name=themis_v1.1
 db.username=root
 db.password=123456789
+
 #redis\u6570\u636E\u6E90\u914D\u7F6E
-redis.host=${db.host}
-redis.database=13
-redis.port=6379
-redis.password=
-#redis.password=123456
+com.qmth.redis.host=${db.host}
+com.qmth.redis.port=6379
+com.qmth.redis.db=13
+#com.qmth.redis.password=
 
-spring.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8
-spring.datasource.username=${db.username}
-spring.datasource.password=${db.password}
-spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
-spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
-#\u4E0B\u9762\u4E3Adruid\u8FDE\u63A5\u6C60\u7684\u8865\u5145\u8BBE\u7F6E\uFF0C\u5E94\u7528\u5230\u4E0A\u9762\u6240\u6709\u6570\u636E\u6E90\u4E2D
-#\u521D\u59CB\u5316\u65F6\u5EFA\u7ACB\u7269\u7406\u8FDE\u63A5\u7684\u4E2A\u6570\u3002\u521D\u59CB\u5316\u53D1\u751F\u5728\u663E\u793A\u8C03\u7528init\u65B9\u6CD5\uFF0C\u6216\u8005\u7B2C\u4E00\u6B21getConnection\u65F6
-spring.datasource.initial-size=10
-#\u6700\u5C0F\u8FDE\u63A5\u6C60\u6570\u91CF
-spring.datasource.min-idle=40
-#\u6700\u5927\u8FDE\u63A5\u6C60\u6570\u91CF
-spring.datasource.max-active=200
-#\u83B7\u53D6\u8FDE\u63A5\u65F6\u6700\u5927\u7B49\u5F85\u65F6\u95F4\uFF0C\u5355\u4F4D\u6BEB\u79D2\u3002\u914D\u7F6E\u4E86maxWait\u4E4B\u540E\uFF0C\u7F3A\u7701\u542F\u7528\u516C\u5E73\u9501\uFF0C\u5E76\u53D1\u6548\u7387\u4F1A\u6709\u6240\u4E0B\u964D\uFF0C\u5982\u679C\u9700\u8981\u53EF\u4EE5\u901A\u8FC7\u914D\u7F6EuseUnfairLock\u5C5E\u6027\u4E3Atrue\u4F7F\u7528\u975E\u516C\u5E73\u9501\u3002
-spring.datasource.max-wait=60000
-#\u914D\u7F6E\u95F4\u9694\u591A\u4E45\u624D\u8FDB\u884C\u4E00\u6B21\u68C0\u6D4B\uFF0C\u68C0\u6D4B\u9700\u8981\u5173\u95ED\u7684\u7A7A\u95F2\u8FDE\u63A5\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
-spring.datasource.time-between-eviction-runs-millis=60000
-#\u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5C0F\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
-spring.datasource.min-evictable-idle-time-millis=300000
-#\u7528\u6765\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\u7684sql\uFF0C\u8981\u6C42\u662F\u4E00\u4E2A\u67E5\u8BE2\u8BED\u53E5\uFF0C\u5E38\u7528select 'x'\u3002\u5982\u679CvalidationQuery\u4E3Anull\uFF0CtestOnBorrow\u3001testOnReturn\u3001testWhileIdle\u90FD\u4E0D\u4F1A\u8D77\u4F5C\u7528
-spring.datasource.validation-query=SELECT 1 FROM DUAL
-#\u5EFA\u8BAE\u914D\u7F6E\u4E3Atrue\uFF0C\u4E0D\u5F71\u54CD\u6027\u80FD\uFF0C\u5E76\u4E14\u4FDD\u8BC1\u5B89\u5168\u6027\u3002\u7533\u8BF7\u8FDE\u63A5\u7684\u65F6\u5019\u68C0\u6D4B\uFF0C\u5982\u679C\u7A7A\u95F2\u65F6\u95F4\u5927\u4E8EtimeBetweenEvictionRunsMillis\uFF0C\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\u3002
-spring.datasource.test-while-idle=true
-#\u7533\u8BF7\u8FDE\u63A5\u65F6\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\uFF0C\u505A\u4E86\u8FD9\u4E2A\u914D\u7F6E\u4F1A\u964D\u4F4E\u6027\u80FD\u3002
-spring.datasource.test-on-borrow=false
-#\u5F52\u8FD8\u8FDE\u63A5\u65F6\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\uFF0C\u505A\u4E86\u8FD9\u4E2A\u914D\u7F6E\u4F1A\u964D\u4F4E\u6027\u80FD\u3002
-spring.datasource.test-on-return=false
-#\u662F\u5426\u7F13\u5B58preparedStatement\uFF0C\u4E5F\u5C31\u662FPSCache\u3002PSCache\u5BF9\u652F\u6301\u6E38\u6807\u7684\u6570\u636E\u5E93\u6027\u80FD\u63D0\u5347\u5DE8\u5927\uFF0C\u6BD4\u5982\u8BF4oracle\u3002\u5728mysql\u4E0B\u5EFA\u8BAE\u5173\u95ED\u3002(mysql5.5+\u5EFA\u8BAE\u5F00\u542F)
-spring.datasource.pool-prepared-statements=true
-#\u8981\u542F\u7528PSCache\uFF0C\u5FC5\u987B\u914D\u7F6E\u5927\u4E8E0\uFF0C\u5F53\u5927\u4E8E0\u65F6\uFF0CpoolPreparedStatements\u81EA\u52A8\u89E6\u53D1\u4FEE\u6539\u4E3Atrue\u3002\u5728Druid\u4E2D\uFF0C\u4E0D\u4F1A\u5B58\u5728Oracle\u4E0BPSCache\u5360\u7528\u5185\u5B58\u8FC7\u591A\u7684\u95EE\u9898\uFF0C\u53EF\u4EE5\u628A\u8FD9\u4E2A\u6570\u503C\u914D\u7F6E\u5927\u4E00\u4E9B\uFF0C\u6BD4\u5982\u8BF4100
-spring.datasource.max-pool-prepared-statement-per-connection-size=20
-#\u914D\u7F6E\u76D1\u63A7\u7EDF\u8BA1\u62E6\u622A\u7684filters\uFF0C\u53BB\u6389\u540E\u76D1\u63A7\u754C\u9762sql\u65E0\u6CD5\u7EDF\u8BA1\uFF0C'wall'\u7528\u4E8E\u9632\u706B\u5899
-spring.datasource.filters=stat,wall,slf4j
-#\u5408\u5E76\u591A\u4E2Adatasource\u76D1\u63A7
-spring.datasource.use-global-data-source-stat=true
-# \u901A\u8FC7connectProperties\u5C5E\u6027\u6765\u6253\u5F00mergeSql\u529F\u80FD\uFF1B\u6162SQL\u8BB0\u5F55
-spring.datasource.connect-properties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;
-#\u53EA\u8981\u5C06\u5176\u503C\u66F4\u6539\u4E3Afalse\u65F6\u5C31\u53EF\u4EE5\u89E3\u51B3\u5982\u4E0B\u95EE\u9898\uFF0C\u5373\u5B58\u5728id\u6216\u8005name\u76F8\u540C\u7684bean\u65F6\uFF0C\u4E0D\u662F\u6253\u5370\u51FA\u76F8\u5173\u4FE1\u606F\uFF0C\u800C\u662F\u76F4\u63A5\u629B\u5F02\u5E38\uFF0C\u8FD9\u6837\u5C31\u53EF\u4EE5\u8FEB\u4F7F\u5F00\u53D1\u4EBA\u5458\u5FC5\u987B\u89E3\u51B3id\u6216\u8005name\u91CD\u590D\u7684\u95EE\u9898\u540E\u624D\u80FD\u6210\u529F\u542F\u52A8\u5BB9\u5668\u3002\u7136\u540E\u5C31\u5C1D\u8BD5\u4E86\u4E0B\uFF0C
-spring.main.allow-bean-definition-overriding=false
+#mysql\u914D\u7F6E
+com.qmth.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
+com.qmth.datasource.username=${db.username}
+com.qmth.datasource.password=${db.password}
+com.qmth.mybatis.log-level=debug
 
 #\u65E5\u5FD7\u914D\u7F6E
 logging.level.root=info
 
-# MyBatis-Plus\u914D\u7F6E
-mybatis-plus.typeAliasesPackage=com.qmth.themis.business.entity
-mybatis-plus.mapper-locations=classpath:/mapper/*Mapper.xml
-mybatis-plus.global-config.id-type=1
-mybatis-plus.configuration.map-underscore-to-camel-case=true
-mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
-logging.level.com.qmth.themis.business.dao=debug
-mybatis-plus.configuration.call-setters-on-nulls=true
-
-#redis
-spring.redis.database=${redis.database}
-spring.redis.host=${redis.host}
-spring.redis.port=${redis.port}
-spring.redis.password=${redis.password}
-# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
-# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
-spring.redis.jedis.pool.max-active=30
-# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
-spring.redis.jedis.pool.max-wait=-1ms
-# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5
-spring.redis.jedis.pool.max-idle=5
-# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5
-spring.redis.jedis.pool.min-idle=1
-# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
-spring.redis.jedis.timeout=180000
-
 #\u65E5\u671F\u683C\u5F0F\u5316
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
 spring.jackson.time-zone=GMT+8

+ 56 - 56
themis-task/src/main/java/com/qmth/themis/task/config/DruidConfig.java

@@ -1,56 +1,56 @@
-package com.qmth.themis.task.config;
-
-import com.alibaba.druid.pool.DruidDataSource;
-import com.alibaba.druid.support.http.StatViewServlet;
-import com.alibaba.druid.support.http.WebStatFilter;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
-import org.springframework.boot.web.servlet.ServletRegistrationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import javax.sql.DataSource;
-
-/**
- * @Description: druid数据源配置
- * @Param:
- * @return:
- * @Author: wangliang
- * @Date: 2019/10/11
- */
-@Configuration
-public class DruidConfig {
-
-    @Bean
-    public ServletRegistrationBean druidServlet() {
-        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
-        // IP白名单
-        servletRegistrationBean.addInitParameter("allow", "*");
-        // IP黑名单(共同存在时,deny优先于allow)
-//        servletRegistrationBean.addInitParameter("deny", "192.168.1.206");
-        //控制台管理用户
-        servletRegistrationBean.addInitParameter("loginUsername", "admin");
-        servletRegistrationBean.addInitParameter("loginPassword", "admin");
-        //是否能够重置数据 禁用HTML页面上的“Reset All”功能
-        servletRegistrationBean.addInitParameter("resetEnable", "false");
-        return servletRegistrationBean;
-    }
-
-    @Bean
-    public FilterRegistrationBean filterRegistrationBean() {
-        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter());
-        filterRegistrationBean.addUrlPatterns("/*");
-        filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
-        return filterRegistrationBean;
-    }
-
-    /**
-     * 单数据源可以直接放开以下注释行
-     */
-    @Bean
-    @ConfigurationProperties(prefix = "spring.datasource")
-    public DataSource druid() {
-        return new DruidDataSource();
-    }
-}
-
+//package com.qmth.themis.task.config;
+//
+//import com.alibaba.druid.pool.DruidDataSource;
+//import com.alibaba.druid.support.http.StatViewServlet;
+//import com.alibaba.druid.support.http.WebStatFilter;
+//import org.springframework.boot.context.properties.ConfigurationProperties;
+//import org.springframework.boot.web.servlet.FilterRegistrationBean;
+//import org.springframework.boot.web.servlet.ServletRegistrationBean;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//
+//import javax.sql.DataSource;
+//
+///**
+// * @Description: druid数据源配置
+// * @Param:
+// * @return:
+// * @Author: wangliang
+// * @Date: 2019/10/11
+// */
+//@Configuration
+//public class DruidConfig {
+//
+//    @Bean
+//    public ServletRegistrationBean druidServlet() {
+//        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
+//        // IP白名单
+//        servletRegistrationBean.addInitParameter("allow", "*");
+//        // IP黑名单(共同存在时,deny优先于allow)
+////        servletRegistrationBean.addInitParameter("deny", "192.168.1.206");
+//        //控制台管理用户
+//        servletRegistrationBean.addInitParameter("loginUsername", "admin");
+//        servletRegistrationBean.addInitParameter("loginPassword", "admin");
+//        //是否能够重置数据 禁用HTML页面上的“Reset All”功能
+//        servletRegistrationBean.addInitParameter("resetEnable", "false");
+//        return servletRegistrationBean;
+//    }
+//
+//    @Bean
+//    public FilterRegistrationBean filterRegistrationBean() {
+//        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter());
+//        filterRegistrationBean.addUrlPatterns("/*");
+//        filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
+//        return filterRegistrationBean;
+//    }
+//
+//    /**
+//     * 单数据源可以直接放开以下注释行
+//     */
+//    @Bean
+//    @ConfigurationProperties(prefix = "spring.datasource")
+//    public DataSource druid() {
+//        return new DruidDataSource();
+//    }
+//}
+//

+ 2 - 2
themis-task/src/main/java/com/qmth/themis/task/quartz/MqActivityJob.java

@@ -48,7 +48,7 @@ public class MqActivityJob extends QuartzJobBean {
     CommonService commonService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     /**
      * 每天凌晨定时任务
@@ -141,7 +141,7 @@ public class MqActivityJob extends QuartzJobBean {
                 if ((System.currentTimeMillis() - t.getFinishTime().longValue()) / 1000 / 60 >= 30) {//超过30分钟则改状态
                     try {
                         ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(t.getExamStudentId());
-                        TEStudentCacheDto teStudent = cacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
+                        TEStudentCacheDto teStudent = themisCacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
                         commonService.persisted(t.getId(), teStudent.getId());
                     } catch (Exception e) {
                         log.error(SystemConstant.LOG_ERROR, e);

+ 1 - 1
themis-task/src/main/java/com/qmth/themis/task/quartz/service/impl/QuartzLogicServiceImpl.java

@@ -56,7 +56,7 @@ public class QuartzLogicServiceImpl implements QuartzLogicService {
     MqDtoService mqDtoService;
 
     @Resource
-    CacheService cacheService;
+    ThemisCacheService themisCacheService;
 
     @Resource
     OssUtil ossUtil;

+ 11 - 69
themis-task/src/main/resources/application.properties

@@ -16,81 +16,22 @@ db.port=3306
 db.name=themis_v1.1
 db.username=root
 db.password=123456789
+
 #redis\u6570\u636E\u6E90\u914D\u7F6E
-redis.host=${db.host}
-redis.database=13
-redis.port=6379
-redis.password=
-#redis.password=123456
+com.qmth.redis.host=${db.host}
+com.qmth.redis.port=6379
+com.qmth.redis.db=13
+#com.qmth.redis.password=
 
-spring.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8
-spring.datasource.username=${db.username}
-spring.datasource.password=${db.password}
-spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
-spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
-#\u4E0B\u9762\u4E3Adruid\u8FDE\u63A5\u6C60\u7684\u8865\u5145\u8BBE\u7F6E\uFF0C\u5E94\u7528\u5230\u4E0A\u9762\u6240\u6709\u6570\u636E\u6E90\u4E2D
-#\u521D\u59CB\u5316\u65F6\u5EFA\u7ACB\u7269\u7406\u8FDE\u63A5\u7684\u4E2A\u6570\u3002\u521D\u59CB\u5316\u53D1\u751F\u5728\u663E\u793A\u8C03\u7528init\u65B9\u6CD5\uFF0C\u6216\u8005\u7B2C\u4E00\u6B21getConnection\u65F6
-spring.datasource.initial-size=10
-#\u6700\u5C0F\u8FDE\u63A5\u6C60\u6570\u91CF
-spring.datasource.min-idle=40
-#\u6700\u5927\u8FDE\u63A5\u6C60\u6570\u91CF
-spring.datasource.max-active=200
-#\u83B7\u53D6\u8FDE\u63A5\u65F6\u6700\u5927\u7B49\u5F85\u65F6\u95F4\uFF0C\u5355\u4F4D\u6BEB\u79D2\u3002\u914D\u7F6E\u4E86maxWait\u4E4B\u540E\uFF0C\u7F3A\u7701\u542F\u7528\u516C\u5E73\u9501\uFF0C\u5E76\u53D1\u6548\u7387\u4F1A\u6709\u6240\u4E0B\u964D\uFF0C\u5982\u679C\u9700\u8981\u53EF\u4EE5\u901A\u8FC7\u914D\u7F6EuseUnfairLock\u5C5E\u6027\u4E3Atrue\u4F7F\u7528\u975E\u516C\u5E73\u9501\u3002
-spring.datasource.max-wait=60000
-#\u914D\u7F6E\u95F4\u9694\u591A\u4E45\u624D\u8FDB\u884C\u4E00\u6B21\u68C0\u6D4B\uFF0C\u68C0\u6D4B\u9700\u8981\u5173\u95ED\u7684\u7A7A\u95F2\u8FDE\u63A5\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
-spring.datasource.time-between-eviction-runs-millis=60000
-#\u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5C0F\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
-spring.datasource.min-evictable-idle-time-millis=300000
-#\u7528\u6765\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\u7684sql\uFF0C\u8981\u6C42\u662F\u4E00\u4E2A\u67E5\u8BE2\u8BED\u53E5\uFF0C\u5E38\u7528select 'x'\u3002\u5982\u679CvalidationQuery\u4E3Anull\uFF0CtestOnBorrow\u3001testOnReturn\u3001testWhileIdle\u90FD\u4E0D\u4F1A\u8D77\u4F5C\u7528
-spring.datasource.validation-query=SELECT 1 FROM DUAL
-#\u5EFA\u8BAE\u914D\u7F6E\u4E3Atrue\uFF0C\u4E0D\u5F71\u54CD\u6027\u80FD\uFF0C\u5E76\u4E14\u4FDD\u8BC1\u5B89\u5168\u6027\u3002\u7533\u8BF7\u8FDE\u63A5\u7684\u65F6\u5019\u68C0\u6D4B\uFF0C\u5982\u679C\u7A7A\u95F2\u65F6\u95F4\u5927\u4E8EtimeBetweenEvictionRunsMillis\uFF0C\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\u3002
-spring.datasource.test-while-idle=true
-#\u7533\u8BF7\u8FDE\u63A5\u65F6\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\uFF0C\u505A\u4E86\u8FD9\u4E2A\u914D\u7F6E\u4F1A\u964D\u4F4E\u6027\u80FD\u3002
-spring.datasource.test-on-borrow=false
-#\u5F52\u8FD8\u8FDE\u63A5\u65F6\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\uFF0C\u505A\u4E86\u8FD9\u4E2A\u914D\u7F6E\u4F1A\u964D\u4F4E\u6027\u80FD\u3002
-spring.datasource.test-on-return=false
-#\u662F\u5426\u7F13\u5B58preparedStatement\uFF0C\u4E5F\u5C31\u662FPSCache\u3002PSCache\u5BF9\u652F\u6301\u6E38\u6807\u7684\u6570\u636E\u5E93\u6027\u80FD\u63D0\u5347\u5DE8\u5927\uFF0C\u6BD4\u5982\u8BF4oracle\u3002\u5728mysql\u4E0B\u5EFA\u8BAE\u5173\u95ED\u3002(mysql5.5+\u5EFA\u8BAE\u5F00\u542F)
-spring.datasource.pool-prepared-statements=true
-#\u8981\u542F\u7528PSCache\uFF0C\u5FC5\u987B\u914D\u7F6E\u5927\u4E8E0\uFF0C\u5F53\u5927\u4E8E0\u65F6\uFF0CpoolPreparedStatements\u81EA\u52A8\u89E6\u53D1\u4FEE\u6539\u4E3Atrue\u3002\u5728Druid\u4E2D\uFF0C\u4E0D\u4F1A\u5B58\u5728Oracle\u4E0BPSCache\u5360\u7528\u5185\u5B58\u8FC7\u591A\u7684\u95EE\u9898\uFF0C\u53EF\u4EE5\u628A\u8FD9\u4E2A\u6570\u503C\u914D\u7F6E\u5927\u4E00\u4E9B\uFF0C\u6BD4\u5982\u8BF4100
-spring.datasource.max-pool-prepared-statement-per-connection-size=20
-#\u914D\u7F6E\u76D1\u63A7\u7EDF\u8BA1\u62E6\u622A\u7684filters\uFF0C\u53BB\u6389\u540E\u76D1\u63A7\u754C\u9762sql\u65E0\u6CD5\u7EDF\u8BA1\uFF0C'wall'\u7528\u4E8E\u9632\u706B\u5899
-spring.datasource.filters=stat,wall,slf4j
-#\u5408\u5E76\u591A\u4E2Adatasource\u76D1\u63A7
-spring.datasource.use-global-data-source-stat=true
-# \u901A\u8FC7connectProperties\u5C5E\u6027\u6765\u6253\u5F00mergeSql\u529F\u80FD\uFF1B\u6162SQL\u8BB0\u5F55
-spring.datasource.connect-properties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;
-#\u53EA\u8981\u5C06\u5176\u503C\u66F4\u6539\u4E3Afalse\u65F6\u5C31\u53EF\u4EE5\u89E3\u51B3\u5982\u4E0B\u95EE\u9898\uFF0C\u5373\u5B58\u5728id\u6216\u8005name\u76F8\u540C\u7684bean\u65F6\uFF0C\u4E0D\u662F\u6253\u5370\u51FA\u76F8\u5173\u4FE1\u606F\uFF0C\u800C\u662F\u76F4\u63A5\u629B\u5F02\u5E38\uFF0C\u8FD9\u6837\u5C31\u53EF\u4EE5\u8FEB\u4F7F\u5F00\u53D1\u4EBA\u5458\u5FC5\u987B\u89E3\u51B3id\u6216\u8005name\u91CD\u590D\u7684\u95EE\u9898\u540E\u624D\u80FD\u6210\u529F\u542F\u52A8\u5BB9\u5668\u3002\u7136\u540E\u5C31\u5C1D\u8BD5\u4E86\u4E0B\uFF0C
-spring.main.allow-bean-definition-overriding=false
+#mysql\u914D\u7F6E
+com.qmth.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
+com.qmth.datasource.username=${db.username}
+com.qmth.datasource.password=${db.password}
+com.qmth.mybatis.log-level=debug
 
 #\u65E5\u5FD7\u914D\u7F6E
 logging.level.root=info
 
-# MyBatis-Plus\u914D\u7F6E
-mybatis-plus.typeAliasesPackage=com.qmth.themis.business.entity
-mybatis-plus.mapper-locations=classpath:/mapper/*Mapper.xml
-mybatis-plus.global-config.id-type=1
-mybatis-plus.configuration.map-underscore-to-camel-case=true
-mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
-logging.level.com.qmth.themis.business.dao=debug
-mybatis-plus.configuration.call-setters-on-nulls=true
-
-#redis
-spring.redis.database=${redis.database}
-spring.redis.host=${redis.host}
-spring.redis.port=${redis.port}
-spring.redis.password=${redis.password}
-# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
-# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
-spring.redis.jedis.pool.max-active=30
-# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
-spring.redis.jedis.pool.max-wait=-1ms
-# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5
-spring.redis.jedis.pool.max-idle=5
-# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5
-spring.redis.jedis.pool.min-idle=1
-# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
-spring.redis.jedis.timeout=180000
-
 #\u65E5\u671F\u683C\u5F0F\u5316
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
 spring.jackson.time-zone=GMT+8
@@ -115,6 +56,7 @@ aliyun.oss.privateAccessKeyId=LTAI4FnJ2pgV6aGceYcCkeEi
 aliyun.oss.privateAccessKeySecret=ktrMEVE7PfoxRPeJUPDFeygOIH4aU7
 aliyun.oss.privateBucket=qmth-test
 aliyun.oss.privateUrl=http://static-test.qmth.com.cn
+
 #============================================================================
 # \u914D\u7F6EJobStore
 #============================================================================