Pārlūkot izejas kodu

日期类型修改成long

wangliang 4 gadi atpakaļ
vecāks
revīzija
d71aa1c0ef
83 mainītis faili ar 1015 papildinājumiem un 1323 dzēšanām
  1. 1 1
      themis-backend/src/main/java/com/qmth/themis/backend/api/TBUserController.java
  2. 2 2
      themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamController.java
  3. 1 1
      themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamReexamController.java
  4. 4 4
      themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateController.java
  5. 23 23
      themis-backend/src/main/java/com/qmth/themis/backend/config/WebMvcConfig.java
  6. 3 4
      themis-backend/src/main/java/com/qmth/themis/backend/interceptor/AuthInterceptor.java
  7. 1 1
      themis-backend/src/main/java/com/qmth/themis/backend/websocket/WebSocketAdminServer.java
  8. 6 6
      themis-business/src/main/java/com/qmth/themis/business/base/BaseEntity.java
  9. 3 3
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListBean.java
  10. 3 3
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListHistoryBean.java
  11. 3 3
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListPatrolBean.java
  12. 3 3
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListVideoBean.java
  13. 3 3
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListWarningBean.java
  14. 0 142
      themis-business/src/main/java/com/qmth/themis/business/bean/exam/StudentBean.java
  15. 10 12
      themis-business/src/main/java/com/qmth/themis/business/cache/ExamBreakCacheUtil.java
  16. 31 32
      themis-business/src/main/java/com/qmth/themis/business/cache/ExamRecordCacheUtil.java
  17. 6 6
      themis-business/src/main/java/com/qmth/themis/business/cache/bean/ExamActivityCacheBean.java
  18. 34 36
      themis-business/src/main/java/com/qmth/themis/business/cache/bean/ExamCacheBean.java
  19. 83 80
      themis-business/src/main/java/com/qmth/themis/business/cache/bean/FaceVerifyCacheBean.java
  20. 20 20
      themis-business/src/main/java/com/qmth/themis/business/cache/bean/LivenessVerifyCacheBean.java
  21. 3 5
      themis-business/src/main/java/com/qmth/themis/business/config/MetaHandler.java
  22. 3 3
      themis-business/src/main/java/com/qmth/themis/business/dto/MqDto.java
  23. 6 6
      themis-business/src/main/java/com/qmth/themis/business/dto/request/TEExamDto.java
  24. 3 3
      themis-business/src/main/java/com/qmth/themis/business/dto/response/TBOrgDto.java
  25. 9 9
      themis-business/src/main/java/com/qmth/themis/business/dto/response/TBTaskDto.java
  26. 7 3
      themis-business/src/main/java/com/qmth/themis/business/dto/response/TBUserDto.java
  27. 13 13
      themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamActivityDto.java
  28. 9 9
      themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamActivityQueryDto.java
  29. 30 4
      themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamCourseDto.java
  30. 6 6
      themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamQueryDto.java
  31. 21 21
      themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamUnFinishDto.java
  32. 6 6
      themis-business/src/main/java/com/qmth/themis/business/dto/response/TEStudentDto.java
  33. 3 3
      themis-business/src/main/java/com/qmth/themis/business/entity/TBApp.java
  34. 3 3
      themis-business/src/main/java/com/qmth/themis/business/entity/TBAttachment.java
  35. 3 3
      themis-business/src/main/java/com/qmth/themis/business/entity/TBPrivilege.java
  36. 3 3
      themis-business/src/main/java/com/qmth/themis/business/entity/TBRole.java
  37. 17 17
      themis-business/src/main/java/com/qmth/themis/business/entity/TBSession.java
  38. 11 11
      themis-business/src/main/java/com/qmth/themis/business/entity/TBTaskHistory.java
  39. 6 6
      themis-business/src/main/java/com/qmth/themis/business/entity/TEExam.java
  40. 7 7
      themis-business/src/main/java/com/qmth/themis/business/entity/TEExamActivity.java
  41. 3 3
      themis-business/src/main/java/com/qmth/themis/business/entity/TEExamReexam.java
  42. 0 7
      themis-business/src/main/java/com/qmth/themis/business/entity/TEExamStudent.java
  43. 9 9
      themis-business/src/main/java/com/qmth/themis/business/entity/TEExamStudentLog.java
  44. 3 3
      themis-business/src/main/java/com/qmth/themis/business/entity/TEUserLog.java
  45. 7 7
      themis-business/src/main/java/com/qmth/themis/business/entity/TIeExamInvigilateNotice.java
  46. 6 6
      themis-business/src/main/java/com/qmth/themis/business/entity/TIeInvigilateExceptionInfo.java
  47. 6 6
      themis-business/src/main/java/com/qmth/themis/business/entity/TIeInvigilateWarnInfo.java
  48. 3 3
      themis-business/src/main/java/com/qmth/themis/business/entity/TMRocketMessage.java
  49. 30 29
      themis-business/src/main/java/com/qmth/themis/business/entity/TOeExamBreakHistory.java
  50. 82 86
      themis-business/src/main/java/com/qmth/themis/business/entity/TOeExamRecord.java
  51. 3 3
      themis-business/src/main/java/com/qmth/themis/business/entity/TOeExamSimulateHistory.java
  52. 20 18
      themis-business/src/main/java/com/qmth/themis/business/entity/TOeFaceVerifyHistory.java
  53. 15 16
      themis-business/src/main/java/com/qmth/themis/business/entity/TOeLivenessVerifyHistory.java
  54. 1 1
      themis-business/src/main/java/com/qmth/themis/business/service/TBSessionService.java
  55. 2 12
      themis-business/src/main/java/com/qmth/themis/business/service/TOeExamRecordService.java
  56. 3 4
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TBSessionServiceImpl.java
  57. 25 28
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamServiceImpl.java
  58. 1 1
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEMobileServiceImpl.java
  59. 3 3
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeReportServiceImpl.java
  60. 13 19
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeExamRecordServiceImpl.java
  61. 48 58
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeLivenessVerifyHistoryServiceImpl.java
  62. 1 1
      themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskExamPaperImportTemplete.java
  63. 1 1
      themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskExamStudentImportTemplete.java
  64. 1 1
      themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskRoomCodeImportTemplete.java
  65. 2 20
      themis-business/src/main/java/com/qmth/themis/business/templete/service/impl/TempleteLogicServiceImpl.java
  66. 267 372
      themis-business/src/main/resources/db/init.sql
  67. 8 8
      themis-business/src/main/resources/mapper/TEExamActivityMapper.xml
  68. 1 1
      themis-business/src/main/resources/mapper/TEExamBreachLogMapper.xml
  69. 0 16
      themis-business/src/main/resources/mapper/TEExamCourseMapper.xml
  70. 4 4
      themis-business/src/main/resources/mapper/TEExamMapper.xml
  71. 1 1
      themis-business/src/main/resources/mapper/TEExamStudentLogMapper.xml
  72. 2 2
      themis-business/src/main/resources/mapper/TIeInvigilateExceptionInfoMapper.xml
  73. 2 2
      themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml
  74. 1 1
      themis-exam/src/main/java/com/qmth/themis/exam/api/SysController.java
  75. 5 5
      themis-exam/src/main/java/com/qmth/themis/exam/api/TEStudentController.java
  76. 2 2
      themis-exam/src/main/java/com/qmth/themis/exam/config/ExamConstant.java
  77. 3 4
      themis-exam/src/main/java/com/qmth/themis/exam/interceptor/AuthInterceptor.java
  78. 1 1
      themis-exam/src/main/java/com/qmth/themis/exam/websocket/WebSocketMobileServer.java
  79. 2 2
      themis-exam/src/main/java/com/qmth/themis/exam/websocket/WebSocketOeServer.java
  80. 1 1
      themis-exam/src/main/java/com/qmth/themis/exam/websocketTemplete/WebSocketOeMessageTemplete.java
  81. 10 22
      themis-mq/src/main/java/com/qmth/themis/mq/service/impl/MqLogicServiceImpl.java
  82. 2 2
      themis-task/src/main/java/com/qmth/themis/task/listener/service/impl/MqTaskLogicServiceImpl.java
  83. 6 6
      themis-task/src/main/java/com/qmth/themis/task/quartz/service/impl/QuartzLogicServiceImpl.java

+ 1 - 1
themis-backend/src/main/java/com/qmth/themis/backend/api/TBUserController.java

@@ -188,7 +188,7 @@ public class TBUserController {
         Map<String, Object> expireMap = SystemConstant.getExpireTime(platform);
         Date expire = (Date) expireMap.get("date");
         Long redisExpire = Long.parseLong(String.valueOf(expireMap.get("redisExpire")));
-        TBSession tbSession = new TBSession(sessionId, String.valueOf(user.getId()), authDto.getRoleCodes().toString(), source, platform.name(), deviceId, ServletUtil.getRequest().getLocalAddr(), token, expire);
+        TBSession tbSession = new TBSession(sessionId, String.valueOf(user.getId()), authDto.getRoleCodes().toString(), source, platform.name(), deviceId, ServletUtil.getRequest().getLocalAddr(), token, expire.getTime());
         redisUtil.setUserSession(sessionId, tbSession, redisExpire);
         //mq发送消息start
         MqDto mqDto = new MqDto(MqTopicEnum.THEMIS_TOPIC.getCode(), platform.name(), tbSession, MqTagEnum.valueOf(platform.name()), tbSession.getId(), user.getLoginName());

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

@@ -141,7 +141,7 @@ public class TEExamController {
                     teExamActivityList.forEach(s -> {
                         s.setPrepareSeconds(finalTeExam.getPrepareSeconds());
                         s.setMaxDurationSeconds(finalTeExam.getMaxDurationSeconds());
-                        s.setOpeningSeconds((int) ((finalTeExam.getEndTime().getTime() - finalTeExam.getStartTime().getTime()) / 1000));
+                        s.setOpeningSeconds((int) ((finalTeExam.getEndTime() - finalTeExam.getStartTime()) / 1000));
                         s.setStartTime(finalTeExam.getStartTime());
                         s.setFinishTime(finalTeExam.getEndTime());
                         s.setUpdateId(tbUser.getId());
@@ -160,7 +160,7 @@ public class TEExamController {
                         teExamActivityService.updateExamActivityCacheBean(s.getId());
                     });
                 } else {
-                    TEExamActivity teExamActivity = new TEExamActivity(teExam.getId(), teExam.getPrepareSeconds(), teExam.getMaxDurationSeconds(), (int) ((teExam.getEndTime().getTime() - teExam.getStartTime().getTime()) / 1000), teExam.getStartTime(), teExam.getEndTime(), tbUser.getId());
+                    TEExamActivity teExamActivity = new TEExamActivity(teExam.getId(), teExam.getPrepareSeconds(), teExam.getMaxDurationSeconds(), (int) ((teExam.getEndTime() - teExam.getStartTime()) / 1000), teExam.getStartTime(), teExam.getEndTime(), tbUser.getId());
                     teExamActivity.setCode(String.valueOf(redisUtil.getRedisActivityCodeSequence(teExam.getId())));
                     activityCode = teExamActivity.getCode();
                     teExamActivity.setEnable(1);

+ 1 - 1
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamReexamController.java

@@ -167,7 +167,7 @@ public class TEExamReexamController {
                     } else {
                         teExamReexam.setAuditingId(tbUser.getId());
                         teExamReexam.setAuditingStatus(auditingStatus);
-                        teExamReexam.setAuditingTime(new Date());
+                        teExamReexam.setAuditingTime(System.currentTimeMillis());
                         teExamReexam.setAuditingSuggest(Objects.isNull(mapParameter.get("auditingSuggest")) ? null : String.valueOf(mapParameter.get("auditingSuggest")));
                         teExamReexam.setStatus(2);
                         teExamReexam.setUpdateId(tbUser.getId());

+ 4 - 4
themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateController.java

@@ -521,21 +521,21 @@ public class TIeInvigilateController {
             //获取已待考、考试中学生
             examActivityIdSet.forEach(s -> {
                 ExamActivityCacheBean examActivityCacheBean = teExamActivityService.getExamActivityCacheBean(s);
-                Date startTime = examActivityCacheBean.getStartTime();
-                Date finishTime = examActivityCacheBean.getFinishTime();
+                Long startTime = examActivityCacheBean.getStartTime();
+                Long finishTime = examActivityCacheBean.getFinishTime();
                 Integer activityMaxDurationSeconds = Objects.nonNull(examActivityCacheBean.getMaxDurationSeconds()) ? examActivityCacheBean.getMaxDurationSeconds() : null;
                 Integer maxDurationSeconds = Objects.nonNull(examCacheBean.getMaxDurationSeconds()) ? examCacheBean.getMaxDurationSeconds() : null;
                 Integer finalMaxDurationSeconds = Objects.nonNull(activityMaxDurationSeconds) ? activityMaxDurationSeconds : maxDurationSeconds;
                 Calendar calendar = Calendar.getInstance();
                 if (Objects.nonNull(finalMaxDurationSeconds)) {
-                    calendar.setTime(startTime);
+                    calendar.setTimeInMillis(startTime);
                     calendar.add(Calendar.SECOND, finalMaxDurationSeconds.intValue());
                 }
 //                Date now = new Date();
 //                if (now.getTime() >= calendar.getTime().getTime() && now.getTime() <= finishTime.getTime()) {
                 examPropCountDto.setMaxDurationSeconds(calendar.getTime().getTime());
                 if (Objects.nonNull(examCacheBean.getForceFinish()) && examCacheBean.getForceFinish() == 1) {
-                    examPropCountDto.setFinishTime(finishTime.getTime());
+                    examPropCountDto.setFinishTime(finishTime);
                 }
                 Map<String, Object> objectMap = redisUtil.getHashEntries(RedisKeyHelper.examActivityRecordCacheKey(s));
                 if (Objects.nonNull(objectMap) && objectMap.size() > 0) {

+ 23 - 23
themis-backend/src/main/java/com/qmth/themis/backend/config/WebMvcConfig.java

@@ -41,27 +41,27 @@ public class WebMvcConfig implements WebMvcConfigurer {
         registry.addInterceptor(AuthInterceptor()).addPathPatterns(SystemConstant.ALL_PATH).excludePathPatterns(dictionaryConfig.authNoUrlDomain().getUrls());
     }
 
-    @Override
-    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        ObjectMapper objectMapper = new ObjectMapper();
-        objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
-        objectMapper.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
-
-        objectMapper.setTimeZone(TimeZone.getTimeZone("GMT+8"));
-        //objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
-
-        // 处理数字位数超过JS默认最大数字时精度差异问题
-        SimpleModule simpleModule = new SimpleModule();
-        simpleModule.addSerializer(BigInteger.class, ToStringSerializer.instance);
-        simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
-        simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance);
-
-        objectMapper.registerModule(simpleModule);
-
-        for (HttpMessageConverter<?> c : converters) {
-            if (c instanceof MappingJackson2HttpMessageConverter) {
-                ((MappingJackson2HttpMessageConverter) c).setObjectMapper(objectMapper);
-            }
-        }
-    }
+//    @Override
+//    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+//        ObjectMapper objectMapper = new ObjectMapper();
+//        objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+//        objectMapper.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
+//
+//        objectMapper.setTimeZone(TimeZone.getTimeZone("GMT+8"));
+//        //objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
+//
+//        // 处理数字位数超过JS默认最大数字时精度差异问题
+//        SimpleModule simpleModule = new SimpleModule();
+//        simpleModule.addSerializer(BigInteger.class, ToStringSerializer.instance);
+//        simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
+//        simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance);
+//
+//        objectMapper.registerModule(simpleModule);
+//
+//        for (HttpMessageConverter<?> c : converters) {
+//            if (c instanceof MappingJackson2HttpMessageConverter) {
+//                ((MappingJackson2HttpMessageConverter) c).setObjectMapper(objectMapper);
+//            }
+//        }
+//    }
 }

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

@@ -22,7 +22,6 @@ import org.springframework.web.servlet.ModelAndView;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.Date;
 import java.util.List;
 import java.util.Objects;
 import java.util.Set;
@@ -76,12 +75,12 @@ public class AuthInterceptor implements HandlerInterceptor {
             if (Objects.isNull(tbSession)) {
                 throw new BusinessException(ExceptionResultEnum.LOGIN_NO);
             } else {
-                if (info.validate(tbSession.getAccessToken()) && info.getTimestamp() < tbSession.getExpireTime().getTime()
+                if (info.validate(tbSession.getAccessToken()) && info.getTimestamp() < tbSession.getExpireTime()
                         && platform.name().equalsIgnoreCase(tbSession.getPlatform()) && Objects.equals(deviceId, tbSession.getDeviceId())) {
                     userId = Long.parseLong(tbSession.getIdentity());
-                    Date expireTime = tbSession.getExpireTime();
+                    Long expireTime = tbSession.getExpireTime();
                     //手机端的token时长为一个月,所以会出现缓存没有的情况
-                    if (expireTime.getTime() <= System.currentTimeMillis()) {//先判断时间是否过期
+                    if (expireTime <= System.currentTimeMillis()) {//先判断时间是否过期
                         throw new BusinessException(ExceptionResultEnum.LOGIN_NO);
                     }
                     TBUser tbUser = (TBUser) redisUtil.getUser(userId);

+ 1 - 1
themis-backend/src/main/java/com/qmth/themis/backend/websocket/WebSocketAdminServer.java

@@ -95,7 +95,7 @@ public class WebSocketAdminServer
             if (Objects.isNull(tbSession)) {
                 throw new BusinessException(ExceptionResultEnum.LOGIN_NO);
             } else {
-                if (info.validate(tbSession.getAccessToken()) && info.getTimestamp() < tbSession.getExpireTime().getTime()
+                if (info.validate(tbSession.getAccessToken()) && info.getTimestamp() < tbSession.getExpireTime()
                         && platform.equalsIgnoreCase(tbSession.getPlatform()) && Objects.equals(deviceId, tbSession.getDeviceId())) {
                     this.session = session;
                     session.setMaxIdleTimeout(SystemConstant.WEBSOCKET_MAX_TIME_OUT);

+ 6 - 6
themis-business/src/main/java/com/qmth/themis/business/base/BaseEntity.java

@@ -29,7 +29,7 @@ public class BaseEntity implements Serializable {
 
     @TableField(value = "create_time", fill = FieldFill.INSERT)//新增执行
     @ApiModelProperty(value = "创建时间")
-    private Date createTime;
+    private Long createTime;
 
     @TableField("update_id")
     @ApiModelProperty(value = "修改人id")
@@ -37,7 +37,7 @@ public class BaseEntity implements Serializable {
 
     @TableField(value = "update_Time", fill = FieldFill.INSERT_UPDATE) // 新增和更新执行
     @ApiModelProperty(value = "修改时间")
-    private Date updateTime;
+    private Long updateTime;
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -59,11 +59,11 @@ public class BaseEntity implements Serializable {
         this.createId = createId;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 
@@ -75,11 +75,11 @@ public class BaseEntity implements Serializable {
         this.updateId = updateId;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListBean.java

@@ -80,7 +80,7 @@ public class InvigilateListBean implements Serializable {
     private Integer breachStatus;
 
     @ApiModelProperty(name = "更新时间")
-    private Date updateTime;
+    private Long updateTime;
 
     @ApiModelProperty(name = "剩余时间")
     private String remainTime;
@@ -136,11 +136,11 @@ public class InvigilateListBean implements Serializable {
         this.roomName = roomName;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListHistoryBean.java

@@ -73,7 +73,7 @@ public class InvigilateListHistoryBean implements Serializable {
     private Integer breachStatus;
 
     @ApiModelProperty(name = "更新时间")
-    private Date updateTime;
+    private Long updateTime;
 
     @ApiModelProperty(name = "科目代码")
     private String courseCode;
@@ -153,11 +153,11 @@ public class InvigilateListHistoryBean implements Serializable {
         this.roomName = roomName;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListPatrolBean.java

@@ -66,7 +66,7 @@ public class InvigilateListPatrolBean implements Serializable {
     private Integer breachStatus;
 
     @ApiModelProperty(name = "更新时间")
-    private Date updateTime;
+    private Long updateTime;
 
     @ApiModelProperty(name = "虚拟考场名称")
     private String roomName;
@@ -163,11 +163,11 @@ public class InvigilateListPatrolBean implements Serializable {
         this.exceptionCount = exceptionCount;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListVideoBean.java

@@ -68,7 +68,7 @@ public class InvigilateListVideoBean implements Serializable {
     private String monitorLiveUrl;
 
     @ApiModelProperty(name = "更新时间")
-    private Date updateTime;
+    private Long updateTime;
 
     @ApiModelProperty(name = "答题进度")
     private Double progress;
@@ -135,11 +135,11 @@ public class InvigilateListVideoBean implements Serializable {
         this.roomName = roomName;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListWarningBean.java

@@ -72,7 +72,7 @@ public class InvigilateListWarningBean implements Serializable {
     private Integer breachStatus;
 
     @ApiModelProperty(name = "更新时间")
-    private Date updateTime;
+    private Long updateTime;
 
     @ApiModelProperty(name = "科目名称")
     private String courseName;
@@ -163,11 +163,11 @@ public class InvigilateListWarningBean implements Serializable {
         this.exceptionCount = exceptionCount;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 

+ 0 - 142
themis-business/src/main/java/com/qmth/themis/business/bean/exam/StudentBean.java

@@ -1,142 +0,0 @@
-package com.qmth.themis.business.bean.exam;
-
-import java.util.Date;
-
-import com.qmth.themis.business.enums.GenderEnum;
-public class StudentBean  {
-    private Long id;
-
-    private Long createId;
-
-    private Date createTime;
-
-    private Long updateId;
-
-    private Date updateTime;
-    
-    private Long orgId;
-
-    private String identity;
-
-    private String idcardNumber;
-
-    private String mobileNumber;
-
-    private String name;
-
-    private GenderEnum gender;
-
-    private String basePhotoPath;
-
-    private Integer enable;
-
-    public StudentBean() {
-
-    }
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public Long getCreateId() {
-		return createId;
-	}
-
-	public void setCreateId(Long createId) {
-		this.createId = createId;
-	}
-
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	public Long getUpdateId() {
-		return updateId;
-	}
-
-	public void setUpdateId(Long updateId) {
-		this.updateId = updateId;
-	}
-
-	public Date getUpdateTime() {
-		return updateTime;
-	}
-
-	public void setUpdateTime(Date updateTime) {
-		this.updateTime = updateTime;
-	}
-
-	public Long getOrgId() {
-		return orgId;
-	}
-
-	public void setOrgId(Long orgId) {
-		this.orgId = orgId;
-	}
-
-	public String getIdentity() {
-		return identity;
-	}
-
-	public void setIdentity(String identity) {
-		this.identity = identity;
-	}
-
-	public String getIdcardNumber() {
-		return idcardNumber;
-	}
-
-	public void setIdcardNumber(String idcardNumber) {
-		this.idcardNumber = idcardNumber;
-	}
-
-	public String getMobileNumber() {
-		return mobileNumber;
-	}
-
-	public void setMobileNumber(String mobileNumber) {
-		this.mobileNumber = mobileNumber;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public GenderEnum getGender() {
-		return gender;
-	}
-
-	public void setGender(GenderEnum gender) {
-		this.gender = gender;
-	}
-
-	public String getBasePhotoPath() {
-		return basePhotoPath;
-	}
-
-	public void setBasePhotoPath(String basePhotoPath) {
-		this.basePhotoPath = basePhotoPath;
-	}
-
-	public Integer getEnable() {
-		return enable;
-	}
-
-	public void setEnable(Integer enable) {
-		this.enable = enable;
-	}
-    
-    
-}

+ 10 - 12
themis-business/src/main/java/com/qmth/themis/business/cache/ExamBreakCacheUtil.java

@@ -5,14 +5,12 @@ import com.qmth.themis.business.enums.ExceptionEnum;
 import com.qmth.themis.business.enums.VerifyExceptionEnum;
 import com.qmth.themis.business.util.RedisUtil;
 
-import java.util.Date;
-
 /**
  * 断点缓存hash值操作
  *
  * @Description:
  * @Author: xiatian
- * @Date: 2020-07-29
+ * @Long: 2020-07-29
  */
 public class ExamBreakCacheUtil {
     private static RedisUtil redisUtil = SpringContextHolder.getBean(RedisUtil.class);
@@ -25,12 +23,12 @@ public class ExamBreakCacheUtil {
         return (Long) redisUtil.get(RedisKeyHelper.examBreakCacheKey(examBreakId), "examRecordId");
     }
 
-    public static void setBreakTime(Long examBreakId, Date breakTime) {
+    public static void setBreakTime(Long examBreakId, Long breakTime) {
         redisUtil.set(RedisKeyHelper.examBreakCacheKey(examBreakId), "breakTime", breakTime);
     }
 
-    public static Date getBreakTime(Long examBreakId) {
-        return (Date) redisUtil.get(RedisKeyHelper.examBreakCacheKey(examBreakId), "breakTime");
+    public static Long getBreakTime(Long examBreakId) {
+        return (Long) redisUtil.get(RedisKeyHelper.examBreakCacheKey(examBreakId), "breakTime");
     }
 
     public static void setBreakReason(Long examBreakId, ExceptionEnum breakReason) {
@@ -50,21 +48,21 @@ public class ExamBreakCacheUtil {
     }
 
 
-    public static void setPrepareTime(Long examBreakId, Date prepareTime) {
+    public static void setPrepareTime(Long examBreakId, Long prepareTime) {
         redisUtil.set(RedisKeyHelper.examBreakCacheKey(examBreakId), "prepareTime", prepareTime);
     }
 
-    public static Date getPrepareTime(Long examBreakId) {
-        return (Date) redisUtil.get(RedisKeyHelper.examBreakCacheKey(examBreakId), "prepareTime");
+    public static Long getPrepareTime(Long examBreakId) {
+        return (Long) redisUtil.get(RedisKeyHelper.examBreakCacheKey(examBreakId), "prepareTime");
     }
 
 
-    public static void setStartTime(Long examBreakId, Date startTime) {
+    public static void setStartTime(Long examBreakId, Long startTime) {
         redisUtil.set(RedisKeyHelper.examBreakCacheKey(examBreakId), "startTime", startTime);
     }
 
-    public static Date getStartTime(Long examBreakId) {
-        return (Date) redisUtil.get(RedisKeyHelper.examBreakCacheKey(examBreakId), "startTime");
+    public static Long getStartTime(Long examBreakId) {
+        return (Long) redisUtil.get(RedisKeyHelper.examBreakCacheKey(examBreakId), "startTime");
     }
 
     public static void setEntryAuthenticationResult(Long examBreakId, VerifyExceptionEnum entryAuthenticationResult) {

+ 31 - 32
themis-business/src/main/java/com/qmth/themis/business/cache/ExamRecordCacheUtil.java

@@ -6,7 +6,6 @@ import com.qmth.themis.business.enums.*;
 import com.qmth.themis.business.service.TOeExamRecordService;
 import com.qmth.themis.business.util.RedisUtil;
 
-import java.util.Date;
 import java.util.Objects;
 
 /**
@@ -33,10 +32,10 @@ public class ExamRecordCacheUtil {
         return (Long) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.paper_id.getCode());
     }
 
-    public static void setFirstStartTime(Long recordId, Date date, boolean update) {
+    public static void setFirstStartTime(Long recordId, Long date, boolean update) {
         redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.first_start_time.getCode(), date);
         if (update) {
-            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.first_start_time.name(), date, 1);
+            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.first_start_time.name(), date);
         }
     }
 
@@ -66,15 +65,15 @@ public class ExamRecordCacheUtil {
         }
     }
 
-    public static void setFinishTime(Long recordId, Date finishTime, boolean update) {
+    public static void setFinishTime(Long recordId, Long finishTime, boolean update) {
         redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.finish_time.getCode(), finishTime);
         if (update) {
-            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.finish_time.name(), finishTime, 1);
+            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.finish_time.name(), finishTime);
         }
     }
 
-    public static Date getFinishTime(Long recordId) {
-        return (Date) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.finish_time.getCode());
+    public static Long getFinishTime(Long recordId) {
+        return (Long) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.finish_time.getCode());
     }
 
     public static void setDurationSeconds(Long recordId, Integer durationSeconds, boolean update) {
@@ -95,8 +94,8 @@ public class ExamRecordCacheUtil {
         return (FinishTypeEnum) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.finish_type.getCode());
     }
 
-    public static Date getClientLastSyncTime(Long recordId) {
-        return (Date) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.client_last_sync_time.getCode());
+    public static Long getClientLastSyncTime(Long recordId) {
+        return (Long) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.client_last_sync_time.getCode());
     }
 
     public static Integer getAlreadyBreakCount(Long recordId) {
@@ -118,8 +117,8 @@ public class ExamRecordCacheUtil {
         return (Long) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.last_break_id.getCode());
     }
 
-    public static Date getLastBreakTime(Long recordId) {
-        return (Date) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.last_break_time.getCode());
+    public static Long getLastBreakTime(Long recordId) {
+        return (Long) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.last_break_time.getCode());
     }
 
     public static void setEntryAuthenticationResult(Long recordId, VerifyExceptionEnum entryAuthenticationResult, boolean update) {
@@ -258,10 +257,10 @@ public class ExamRecordCacheUtil {
         }
     }
 
-    public static void setClientLastSyncTime(Long recordId, Date date, boolean update) {
+    public static void setClientLastSyncTime(Long recordId, Long date, boolean update) {
         redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.client_last_sync_time.getCode(), date);
         if (update) {
-            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.client_last_sync_time.name(), date, 1);
+            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.client_last_sync_time.name(), date);
         }
     }
 
@@ -286,30 +285,30 @@ public class ExamRecordCacheUtil {
         }
     }
 
-    public static void setLastBreakTime(Long recordId, Date date, boolean update) {
+    public static void setLastBreakTime(Long recordId, Long date, boolean update) {
         redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.last_break_time.getCode(), date);
         if (update) {
-            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.last_break_time.name(), date, 1);
+            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.last_break_time.name(), date);
         }
     }
 
-    public static void setLastStartTime(Long recordId, Date date, boolean update) {
+    public static void setLastStartTime(Long recordId, Long date, boolean update) {
         redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.last_start_time.getCode(), date);
         if (update) {
-            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.last_start_time.name(), date, 1);
+            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.last_start_time.name(), date);
         }
     }
 
-    public static Date getLastStartTime(Long recordId) {
-        return (Date) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.last_start_time.getCode());
+    public static Long getLastStartTime(Long recordId) {
+        return (Long) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.last_start_time.getCode());
     }
 
-    public static Date getStartTime(Long recordId) {
-        return (Date) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.start_time.getCode());
+    public static Long getStartTime(Long recordId) {
+        return (Long) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.start_time.getCode());
     }
 
-    public static Date getEndTime(Long recordId) {
-        return (Date) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.end_time.getCode());
+    public static Long getEndTime(Long recordId) {
+        return (Long) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.end_time.getCode());
     }
 
     public static Integer getOpeningSeconds(Long recordId) {
@@ -328,17 +327,17 @@ public class ExamRecordCacheUtil {
         return (Integer) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.force_finish.getCode());
     }
 
-    public static void setStartTime(Long recordId, Date startTime, boolean update) {
+    public static void setStartTime(Long recordId, Long startTime, boolean update) {
         redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.start_time.getCode(), startTime);
         if (update) {
-            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.start_time.name(), startTime, 1);
+            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.start_time.name(), startTime);
         }
     }
 
-    public static void setEndTime(Long recordId, Date endTime, boolean update) {
+    public static void setEndTime(Long recordId, Long endTime, boolean update) {
         redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.end_time.getCode(), endTime);
         if (update) {
-            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.end_time.name(), endTime, 1);
+            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.end_time.name(), endTime);
         }
     }
 
@@ -370,18 +369,18 @@ public class ExamRecordCacheUtil {
         }
     }
 
-    public static void setLastPrepareTime(Long recordId, Date date, boolean update) {
+    public static void setLastPrepareTime(Long recordId, Long date, boolean update) {
         redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.last_prepare_time.getCode(), date);
         if (update) {
-            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.last_prepare_time.name(), date, 1);
+            examRecordService.dataUpdateMq(recordId, ExamRecordFieldEnum.last_prepare_time.name(), date);
         }
     }
 
-    public static void setExamFinalFinishTime(Long recordId, Date date) {
+    public static void setExamFinalFinishTime(Long recordId, Long date) {
         redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), "finalFinishTime", date);
     }
 
-    public static Date getExamFinalFinishTime(Long recordId) {
-        return (Date) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), "finalFinishTime");
+    public static Long getExamFinalFinishTime(Long recordId) {
+        return (Long) redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), "finalFinishTime");
     }
 }

+ 6 - 6
themis-business/src/main/java/com/qmth/themis/business/cache/bean/ExamActivityCacheBean.java

@@ -30,10 +30,10 @@ public class ExamActivityCacheBean implements Serializable {
 	private Integer openingSeconds;
 
 	//开考时间
-	private Date startTime;
+	private Long startTime;
 
 	//结束时间
-	private Date finishTime;
+	private Long finishTime;
 
 	public Long getExamId() {
 		return examId;
@@ -87,19 +87,19 @@ public class ExamActivityCacheBean implements Serializable {
 		this.openingSeconds = openingSeconds;
 	}
 
-	public Date getStartTime() {
+	public Long getStartTime() {
 		return startTime;
 	}
 
-	public void setStartTime(Date startTime) {
+	public void setStartTime(Long startTime) {
 		this.startTime = startTime;
 	}
 
-	public Date getFinishTime() {
+	public Long getFinishTime() {
 		return finishTime;
 	}
 
-	public void setFinishTime(Date finishTime) {
+	public void setFinishTime(Long finishTime) {
 		this.finishTime = finishTime;
 	}
 

+ 34 - 36
themis-business/src/main/java/com/qmth/themis/business/cache/bean/ExamCacheBean.java

@@ -25,13 +25,13 @@ public class ExamCacheBean implements Serializable {
     private Long createId;
 
     //创建时间
-    private Date createTime;
+    private Long createTime;
 
     //修改人id
     private Long updateId;
 
     //修改时间
-    private Date updateTime;
+    private Long updateTime;
 	
 	//机构ID
     private Long orgId;
@@ -46,10 +46,10 @@ public class ExamCacheBean implements Serializable {
     private String tag;
 
     //批次开始时间
-    private Date startTime;
+    private Long startTime;
 
     //批次结束时间
-    private Date endTime;
+    private Long endTime;
 
     //考试口令
     private String shortCode;
@@ -362,22 +362,6 @@ public class ExamCacheBean implements Serializable {
         this.tag = tag;
     }
 
-    public Date getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(Date startTime) {
-        this.startTime = startTime;
-    }
-
-    public Date getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(Date endTime) {
-        this.endTime = endTime;
-    }
-
     public String getShortCode() {
         return shortCode;
     }
@@ -514,14 +498,6 @@ public class ExamCacheBean implements Serializable {
 		this.createId = createId;
 	}
 
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
 	public Long getUpdateId() {
 		return updateId;
 	}
@@ -530,13 +506,35 @@ public class ExamCacheBean implements Serializable {
 		this.updateId = updateId;
 	}
 
-	public Date getUpdateTime() {
-		return updateTime;
-	}
+    public Long getCreateTime() {
+        return createTime;
+    }
 
-	public void setUpdateTime(Date updateTime) {
-		this.updateTime = updateTime;
-	}
-    
-    
+    public void setCreateTime(Long createTime) {
+        this.createTime = createTime;
+    }
+
+    public Long getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Long updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Long getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Long startTime) {
+        this.startTime = startTime;
+    }
+
+    public Long getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Long endTime) {
+        this.endTime = endTime;
+    }
 }

+ 83 - 80
themis-business/src/main/java/com/qmth/themis/business/cache/bean/FaceVerifyCacheBean.java

@@ -1,24 +1,25 @@
 package com.qmth.themis.business.cache.bean;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.qmth.themis.business.enums.ExamTypeEnum;
 import com.qmth.themis.business.enums.VerifyExceptionEnum;
 
-/**人脸验证记录
- * @Description: 
+import java.io.Serializable;
+
+/**
+ * 人脸验证记录
+ *
+ * @Description:
  * @Author: xiatian
  * @Date: 2020-07-31
  */
 public class FaceVerifyCacheBean implements Serializable {
 
     /**
-	 * 
-	 */
-	private static final long serialVersionUID = -3424843813633012427L;
+     *
+     */
+    private static final long serialVersionUID = -3424843813633012427L;
 
-	//主键
+    //主键
     private Long id;
 
     //考试记录ID
@@ -31,113 +32,115 @@ public class FaceVerifyCacheBean implements Serializable {
     private Double realness;
 
     //创建时间
-    private Date createTime;
+    private Long createTime;
 
     //更新时间
-    private Date updateTime;
+    private Long updateTime;
 
     //first:初次开考,recover:恢复开考,process:过程中
     private ExamTypeEnum type;
 
     //图片保存路径
     private String photoUrl;
-    
+
     //人脸数量
     private Integer faceCount;
 
     //异常类型
     private VerifyExceptionEnum exception;
-    
+
     //验证时间戳
     private Long time;
 
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
+    public Long getId() {
+        return id;
+    }
 
-	public Long getExamRecordId() {
-		return examRecordId;
-	}
+    public void setId(Long id) {
+        this.id = id;
+    }
 
-	public void setExamRecordId(Long examRecordId) {
-		this.examRecordId = examRecordId;
-	}
+    public Long getExamRecordId() {
+        return examRecordId;
+    }
 
-	public Double getSimilarity() {
-		return similarity;
-	}
+    public void setExamRecordId(Long examRecordId) {
+        this.examRecordId = examRecordId;
+    }
 
-	public void setSimilarity(Double similarity) {
-		this.similarity = similarity;
-	}
+    public Double getSimilarity() {
+        return similarity;
+    }
 
-	public Double getRealness() {
-		return realness;
-	}
+    public void setSimilarity(Double similarity) {
+        this.similarity = similarity;
+    }
 
-	public void setRealness(Double realness) {
-		this.realness = realness;
-	}
+    public Double getRealness() {
+        return realness;
+    }
 
-	public Date getCreateTime() {
-		return createTime;
-	}
+    public void setRealness(Double realness) {
+        this.realness = realness;
+    }
 
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
 
-	public Date getUpdateTime() {
-		return updateTime;
-	}
+    public Long getCreateTime() {
+        return createTime;
+    }
 
-	public void setUpdateTime(Date updateTime) {
-		this.updateTime = updateTime;
-	}
+    public void setCreateTime(Long createTime) {
+        this.createTime = createTime;
+    }
 
-	public ExamTypeEnum getType() {
-		return type;
-	}
+    public Long getUpdateTime() {
+        return updateTime;
+    }
 
-	public void setType(ExamTypeEnum type) {
-		this.type = type;
-	}
+    public void setUpdateTime(Long updateTime) {
+        this.updateTime = updateTime;
+    }
 
-	public String getPhotoUrl() {
-		return photoUrl;
-	}
+    public ExamTypeEnum getType() {
+        return type;
+    }
 
-	public void setPhotoUrl(String photoUrl) {
-		this.photoUrl = photoUrl;
-	}
+    public void setType(ExamTypeEnum type) {
+        this.type = type;
+    }
 
-	public Integer getFaceCount() {
-		return faceCount;
-	}
+    public String getPhotoUrl() {
+        return photoUrl;
+    }
 
-	public void setFaceCount(Integer faceCount) {
-		this.faceCount = faceCount;
-	}
+    public void setPhotoUrl(String photoUrl) {
+        this.photoUrl = photoUrl;
+    }
 
-	public VerifyExceptionEnum getException() {
-		return exception;
-	}
+    public Integer getFaceCount() {
+        return faceCount;
+    }
 
-	public void setException(VerifyExceptionEnum exception) {
-		this.exception = exception;
-	}
+    public void setFaceCount(Integer faceCount) {
+        this.faceCount = faceCount;
+    }
 
-	public Long getTime() {
-		return time;
-	}
+    public VerifyExceptionEnum getException() {
+        return exception;
+    }
 
-	public void setTime(Long time) {
-		this.time = time;
-	}
+    public void setException(VerifyExceptionEnum exception) {
+        this.exception = exception;
+    }
 
+    public Long getTime() {
+        return time;
+    }
 
+    public void setTime(Long time) {
+        this.time = time;
+    }
 }

+ 20 - 20
themis-business/src/main/java/com/qmth/themis/business/cache/bean/LivenessVerifyCacheBean.java

@@ -6,19 +6,21 @@ import java.util.Date;
 import com.qmth.themis.business.enums.LivenessTypeEnum;
 import com.qmth.themis.business.enums.VerifyExceptionEnum;
 
-/**活体验证记录
- * @Description: 
+/**
+ * 活体验证记录
+ *
+ * @Description:
  * @Author: xiatian
  * @Date: 2020-07-31
  */
 public class LivenessVerifyCacheBean implements Serializable {
 
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 281742662773373959L;
+    /**
+     *
+     */
+    private static final long serialVersionUID = 281742662773373959L;
 
-	//主键
+    //主键
     private Long id;
 
     //考试记录ID
@@ -36,10 +38,10 @@ public class LivenessVerifyCacheBean implements Serializable {
     private VerifyExceptionEnum exception;
 
     //开始时间
-    private Date startTime;
+    private Long startTime;
 
     //完成时间
-    private Date finishTime;
+    private Long finishTime;
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -85,29 +87,27 @@ public class LivenessVerifyCacheBean implements Serializable {
         this.retry = retry;
     }
 
-
     public VerifyExceptionEnum getException() {
-		return exception;
-	}
+        return exception;
+    }
 
-	public void setException(VerifyExceptionEnum exception) {
-		this.exception = exception;
-	}
+    public void setException(VerifyExceptionEnum exception) {
+        this.exception = exception;
+    }
 
-	public Date getStartTime() {
+    public Long getStartTime() {
         return startTime;
     }
 
-    public void setStartTime(Date startTime) {
+    public void setStartTime(Long startTime) {
         this.startTime = startTime;
     }
 
-    public Date getFinishTime() {
+    public Long getFinishTime() {
         return finishTime;
     }
 
-    public void setFinishTime(Date finishTime) {
+    public void setFinishTime(Long finishTime) {
         this.finishTime = finishTime;
     }
-
 }

+ 3 - 5
themis-business/src/main/java/com/qmth/themis/business/config/MetaHandler.java

@@ -4,8 +4,6 @@ import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
 import org.apache.ibatis.reflection.MetaObject;
 import org.springframework.stereotype.Component;
 
-import java.util.Date;
-
 /**
  * @Description: mybatis 自动插入时间和id
  * @Param:
@@ -18,12 +16,12 @@ public class MetaHandler implements MetaObjectHandler {
 
     @Override
     public void insertFill(MetaObject metaObject) {
-        this.setFieldValByName("createTime", new Date(), metaObject);
-        this.setFieldValByName("updateTime", new Date(), metaObject);
+        this.setFieldValByName("createTime", System.currentTimeMillis(), metaObject);
+        this.setFieldValByName("updateTime", System.currentTimeMillis(), metaObject);
     }
 
     @Override
     public void updateFill(MetaObject metaObject) {
-        this.setFieldValByName("updateTime", new Date(), metaObject);
+        this.setFieldValByName("updateTime", System.currentTimeMillis(), metaObject);
     }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/dto/MqDto.java

@@ -19,7 +19,7 @@ public class MqDto implements Serializable {
     private String id;//消息id
     private String topic;//消息topic
     private String tag;//消息tag
-    private long timestamp;//时间戳
+    private Long timestamp;//时间戳
     private Object body;//消息体
     private MqTagEnum type;//消息类型
     private String objId;//关联业务id
@@ -91,11 +91,11 @@ public class MqDto implements Serializable {
         this.tag = tag;
     }
 
-    public long getTimestamp() {
+    public Long getTimestamp() {
         return timestamp;
     }
 
-    public void setTimestamp(long timestamp) {
+    public void setTimestamp(Long timestamp) {
         this.timestamp = timestamp;
     }
 

+ 6 - 6
themis-business/src/main/java/com/qmth/themis/business/dto/request/TEExamDto.java

@@ -35,11 +35,11 @@ public class TEExamDto extends BaseEntity {
 
     @ApiModelProperty(value = "批次开始时间")
     @TableField(value = "start_time")
-    private Date startTime;
+    private Long startTime;
 
     @ApiModelProperty(value = "批次结束时间")
     @TableField(value = "end_time")
-    private Date endTime;
+    private Long endTime;
 
     @ApiModelProperty(value = "考试口令")
     @TableField(value = "short_code")
@@ -293,19 +293,19 @@ public class TEExamDto extends BaseEntity {
         this.tag = tag;
     }
 
-    public Date getStartTime() {
+    public Long getStartTime() {
         return startTime;
     }
 
-    public void setStartTime(Date startTime) {
+    public void setStartTime(Long startTime) {
         this.startTime = startTime;
     }
 
-    public Date getEndTime() {
+    public Long getEndTime() {
         return endTime;
     }
 
-    public void setEndTime(Date endTime) {
+    public void setEndTime(Long endTime) {
         this.endTime = endTime;
     }
 

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/dto/response/TBOrgDto.java

@@ -42,7 +42,7 @@ public class TBOrgDto implements Serializable {
     private String updateName;//更新人
 
     @ApiModelProperty(name = "更新时间")
-    private Date updateTime;//更新时间
+    private Long updateTime;//更新时间
 
     @ApiModelProperty(name = "模考试卷id")
     private Long simulatePaperId;//模考试卷id
@@ -171,11 +171,11 @@ public class TBOrgDto implements Serializable {
         this.updateName = updateName;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 }

+ 9 - 9
themis-business/src/main/java/com/qmth/themis/business/dto/response/TBTaskDto.java

@@ -39,13 +39,13 @@ public class TBTaskDto implements Serializable {
     private String hasReportFile;//报告路径
 
     @ApiModelProperty(name = "创建时间")
-    private Date createTime;//创建时间
+    private Long createTime;//创建时间
 
     @ApiModelProperty(name = "开始时间")
-    private Date startTime;//开始时间
+    private Long startTime;//开始时间
 
     @ApiModelProperty(name = "结束时间")
-    private Date finishTime;//结束时间
+    private Long finishTime;//结束时间
 
     @ApiModelProperty(name = "创建人id")
     private Long createId;//创建人id
@@ -139,27 +139,27 @@ public class TBTaskDto implements Serializable {
         this.hasReportFile = hasReportFile;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 
-    public Date getStartTime() {
+    public Long getStartTime() {
         return startTime;
     }
 
-    public void setStartTime(Date startTime) {
+    public void setStartTime(Long startTime) {
         this.startTime = startTime;
     }
 
-    public Date getFinishTime() {
+    public Long getFinishTime() {
         return finishTime;
     }
 
-    public void setFinishTime(Date finishTime) {
+    public void setFinishTime(Long finishTime) {
         this.finishTime = finishTime;
     }
 

+ 7 - 3
themis-business/src/main/java/com/qmth/themis/business/dto/response/TBUserDto.java

@@ -1,5 +1,8 @@
 package com.qmth.themis.business.dto.response;
 
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
@@ -15,6 +18,7 @@ import java.util.List;
  */
 public class TBUserDto implements Serializable {
 
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(name = "用户id")
     private Long id;//id
 
@@ -31,7 +35,7 @@ public class TBUserDto implements Serializable {
     private String updateName;//更新人
 
     @ApiModelProperty(name = "更新时间")
-    private Date updateTime;//更新时间
+    private Long updateTime;//更新时间
 
     @ApiModelProperty(name = "登录名")
     private String loginName;//登录名
@@ -150,11 +154,11 @@ public class TBUserDto implements Serializable {
         this.updateName = updateName;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 }

+ 13 - 13
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamActivityDto.java

@@ -107,10 +107,10 @@ public class TEExamActivityDto implements Serializable {
     private Integer cameraPhotoUpload;//是否允许使用摄像头拍照答题,0:不允许,1:允许
 
     @ApiModelProperty(name = "考场开始时间")
-    private Date startTime;//考场开始时间
+    private Long startTime;//考场开始时间
 
     @ApiModelProperty(name = "考场结束时间")
-    private Date finishTime;//考场结束时间
+    private Long finishTime;//考场结束时间
 
     @ApiModelProperty(name = "剩余考试次数")
     private Integer leftExamCount;//剩余考试次数
@@ -138,24 +138,24 @@ public class TEExamActivityDto implements Serializable {
         this.courseCode = examStudentCacheBean.getCourseCode();
         this.courseName = examStudentCacheBean.getCourseName();
         if (Objects.nonNull(examActivityCacheBean.getPrepareSeconds())) {
-            this.prepareTime = examActivityCacheBean.getStartTime().getTime() - (examActivityCacheBean.getPrepareSeconds() * 1000);
+            this.prepareTime = examActivityCacheBean.getStartTime() - (examActivityCacheBean.getPrepareSeconds() * 1000);
         } else if (Objects.nonNull(ec.getPrepareSeconds())) {
-            this.prepareTime = examActivityCacheBean.getStartTime().getTime() - (ec.getPrepareSeconds() * 1000);
+            this.prepareTime = examActivityCacheBean.getStartTime() - (ec.getPrepareSeconds() * 1000);
         }
         if (Objects.nonNull(examActivityCacheBean.getStartTime())) {
-            this.minStartTime = examActivityCacheBean.getStartTime().getTime();
+            this.minStartTime = examActivityCacheBean.getStartTime();
         } else {
-            this.minStartTime = ec.getStartTime().getTime();
+            this.minStartTime = ec.getStartTime();
         }
         if (Objects.nonNull(examActivityCacheBean.getOpeningSeconds())) {
-            this.maxStartTime = examActivityCacheBean.getStartTime().getTime() + (examActivityCacheBean.getOpeningSeconds() * 1000);
+            this.maxStartTime = examActivityCacheBean.getStartTime() + (examActivityCacheBean.getOpeningSeconds() * 1000);
         } else if (Objects.nonNull(ec.getMaxDurationSeconds())) {
-            this.maxStartTime = examActivityCacheBean.getStartTime().getTime() + (ec.getOpeningSeconds() * 1000);
+            this.maxStartTime = examActivityCacheBean.getStartTime() + (ec.getOpeningSeconds() * 1000);
         }
         if (Objects.equals(ec.getMode(), ExamModeEnum.ANYTIME) || (Objects.equals(ec.getMode(), ExamModeEnum.TOGETHER) && ec.getForceFinish() == 0)) {
             this.maxFinishTime = null;
         } else {
-            this.maxFinishTime = Objects.nonNull(examActivityCacheBean.getFinishTime()) ? examActivityCacheBean.getFinishTime().getTime() : ec.getEndTime().getTime();
+            this.maxFinishTime = Objects.nonNull(examActivityCacheBean.getFinishTime()) ? examActivityCacheBean.getFinishTime() : ec.getEndTime();
         }
         this.cameraPhotoUpload = ec.getCameraPhotoUpload();
         this.entryAuthenticationPolicy = ec.getEntryAuthenticationPolicy().name();
@@ -476,19 +476,19 @@ public class TEExamActivityDto implements Serializable {
         this.cameraPhotoUpload = cameraPhotoUpload;
     }
 
-    public Date getStartTime() {
+    public Long getStartTime() {
         return startTime;
     }
 
-    public void setStartTime(Date startTime) {
+    public void setStartTime(Long startTime) {
         this.startTime = startTime;
     }
 
-    public Date getFinishTime() {
+    public Long getFinishTime() {
         return finishTime;
     }
 
-    public void setFinishTime(Date finishTime) {
+    public void setFinishTime(Long finishTime) {
         this.finishTime = finishTime;
     }
 }

+ 9 - 9
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamActivityQueryDto.java

@@ -36,13 +36,13 @@ public class TEExamActivityQueryDto implements Serializable {
     private Integer openingSeconds;//允许开考时长(分钟);
 
     @ApiModelProperty(name = "开始时间")
-    private Date startTime;//开始时间
+    private Long startTime;//开始时间
 
     @ApiModelProperty(name = "结束时间")
-    private Date finishTime;//结束时间
+    private Long finishTime;//结束时间
 
     @ApiModelProperty(name = "更新时间")
-    private Date updateTime;//更新时间
+    private Long updateTime;//更新时间
 
     @ApiModelProperty(name = "更新人")
     private String updateName;//更新人
@@ -103,27 +103,27 @@ public class TEExamActivityQueryDto implements Serializable {
         this.openingSeconds = openingSeconds;
     }
 
-    public Date getStartTime() {
+    public Long getStartTime() {
         return startTime;
     }
 
-    public void setStartTime(Date startTime) {
+    public void setStartTime(Long startTime) {
         this.startTime = startTime;
     }
 
-    public Date getFinishTime() {
+    public Long getFinishTime() {
         return finishTime;
     }
 
-    public void setFinishTime(Date finishTime) {
+    public void setFinishTime(Long finishTime) {
         this.finishTime = finishTime;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 

+ 30 - 4
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamCourseDto.java

@@ -1,5 +1,7 @@
 package com.qmth.themis.business.dto.response;
 
+import io.swagger.annotations.ApiModelProperty;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -12,19 +14,43 @@ import java.util.Date;
  */
 public class TEExamCourseDto implements Serializable {
 
-
+    @ApiModelProperty(name = "id")
     private Long id;//id
+
+    @ApiModelProperty(name = "考试批次id")
     private Long examId;//考试id
+
+    @ApiModelProperty(name = "科目代码")
     private String courseCode;//科目代码
+
+    @ApiModelProperty(name = "科目名称")
     private String courseName;//科目名称
+
+    @ApiModelProperty(name = "是否开启客观题乱序,0:不开启,1:开启")
     private Integer objectiveShuffle;//是否开启客观题乱序,0:不开启,1:开启
+
+    @ApiModelProperty(name = "是否选项乱序,针对一个科目进行设置,0:不开启,1:开启")
     private Integer optionShuffle;//是否选项乱序,针对一个科目进行设置,0:不开启,1:开启
+
+    @ApiModelProperty(name = "已绑定试卷数量")
     private Integer paperCount;//已绑定试卷数量
+
+    @ApiModelProperty(name = "是否已补齐标答,0:否,1:是")
     private Integer hasAnswer;//是否已补齐标答,0:否,1:是
+
+    @ApiModelProperty(name = "音频播放次数")
     private Integer audioPlayCount;//音频播放次数
+
+    @ApiModelProperty(name = "题干包含音频,0:不包含,1:包含")
     private Integer hasAudio;//题干包含音频,0:不包含,1:包含
+
+    @ApiModelProperty(name = "是否绑定试卷,0:没绑定,1:绑定")
     private Integer hasPaper;//是否绑定试卷,0:没绑定,1:绑定
-    private Date updateTime;//更新时间
+
+    @ApiModelProperty(name = "更新时间")
+    private Long updateTime;//更新时间
+
+    @ApiModelProperty(name = "更新人")
     private String updateName;//更新人
 
     public Long getExamId() {
@@ -35,11 +61,11 @@ public class TEExamCourseDto implements Serializable {
         this.examId = examId;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 

+ 6 - 6
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamQueryDto.java

@@ -34,10 +34,10 @@ public class TEExamQueryDto implements Serializable {
     private Integer enable;//是否启用
 
     @ApiModelProperty(name = "开始时间")
-    private Date startTime;//开始时间
+    private Long startTime;//开始时间
 
     @ApiModelProperty(name = "结束时间")
-    private Date endTime;//结束时间
+    private Long endTime;//结束时间
 
     @ApiModelProperty(name = "算分进度")
     private Double progress;//算分进度
@@ -96,19 +96,19 @@ public class TEExamQueryDto implements Serializable {
         this.enable = enable;
     }
 
-    public Date getStartTime() {
+    public Long getStartTime() {
         return startTime;
     }
 
-    public void setStartTime(Date startTime) {
+    public void setStartTime(Long startTime) {
         this.startTime = startTime;
     }
 
-    public Date getEndTime() {
+    public Long getEndTime() {
         return endTime;
     }
 
-    public void setEndTime(Date endTime) {
+    public void setEndTime(Long endTime) {
         this.endTime = endTime;
     }
 

+ 21 - 21
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamUnFinishDto.java

@@ -48,16 +48,16 @@ public class TEExamUnFinishDto implements Serializable {
     private String examActivityCode;//考试场次代码
 
     @ApiModelProperty(name = "考试开始时间")
-    private Date examStartTime;//考试开始时间
+    private Long examStartTime;//考试开始时间
 
     @ApiModelProperty(name = "考试结束时间")
-    private Date examEndTime;//考试结束时间
+    private Long examEndTime;//考试结束时间
 
     @ApiModelProperty(name = "考场开始时间")
-    private Date examActivityStartTime;//考场开始时间
+    private Long examActivityStartTime;//考场开始时间
 
     @ApiModelProperty(name = "考场结束时间")
-    private Date examActivityFinishTime;//考场结束时间
+    private Long examActivityFinishTime;//考场结束时间
 
     @ApiModelProperty(name = "科目代码")
     private String courseCode;//科目代码
@@ -111,7 +111,7 @@ public class TEExamUnFinishDto implements Serializable {
     private Integer durationSeconds;//累计考试用时
 
     @ApiModelProperty(name = "客户端最近同步时间")
-    private Date clientLastSyncTime;//客户端最近同步时间
+    private Long clientLastSyncTime;//客户端最近同步时间
 
     @ApiModelProperty(name = "是否允许使用移动端拍照答题,0:不开启,1:开启")
     private Integer mobilePhotoUpload;//是否允许使用移动端拍照答题,0:不开启,1:开启
@@ -124,14 +124,6 @@ public class TEExamUnFinishDto implements Serializable {
         this.mobilePhotoUpload = mobilePhotoUpload;
     }
 
-    public Date getClientLastSyncTime() {
-        return clientLastSyncTime;
-    }
-
-    public void setClientLastSyncTime(Date clientLastSyncTime) {
-        this.clientLastSyncTime = clientLastSyncTime;
-    }
-
     public Integer getDurationSeconds() {
         return durationSeconds;
     }
@@ -244,38 +236,46 @@ public class TEExamUnFinishDto implements Serializable {
         this.examActivityCode = examActivityCode;
     }
 
-    public Date getExamStartTime() {
+    public Long getExamStartTime() {
         return examStartTime;
     }
 
-    public void setExamStartTime(Date examStartTime) {
+    public void setExamStartTime(Long examStartTime) {
         this.examStartTime = examStartTime;
     }
 
-    public Date getExamEndTime() {
+    public Long getExamEndTime() {
         return examEndTime;
     }
 
-    public void setExamEndTime(Date examEndTime) {
+    public void setExamEndTime(Long examEndTime) {
         this.examEndTime = examEndTime;
     }
 
-    public Date getExamActivityStartTime() {
+    public Long getExamActivityStartTime() {
         return examActivityStartTime;
     }
 
-    public void setExamActivityStartTime(Date examActivityStartTime) {
+    public void setExamActivityStartTime(Long examActivityStartTime) {
         this.examActivityStartTime = examActivityStartTime;
     }
 
-    public Date getExamActivityFinishTime() {
+    public Long getExamActivityFinishTime() {
         return examActivityFinishTime;
     }
 
-    public void setExamActivityFinishTime(Date examActivityFinishTime) {
+    public void setExamActivityFinishTime(Long examActivityFinishTime) {
         this.examActivityFinishTime = examActivityFinishTime;
     }
 
+    public Long getClientLastSyncTime() {
+        return clientLastSyncTime;
+    }
+
+    public void setClientLastSyncTime(Long clientLastSyncTime) {
+        this.clientLastSyncTime = clientLastSyncTime;
+    }
+
     public String getCourseCode() {
         return courseCode;
     }

+ 6 - 6
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEStudentDto.java

@@ -39,10 +39,10 @@ public class TEStudentDto implements Serializable {
     private String updateName;//更新人
 
     @ApiModelProperty(name = "创建时间")
-    private Date createTime;//创建时间
+    private Long createTime;//创建时间
 
     @ApiModelProperty(name = "更新时间")
-    private Date updateTime;//更新时间
+    private Long updateTime;//更新时间
 
     public Long getId() {
         return id;
@@ -108,19 +108,19 @@ public class TEStudentDto implements Serializable {
         this.updateName = updateName;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TBApp.java

@@ -31,7 +31,7 @@ public class TBApp extends BaseEntity {
 
     @ApiModelProperty(value = "最近访问时间")
     @TableField(value = "last_access_time")
-    private Date lastAccessTime;
+    private Long lastAccessTime;
 
     public String getName() {
         return name;
@@ -57,11 +57,11 @@ public class TBApp extends BaseEntity {
         this.accessSecret = accessSecret;
     }
 
-    public Date getLastAccessTime() {
+    public Long getLastAccessTime() {
         return lastAccessTime;
     }
 
-    public void setLastAccessTime(Date lastAccessTime) {
+    public void setLastAccessTime(Long lastAccessTime) {
         this.lastAccessTime = lastAccessTime;
     }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TBAttachment.java

@@ -55,7 +55,7 @@ public class TBAttachment implements Serializable {
 
     @TableField(value = "create_time", fill = FieldFill.INSERT)
     @ApiModelProperty(value = "创建时间")
-    private Date createTime; //创建时间
+    private Long createTime; //创建时间
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -125,11 +125,11 @@ public class TBAttachment implements Serializable {
         this.createId = createId;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TBPrivilege.java

@@ -51,7 +51,7 @@ public class TBPrivilege implements Serializable {
 
     @ApiModelProperty(value = "创建时间")
     @TableField(value = "create_time", fill = FieldFill.INSERT)
-    private Date createTime;
+    private Long createTime;
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -113,11 +113,11 @@ public class TBPrivilege implements Serializable {
         this.remark = remark;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TBRole.java

@@ -35,7 +35,7 @@ public class TBRole implements Serializable {
 
     @ApiModelProperty(value = "创建时间")
     @TableField(value = "create_time", fill = FieldFill.INSERT)
-    private Date createTime;
+    private Long createTime;
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -65,11 +65,11 @@ public class TBRole implements Serializable {
         this.roleName = roleName;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 }

+ 17 - 17
themis-business/src/main/java/com/qmth/themis/business/entity/TBSession.java

@@ -56,7 +56,7 @@ public class TBSession implements Serializable {
 
     @ApiModelProperty(value = "最近访问时间")
     @TableField(value = "last_access_time")
-    private Date lastAccessTime;
+    private Long lastAccessTime;
 
     @ApiModelProperty(value = "最近访问IP地址")
     @TableField(value = "last_access_ip")
@@ -64,11 +64,11 @@ public class TBSession implements Serializable {
 
     @ApiModelProperty(value = "令牌更新时间")
     @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
-    private Date updateTime;
+    private Long updateTime;
 
     @ApiModelProperty(value = "令牌强制失效时间")
     @TableField(value = "expire_time")
-    private Date expireTime;
+    private Long expireTime;
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -138,14 +138,6 @@ public class TBSession implements Serializable {
         this.accessToken = accessToken;
     }
 
-    public Date getLastAccessTime() {
-        return lastAccessTime;
-    }
-
-    public void setLastAccessTime(Date lastAccessTime) {
-        this.lastAccessTime = lastAccessTime;
-    }
-
     public String getLastAccessIp() {
         return lastAccessIp;
     }
@@ -154,19 +146,27 @@ public class TBSession implements Serializable {
         this.lastAccessIp = lastAccessIp;
     }
 
-    public Date getUpdateTime() {
+    public Long getLastAccessTime() {
+        return lastAccessTime;
+    }
+
+    public void setLastAccessTime(Long lastAccessTime) {
+        this.lastAccessTime = lastAccessTime;
+    }
+
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 
-    public Date getExpireTime() {
+    public Long getExpireTime() {
         return expireTime;
     }
 
-    public void setExpireTime(Date expireTime) {
+    public void setExpireTime(Long expireTime) {
         this.expireTime = expireTime;
     }
 
@@ -174,7 +174,7 @@ public class TBSession implements Serializable {
 
     }
 
-    public TBSession(String id, String identity, String type, String source, String platform, String deviceId, String address, String accessToken, Date expireTime) {
+    public TBSession(String id, String identity, String type, String source, String platform, String deviceId, String address, String accessToken, Long expireTime) {
         this.id = id;
         this.identity = identity;
         this.type = type;
@@ -184,6 +184,6 @@ public class TBSession implements Serializable {
         this.address = address;
         this.accessToken = accessToken;
         this.expireTime = expireTime;
-        this.lastAccessTime = new Date();
+        this.lastAccessTime = System.currentTimeMillis();
     }
 }

+ 11 - 11
themis-business/src/main/java/com/qmth/themis/business/entity/TBTaskHistory.java

@@ -69,15 +69,15 @@ public class TBTaskHistory implements Serializable {
 
     @ApiModelProperty(value = "创建时间")
     @TableField(value = "create_time", fill = FieldFill.INSERT)
-    private Date createTime;
+    private Long createTime;
 
     @ApiModelProperty(value = "开始时间")
     @TableField(value = "start_time")
-    private Date startTime;
+    private Long startTime;
 
     @ApiModelProperty(value = "结束时间")
     @TableField(value = "finish_time")
-    private Date finishTime;
+    private Long finishTime;
 
     public TBTaskHistory() {
 
@@ -93,7 +93,7 @@ public class TBTaskHistory implements Serializable {
         this.importFileName = importFileName;
         this.importFilePath = importFilePath;
         this.createId = createId;
-        this.startTime = new Date();
+        this.startTime = System.currentTimeMillis();
     }
 
     public TBTaskHistory(TaskTypeEnum type, TaskStatusEnum status, String summary, Double progress, Long createId) {
@@ -103,7 +103,7 @@ public class TBTaskHistory implements Serializable {
         this.summary = summary;
         this.progress = progress;
         this.createId = createId;
-        this.startTime = new Date();
+        this.startTime = System.currentTimeMillis();
     }
 
     public static long getSerialVersionUID() {
@@ -198,27 +198,27 @@ public class TBTaskHistory implements Serializable {
         this.createId = createId;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 
-    public Date getStartTime() {
+    public Long getStartTime() {
         return startTime;
     }
 
-    public void setStartTime(Date startTime) {
+    public void setStartTime(Long startTime) {
         this.startTime = startTime;
     }
 
-    public Date getFinishTime() {
+    public Long getFinishTime() {
         return finishTime;
     }
 
-    public void setFinishTime(Date finishTime) {
+    public void setFinishTime(Long finishTime) {
         this.finishTime = finishTime;
     }
 }

+ 6 - 6
themis-business/src/main/java/com/qmth/themis/business/entity/TEExam.java

@@ -40,11 +40,11 @@ public class TEExam extends BaseEntity {
 
     @ApiModelProperty(value = "批次开始时间")
     @TableField(value = "start_time")
-    private Date startTime;
+    private Long startTime;
 
     @ApiModelProperty(value = "批次结束时间")
     @TableField(value = "end_time")
-    private Date endTime;
+    private Long endTime;
 
     @ApiModelProperty(value = "考试口令")
     @TableField(value = "short_code", updateStrategy = FieldStrategy.IGNORED)
@@ -472,19 +472,19 @@ public class TEExam extends BaseEntity {
         this.tag = tag;
     }
 
-    public Date getStartTime() {
+    public Long getStartTime() {
         return startTime;
     }
 
-    public void setStartTime(Date startTime) {
+    public void setStartTime(Long startTime) {
         this.startTime = startTime;
     }
 
-    public Date getEndTime() {
+    public Long getEndTime() {
         return endTime;
     }
 
-    public void setEndTime(Date endTime) {
+    public void setEndTime(Long endTime) {
         this.endTime = endTime;
     }
 

+ 7 - 7
themis-business/src/main/java/com/qmth/themis/business/entity/TEExamActivity.java

@@ -44,17 +44,17 @@ public class TEExamActivity extends BaseEntity {
 
     @ApiModelProperty(value = "开考时间")
     @TableField(value = "start_time")
-    private Date startTime;
+    private Long startTime;
 
     @ApiModelProperty(value = "结束时间")
     @TableField(value = "finish_time")
-    private Date finishTime;
+    private Long finishTime;
 
     public TEExamActivity() {
 
     }
 
-    public TEExamActivity(Long examId, Integer prepareSeconds, Integer maxDurationSeconds, Integer openingSeconds, Date startTime, Date finishTime, Long createId) {
+    public TEExamActivity(Long examId, Integer prepareSeconds, Integer maxDurationSeconds, Integer openingSeconds, Long startTime, Long finishTime, Long createId) {
         setId(Constants.idGen.next());
         this.examId = examId;
         this.code = "examActivity" + Constants.idGen.next();
@@ -114,19 +114,19 @@ public class TEExamActivity extends BaseEntity {
         this.openingSeconds = openingSeconds;
     }
 
-    public Date getStartTime() {
+    public Long getStartTime() {
         return startTime;
     }
 
-    public void setStartTime(Date startTime) {
+    public void setStartTime(Long startTime) {
         this.startTime = startTime;
     }
 
-    public Date getFinishTime() {
+    public Long getFinishTime() {
         return finishTime;
     }
 
-    public void setFinishTime(Date finishTime) {
+    public void setFinishTime(Long finishTime) {
         this.finishTime = finishTime;
     }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TEExamReexam.java

@@ -62,7 +62,7 @@ public class TEExamReexam extends BaseEntity {
 
     @ApiModelProperty(value = "审核时间")
     @TableField(value = "auditing_time")
-    private Date auditingTime;
+    private Long auditingTime;
 
     @ApiModelProperty(value = "审批意见")
     @TableField(value = "auditing_suggest")
@@ -164,11 +164,11 @@ public class TEExamReexam extends BaseEntity {
         this.auditingStatus = auditingStatus;
     }
 
-    public Date getAuditingTime() {
+    public Long getAuditingTime() {
         return auditingTime;
     }
 
-    public void setAuditingTime(Date auditingTime) {
+    public void setAuditingTime(Long auditingTime) {
         this.auditingTime = auditingTime;
     }
 

+ 0 - 7
themis-business/src/main/java/com/qmth/themis/business/entity/TEExamStudent.java

@@ -52,14 +52,9 @@ public class TEExamStudent extends BaseEntity {
     @TableField(value = "parameter")
     private String parameter;
 
-//    @ApiModelProperty(value = "剩余考试次数")
-//    @TableField(value = "left_exam_count")
-//    private Integer leftExamCount;
-    
     @ApiModelProperty(value = "已考考试次数")
     @TableField(value = "already_exam_count")
     private Integer alreadyExamCount;
-    
 
     @ApiModelProperty(value = "当前考试记录ID")
     @TableField(value = "current_record_id")
@@ -216,6 +211,4 @@ public class TEExamStudent extends BaseEntity {
 	public void setAlreadyExamCount(Integer alreadyExamCount) {
 		this.alreadyExamCount = alreadyExamCount;
 	}
-    
-    
 }

+ 9 - 9
themis-business/src/main/java/com/qmth/themis/business/entity/TEExamStudentLog.java

@@ -52,7 +52,7 @@ public class TEExamStudentLog implements Serializable {
 
     @ApiModelProperty(value = "创建时间")
     @TableField(value = "create_time", fill = FieldFill.INSERT)
-    private Date createTime;
+    private Long createTime;
 
     @ApiModelProperty(value = "业务id")
     @TableField(value = "obj_id")
@@ -151,14 +151,6 @@ public class TEExamStudentLog implements Serializable {
         this.remark = remark;
     }
 
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
     public Long getStudentId() {
         return studentId;
     }
@@ -166,4 +158,12 @@ public class TEExamStudentLog implements Serializable {
     public void setStudentId(Long studentId) {
         this.studentId = studentId;
     }
+
+    public Long getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Long createTime) {
+        this.createTime = createTime;
+    }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TEUserLog.java

@@ -44,7 +44,7 @@ public class TEUserLog implements Serializable {
 
     @ApiModelProperty(value = "创建时间")
     @TableField(value = "create_time", fill = FieldFill.INSERT)
-    private Date createTime;
+    private Long createTime;
 
     public TEUserLog() {
 
@@ -102,11 +102,11 @@ public class TEUserLog implements Serializable {
         this.remark = remark;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 }

+ 7 - 7
themis-business/src/main/java/com/qmth/themis/business/entity/TIeExamInvigilateNotice.java

@@ -56,11 +56,11 @@ public class TIeExamInvigilateNotice implements Serializable {
 
     @ApiModelProperty(value = "发送时间")
     @TableField(value = "send_time")
-    private Date sendTime;
+    private Long sendTime;
 
     @ApiModelProperty(value = "接收时间")
     @TableField(value = "receive_time")
-    private Date receiveTime;
+    private Long receiveTime;
 
     public TIeExamInvigilateNotice() {
 
@@ -75,7 +75,7 @@ public class TIeExamInvigilateNotice implements Serializable {
         this.receiveUserId = receiveUserId;
         this.type = type;
         this.content = content;
-        this.sendTime = new Date();
+        this.sendTime = System.currentTimeMillis();
     }
 
     public static long getSerialVersionUID() {
@@ -146,19 +146,19 @@ public class TIeExamInvigilateNotice implements Serializable {
         this.content = content;
     }
 
-    public Date getSendTime() {
+    public Long getSendTime() {
         return sendTime;
     }
 
-    public void setSendTime(Date sendTime) {
+    public void setSendTime(Long sendTime) {
         this.sendTime = sendTime;
     }
 
-    public Date getReceiveTime() {
+    public Long getReceiveTime() {
         return receiveTime;
     }
 
-    public void setReceiveTime(Date receiveTime) {
+    public void setReceiveTime(Long receiveTime) {
         this.receiveTime = receiveTime;
     }
 }

+ 6 - 6
themis-business/src/main/java/com/qmth/themis/business/entity/TIeInvigilateExceptionInfo.java

@@ -57,11 +57,11 @@ public class TIeInvigilateExceptionInfo implements Serializable {
 
     @ApiModelProperty(value = "创建时间")
     @TableField(value = "create_time", fill = FieldFill.INSERT)
-    private Date createTime;
+    private Long createTime;
 
     @ApiModelProperty(value = "更新时间")
     @TableField(value = "update_time", fill = FieldFill.UPDATE)
-    private Date updateTime;
+    private Long updateTime;
 
     @ApiModelProperty(value = "处理时差,单位秒")
     @TableField(value = "difference")
@@ -183,19 +183,19 @@ public class TIeInvigilateExceptionInfo implements Serializable {
         this.remark = remark;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 }

+ 6 - 6
themis-business/src/main/java/com/qmth/themis/business/entity/TIeInvigilateWarnInfo.java

@@ -65,11 +65,11 @@ public class TIeInvigilateWarnInfo implements Serializable {
 
     @ApiModelProperty(value = "创建时间")
     @TableField(value = "create_time", fill = FieldFill.INSERT)
-    private Date createTime;
+    private Long createTime;
 
     @ApiModelProperty(value = "更新时间")
     @TableField(value = "update_time", fill = FieldFill.UPDATE)
-    private Date updateTime;
+    private Long updateTime;
 
     @ApiModelProperty(value = "图片url")
     @TableField(value = "photo_url")
@@ -208,19 +208,19 @@ public class TIeInvigilateWarnInfo implements Serializable {
         this.approveStatus = approveStatus;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 
-    public Date getUpdateTime() {
+    public Long getUpdateTime() {
         return updateTime;
     }
 
-    public void setUpdateTime(Date updateTime) {
+    public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
     }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TMRocketMessage.java

@@ -67,7 +67,7 @@ public class TMRocketMessage implements Serializable {
 
     @ApiModelProperty(value = "创建时间")
     @TableField(value = "create_time", fill = FieldFill.INSERT)
-    private Date createTime;
+    private Long createTime;
 
     @ApiModelProperty(value = "时间戳")
     @TableField(value = "timestamp")
@@ -141,11 +141,11 @@ public class TMRocketMessage implements Serializable {
         this.sequence = sequence;
     }
 
-    public Date getCreateTime() {
+    public Long getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
 

+ 30 - 29
themis-business/src/main/java/com/qmth/themis/business/entity/TOeExamBreakHistory.java

@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
+import java.util.Calendar;
 import java.util.Date;
 
 /**
@@ -32,7 +33,7 @@ public class TOeExamBreakHistory implements Serializable {
 
     @ApiModelProperty(value = "断点发生时间")
     @TableField(value = "break_time")
-    private Date breakTime;
+    private Long breakTime;
 
     @ApiModelProperty(value = "断点判定原因")
     @TableField(value = "break_reason")
@@ -44,11 +45,11 @@ public class TOeExamBreakHistory implements Serializable {
 
     @ApiModelProperty(value = "恢复候考时间")
     @TableField(value = "prepare_time")
-    private Date prepareTime;
+    private Long prepareTime;
 
     @ApiModelProperty(value = "恢复开考时间")
     @TableField(value = "start_time")
-    private Date startTime;
+    private Long startTime;
 
     @ApiModelProperty(value = "恢复开考身份验证结果")
     @TableField(value = "entry_authentication_result")
@@ -62,7 +63,7 @@ public class TOeExamBreakHistory implements Serializable {
 
     }
 
-    public TOeExamBreakHistory(Long examRecordId, Date breakTime, ExceptionEnum breakReason, String resumeReason) {
+    public TOeExamBreakHistory(Long examRecordId, Long breakTime, ExceptionEnum breakReason, String resumeReason) {
         this.id = Constants.idGen.next();
         this.examRecordId = examRecordId;
         this.breakTime = breakTime;
@@ -70,7 +71,7 @@ public class TOeExamBreakHistory implements Serializable {
         this.resumeReason = resumeReason;
     }
 
-    public TOeExamBreakHistory(Long id, Long examRecordId, Date breakTime, ExceptionEnum breakReason, String resumeReason) {
+    public TOeExamBreakHistory(Long id, Long examRecordId, Long breakTime, ExceptionEnum breakReason, String resumeReason) {
         this.id = id;
         this.examRecordId = examRecordId;
         this.breakTime = breakTime;
@@ -98,14 +99,6 @@ public class TOeExamBreakHistory implements Serializable {
         this.examRecordId = examRecordId;
     }
 
-    public Date getBreakTime() {
-        return breakTime;
-    }
-
-    public void setBreakTime(Date breakTime) {
-        this.breakTime = breakTime;
-    }
-
     public ExceptionEnum getBreakReason() {
         return breakReason;
     }
@@ -122,22 +115,6 @@ public class TOeExamBreakHistory implements Serializable {
         this.resumeReason = resumeReason;
     }
 
-    public Date getPrepareTime() {
-        return prepareTime;
-    }
-
-    public void setPrepareTime(Date prepareTime) {
-        this.prepareTime = prepareTime;
-    }
-
-    public Date getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(Date startTime) {
-        this.startTime = startTime;
-    }
-
     public VerifyExceptionEnum getEntryAuthenticationResult() {
         return entryAuthenticationResult;
     }
@@ -153,4 +130,28 @@ public class TOeExamBreakHistory implements Serializable {
     public void setEntryAuthenticationId(Long entryAuthenticationId) {
         this.entryAuthenticationId = entryAuthenticationId;
     }
+
+    public Long getBreakTime() {
+        return breakTime;
+    }
+
+    public void setBreakTime(Long breakTime) {
+        this.breakTime = breakTime;
+    }
+
+    public Long getPrepareTime() {
+        return prepareTime;
+    }
+
+    public void setPrepareTime(Long prepareTime) {
+        this.prepareTime = prepareTime;
+    }
+
+    public Long getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Long startTime) {
+        this.startTime = startTime;
+    }
 }

+ 82 - 86
themis-business/src/main/java/com/qmth/themis/business/entity/TOeExamRecord.java

@@ -46,23 +46,23 @@ public class TOeExamRecord implements Serializable {
 
     @ApiModelProperty(value = "首次进入候考时间")
     @TableField(value = "first_prepare_time")
-    private Date firstPrepareTime;
+    private Long firstPrepareTime;
 
     @ApiModelProperty(value = "首次开考时间")
     @TableField(value = "first_start_time")
-    private Date firstStartTime;
+    private Long firstStartTime;
 
     @ApiModelProperty(value = "最近断点时间")
     @TableField(value = "last_break_time")
-    private Date lastBreakTime;
+    private Long lastBreakTime;
 
     @ApiModelProperty(value = "最近恢复候考时间")
     @TableField(value = "last_prepare_time")
-    private Date lastPrepareTime;
+    private Long lastPrepareTime;
 
     @ApiModelProperty(value = "最近恢复开考时间")
     @TableField(value = "last_start_time")
-    private Date lastStartTime;
+    private Long lastStartTime;
 
     @ApiModelProperty(value = "已断点续考次数")
     @TableField(value = "already_break_count")
@@ -82,7 +82,7 @@ public class TOeExamRecord implements Serializable {
 
     @ApiModelProperty(value = "客户端最近同步时间")
     @TableField(value = "client_last_sync_time")
-    private Date clientLastSyncTime;
+    private Long clientLastSyncTime;
 
     @ApiModelProperty(value = "答题进度")
     @TableField(value = "answer_progress")
@@ -94,7 +94,7 @@ public class TOeExamRecord implements Serializable {
 
     @ApiModelProperty(value = "交卷时间")
     @TableField(value = "finish_time")
-    private Date finishTime;
+    private Long finishTime;
 
     @ApiModelProperty(value = "交卷原因,hand:手动交卷,auto:系统交卷,breach:违纪交卷")
     @TableField(value = "finish_type")
@@ -171,15 +171,14 @@ public class TOeExamRecord implements Serializable {
     @ApiModelProperty(value = "算分状态,never:从未算分,calculating:正在算分,finish:算分完成")
     @TableField(value = "score_status")
     private ScoreStatusEnum scoreStatus;
-    
-    
+
     @ApiModelProperty(value = "考试开始时间")
     @TableField(value = "start_time")
-    private Date startTime;
+    private Long startTime;
     
     @ApiModelProperty(value = "考试结束时间")
     @TableField(value = "end_time")
-    private Date endTime;
+    private Long endTime;
     
     @ApiModelProperty(value = "允许开考开放时长,相当于迟到时间")
     @TableField(value = "opening_seconds")
@@ -281,47 +280,6 @@ public class TOeExamRecord implements Serializable {
         this.status = status;
     }
 
-    public Date getFirstPrepareTime() {
-        return firstPrepareTime;
-    }
-
-    public void setFirstPrepareTime(Date firstPrepareTime) {
-        this.firstPrepareTime = firstPrepareTime;
-    }
-
-    public Date getFirstStartTime() {
-        return firstStartTime;
-    }
-
-    public void setFirstStartTime(Date firstStartTime) {
-        this.firstStartTime = firstStartTime;
-    }
-
-    public Date getLastBreakTime() {
-        return lastBreakTime;
-    }
-
-    public void setLastBreakTime(Date lastBreakTime) {
-        this.lastBreakTime = lastBreakTime;
-    }
-
-    public Date getLastPrepareTime() {
-        return lastPrepareTime;
-    }
-
-    public void setLastPrepareTime(Date lastPrepareTime) {
-        this.lastPrepareTime = lastPrepareTime;
-    }
-
-    public Date getLastStartTime() {
-        return lastStartTime;
-    }
-
-    public void setLastStartTime(Date lastStartTime) {
-        this.lastStartTime = lastStartTime;
-    }
-
-
     public String getClientCurrentIp() {
         return clientCurrentIp;
     }
@@ -346,14 +304,6 @@ public class TOeExamRecord implements Serializable {
         this.clientWebsocketId = clientWebsocketId;
     }
 
-    public Date getClientLastSyncTime() {
-        return clientLastSyncTime;
-    }
-
-    public void setClientLastSyncTime(Date clientLastSyncTime) {
-        this.clientLastSyncTime = clientLastSyncTime;
-    }
-
     public Double getAnswerProgress() {
         return answerProgress;
     }
@@ -370,14 +320,6 @@ public class TOeExamRecord implements Serializable {
         this.durationSeconds = durationSeconds;
     }
 
-    public Date getFinishTime() {
-        return finishTime;
-    }
-
-    public void setFinishTime(Date finishTime) {
-        this.finishTime = finishTime;
-    }
-
     public FinishTypeEnum getFinishType() {
         return finishType;
     }
@@ -506,22 +448,6 @@ public class TOeExamRecord implements Serializable {
 		this.alreadyBreakCount = alreadyBreakCount;
 	}
 
-	public Date getStartTime() {
-		return startTime;
-	}
-
-	public void setStartTime(Date startTime) {
-		this.startTime = startTime;
-	}
-
-	public Date getEndTime() {
-		return endTime;
-	}
-
-	public void setEndTime(Date endTime) {
-		this.endTime = endTime;
-	}
-
 	public Integer getOpeningSeconds() {
 		return openingSeconds;
 	}
@@ -553,6 +479,76 @@ public class TOeExamRecord implements Serializable {
 	public void setForceFinish(Integer forceFinish) {
 		this.forceFinish = forceFinish;
 	}
-    
-    
+
+    public Long getFirstPrepareTime() {
+        return firstPrepareTime;
+    }
+
+    public void setFirstPrepareTime(Long firstPrepareTime) {
+        this.firstPrepareTime = firstPrepareTime;
+    }
+
+    public Long getFirstStartTime() {
+        return firstStartTime;
+    }
+
+    public void setFirstStartTime(Long firstStartTime) {
+        this.firstStartTime = firstStartTime;
+    }
+
+    public Long getLastBreakTime() {
+        return lastBreakTime;
+    }
+
+    public void setLastBreakTime(Long lastBreakTime) {
+        this.lastBreakTime = lastBreakTime;
+    }
+
+    public Long getLastPrepareTime() {
+        return lastPrepareTime;
+    }
+
+    public void setLastPrepareTime(Long lastPrepareTime) {
+        this.lastPrepareTime = lastPrepareTime;
+    }
+
+    public Long getLastStartTime() {
+        return lastStartTime;
+    }
+
+    public void setLastStartTime(Long lastStartTime) {
+        this.lastStartTime = lastStartTime;
+    }
+
+    public Long getClientLastSyncTime() {
+        return clientLastSyncTime;
+    }
+
+    public void setClientLastSyncTime(Long clientLastSyncTime) {
+        this.clientLastSyncTime = clientLastSyncTime;
+    }
+
+    public Long getFinishTime() {
+        return finishTime;
+    }
+
+    public void setFinishTime(Long finishTime) {
+        this.finishTime = finishTime;
+    }
+
+    public Long getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Long startTime) {
+        this.startTime = startTime;
+    }
+
+    public Long getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Long endTime) {
+        this.endTime = endTime;
+    }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/entity/TOeExamSimulateHistory.java

@@ -34,7 +34,7 @@ public class TOeExamSimulateHistory implements Serializable {
 
     @ApiModelProperty(value = "最近完成时间")
     @TableField(value = "finish_time")
-    private Date finishTime;
+    private Long finishTime;
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -64,11 +64,11 @@ public class TOeExamSimulateHistory implements Serializable {
         this.paperId = paperId;
     }
 
-    public Date getFinishTime() {
+    public Long getFinishTime() {
         return finishTime;
     }
 
-    public void setFinishTime(Date finishTime) {
+    public void setFinishTime(Long finishTime) {
         this.finishTime = finishTime;
     }
 }

+ 20 - 18
themis-business/src/main/java/com/qmth/themis/business/entity/TOeFaceVerifyHistory.java

@@ -49,11 +49,11 @@ public class TOeFaceVerifyHistory implements Serializable {
 
     @ApiModelProperty(value = "创建时间")
     @TableField(value = "create_time", fill = FieldFill.INSERT)
-    private Date createTime;
+    private Long createTime;
 
     @ApiModelProperty(value = "更新时间")
     @TableField(value = "update_time", fill = FieldFill.UPDATE)
-    private Date updateTime;
+    private Long updateTime;
 
     @ApiModelProperty(value = "first:初次开考,recover:恢复开考,process:过程中")
     @TableField(value = "type")
@@ -111,22 +111,6 @@ public class TOeFaceVerifyHistory implements Serializable {
 		this.realness = realness;
 	}
 
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	public Date getUpdateTime() {
-		return updateTime;
-	}
-
-	public void setUpdateTime(Date updateTime) {
-		this.updateTime = updateTime;
-	}
-
 	public ExamTypeEnum getType() {
 		return type;
 	}
@@ -159,5 +143,23 @@ public class TOeFaceVerifyHistory implements Serializable {
 		this.time = time;
 	}
 
+	public static long getSerialVersionUID() {
+		return serialVersionUID;
+	}
+
+	public Long getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Long createTime) {
+		this.createTime = createTime;
+	}
+
+	public Long getUpdateTime() {
+		return updateTime;
+	}
 
+	public void setUpdateTime(Long updateTime) {
+		this.updateTime = updateTime;
+	}
 }

+ 15 - 16
themis-business/src/main/java/com/qmth/themis/business/entity/TOeLivenessVerifyHistory.java

@@ -49,23 +49,15 @@ public class TOeLivenessVerifyHistory implements Serializable {
 
     @ApiModelProperty(value = "开始时间")
     @TableField(value = "start_time")
-    private Date startTime;
+    private Long startTime;
 
     @ApiModelProperty(value = "完成时间")
     @TableField(value = "finish_time")
-    private Date finishTime;
+    private Long finishTime;
 
     @ApiModelProperty(value = "创建时间")
     @TableField(value = "create_time", fill = FieldFill.INSERT)
-    private Date createTime;
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
+    private Long createTime;
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -111,7 +103,6 @@ public class TOeLivenessVerifyHistory implements Serializable {
         this.retry = retry;
     }
 
-
     public VerifyExceptionEnum getException() {
 		return exception;
 	}
@@ -120,19 +111,27 @@ public class TOeLivenessVerifyHistory implements Serializable {
 		this.exception = exception;
 	}
 
-	public Date getStartTime() {
+    public Long getStartTime() {
         return startTime;
     }
 
-    public void setStartTime(Date startTime) {
+    public void setStartTime(Long startTime) {
         this.startTime = startTime;
     }
 
-    public Date getFinishTime() {
+    public Long getFinishTime() {
         return finishTime;
     }
 
-    public void setFinishTime(Date finishTime) {
+    public void setFinishTime(Long finishTime) {
         this.finishTime = finishTime;
     }
+
+    public Long getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Long createTime) {
+        this.createTime = createTime;
+    }
 }

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/service/TBSessionService.java

@@ -19,5 +19,5 @@ public interface TBSessionService extends IService<TBSession> {
      * @param mqTimestamp
      * @return
      */
-    public boolean saveSessionInfo(TBSession tbSession, long mqTimestamp);
+    public boolean saveSessionInfo(TBSession tbSession, Long mqTimestamp);
 }

+ 2 - 12
themis-business/src/main/java/com/qmth/themis/business/service/TOeExamRecordService.java

@@ -63,13 +63,13 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
     void dataUpdateMq(Long recordId, String colName, Object colValue);
 
     /**
-     * 考试记录字段同步
+     * 单字段更新
      *
      * @param recordId
      * @param colName
      * @param colValue
      */
-    void dataUpdate(Long recordId, String colName, Object colValue, Integer isDate);
+    void dataUpdate(Long recordId, String colName, Object colValue);
 
     /**
      * 考试记录字段同步消息发送
@@ -94,16 +94,6 @@ public interface TOeExamRecordService extends IService<TOeExamRecord> {
      */
     void dataInit(Map<String, Object> param);
 
-    /**
-     * 考试记录字段同步消息发送
-     *
-     * @param recordId
-     * @param colName
-     * @param colValue
-     * @param isDate
-     */
-    void dataUpdateMq(Long recordId, String colName, Object colValue, Integer isDate);
-
     /**
      * 查询实时监控台列表
      *

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

@@ -9,7 +9,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
 
-import java.util.Date;
 import java.util.Objects;
 
 /**
@@ -31,15 +30,15 @@ public class TBSessionServiceImpl extends ServiceImpl<TBSessionMapper, TBSession
      * @return
      */
     @Override
-    public boolean saveSessionInfo(TBSession tbSession, long mqTimestamp) {
+    public boolean saveSessionInfo(TBSession tbSession, Long mqTimestamp) {
         TBSession tbSessionDb = this.getById(tbSession.getId());
         if (Objects.isNull(tbSessionDb)) {
             Gson gson = new Gson();
             tbSessionDb = gson.fromJson(gson.toJson(tbSession), TBSession.class);
             this.saveOrUpdate(tbSessionDb);
         } else if (Objects.nonNull(tbSessionDb.getUpdateTime())) {
-            long dbtimestamp = tbSessionDb.getUpdateTime().getTime();
-            if (mqTimestamp > dbtimestamp) {
+            Long dbtimestamp = Objects.nonNull(tbSessionDb.getUpdateTime()) ? tbSessionDb.getUpdateTime() : 0L;
+            if (mqTimestamp.longValue() > dbtimestamp.longValue()) {
                 log.info("mq时间大于db时间,可以更新");
                 tbSessionDb.setSource(tbSession.getSource());
                 tbSessionDb.setPlatform(tbSession.getPlatform());

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

@@ -234,8 +234,8 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
         }
         Date now = new Date();
         if (ExamModeEnum.ANYTIME.equals(exam.getMode())) {
-            Long start = ac.getStartTime().getTime() - (ac.getPrepareSeconds() * 1000);
-            Long end = ac.getFinishTime().getTime();
+            Long start = ac.getStartTime() - (ac.getPrepareSeconds() * 1000);
+            Long end = ac.getFinishTime();
             if (now.getTime() < start) {
                 throw new BusinessException("没有到允许开考的时间");
             }
@@ -243,8 +243,8 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
                 throw new BusinessException("允许开考的时间已结束");
             }
         } else {
-            Long start = ac.getStartTime().getTime() - (ac.getPrepareSeconds() * 1000);
-            Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000);
+            Long start = ac.getStartTime() - (ac.getPrepareSeconds() * 1000);
+            Long end = ac.getStartTime() + (ac.getOpeningSeconds() * 1000);
             if (now.getTime() < start) {
                 throw new BusinessException("没有到允许开考的时间");
             }
@@ -367,8 +367,8 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
         }
         Date now = new Date();
         if (ExamModeEnum.ANYTIME.equals(exam.getMode())) {
-            Long start = ac.getStartTime().getTime();
-            Long end = ac.getFinishTime().getTime();
+            Long start = ac.getStartTime();
+            Long end = ac.getFinishTime();
             if (now.getTime() < start) {
                 throw new BusinessException("没有到允许开考的时间");
             }
@@ -376,8 +376,8 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
                 throw new BusinessException("允许开考的时间已结束");
             }
         } else {
-            Long start = ac.getStartTime().getTime();
-            Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000);
+            Long start = ac.getStartTime();
+            Long end = ac.getStartTime() + (ac.getOpeningSeconds() * 1000);
             if (now.getTime() < start) {
                 throw new BusinessException("没有到允许开考的时间");
             }
@@ -425,13 +425,13 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
         ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
         Integer durationSeconds = Objects.isNull(ExamRecordCacheUtil.getDurationSeconds(recordId)) ? 0 : ExamRecordCacheUtil.getDurationSeconds(recordId);
         //获取断点时间
-        Date lastBreakTime = ExamRecordCacheUtil.getLastBreakTime(recordId);
+        Long lastBreakTime = ExamRecordCacheUtil.getLastBreakTime(recordId);
         //获取剩余断点次数
         Integer alreadyBreakCount = Objects.isNull(ExamRecordCacheUtil.getAlreadyBreakCount(recordId)) ? 0 : ExamRecordCacheUtil.getAlreadyBreakCount(recordId);
         Integer leftBreakResumeCount = ec.getBreakResumeCount() - alreadyBreakCount;
         Integer breakExpireSeconds = Objects.isNull(ec.getBreakExpireSeconds()) ? 0 : ec.getBreakExpireSeconds();
         //如果断点时间大于整体断点时间,则强制交卷
-        if (Objects.nonNull(lastBreakTime) && (System.currentTimeMillis() - lastBreakTime.getTime()) / 1000 > breakExpireSeconds) {
+        if (Objects.nonNull(lastBreakTime) && (System.currentTimeMillis() - lastBreakTime) / 1000 > breakExpireSeconds) {
             teExamService.finish(examStudentCacheBean.getStudentId(), recordId, FinishTypeEnum.AUTO.name(), durationSeconds);
         } else {
             //如果断点次数小于0,也强制交卷
@@ -444,10 +444,10 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
         ret.setPaperDecryptVector(ep.getDecryptVector());
 
         // 更新考试记录缓存
-        Date firstStartTime = new Date();
+        Long firstStartTime = System.currentTimeMillis();
         ExamRecordCacheUtil.setFirstStartTime(recordId, firstStartTime, false);
         ExamRecordCacheUtil.setStatus(recordId, ExamRecordStatusEnum.ANSWERING, false);
-        Date lastStartTime = new Date();
+        Long lastStartTime = System.currentTimeMillis();
         ExamRecordCacheUtil.setLastStartTime(recordId, lastStartTime, false);
         String[] columns = new String[]{ExamRecordFieldEnum.first_start_time.name(), ExamRecordFieldEnum.status.name(), ExamRecordFieldEnum.last_start_time.name()};
         Object[] values = new Object[]{firstStartTime, ExamRecordStatusEnum.ANSWERING, lastStartTime};
@@ -457,20 +457,19 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
 
         //非强制交卷,换算最终交卷时间并生成一次性延时任务
         if (Objects.nonNull(exam.getForceFinish()) && exam.getForceFinish().intValue() == 0) {
-            Date date = ExamRecordCacheUtil.getExamFinalFinishTime(recordId);
+            Long date = ExamRecordCacheUtil.getExamFinalFinishTime(recordId);
             if (Objects.isNull(date)) {
-                Date startTime = ExamRecordCacheUtil.getStartTime(recordId);
+                Long startTime = ExamRecordCacheUtil.getStartTime(recordId);
                 Integer activityMaxDurationSeconds = Objects.nonNull(ac.getMaxDurationSeconds()) ? ac.getMaxDurationSeconds() : null;
                 Integer maxDurationSeconds = Objects.nonNull(exam.getMaxDurationSeconds()) ? exam.getMaxDurationSeconds() : null;
                 Integer finalMaxDurationSeconds = Objects.nonNull(activityMaxDurationSeconds) ? activityMaxDurationSeconds : maxDurationSeconds;
                 Calendar calendar = Calendar.getInstance();
                 if (Objects.nonNull(finalMaxDurationSeconds)) {
-                    calendar.setTime(startTime);
+                    calendar.setTimeInMillis(startTime);
                     calendar.add(Calendar.SECOND, finalMaxDurationSeconds.intValue());
                 }
                 Integer breakResumeCount = exam.getBreakResumeCount();
-                Long l = (calendar.getTime().getTime() / 1000 + (breakResumeCount * breakExpireSeconds) + (breakResumeCount * 180)) * 1000;
-                Date finalFinishTime = new Date(l);
+                Long finalFinishTime = (calendar.getTime().getTime() / 1000 + (breakResumeCount * breakExpireSeconds) + (breakResumeCount * 180)) * 1000;
                 ExamRecordCacheUtil.setExamFinalFinishTime(recordId, finalFinishTime);
                 //新增quartz任务,发送mq消息start
                 Map<String, Object> prop = new HashMap<>();
@@ -723,13 +722,13 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
         ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
         Integer durationSeconds = Objects.isNull(ExamRecordCacheUtil.getDurationSeconds(recordId)) ? 0 : ExamRecordCacheUtil.getDurationSeconds(recordId);
         //获取断点时间
-        Date lastBreakTime = ExamRecordCacheUtil.getLastBreakTime(recordId);
+        Long lastBreakTime = ExamRecordCacheUtil.getLastBreakTime(recordId);
         //获取剩余断点次数
         Integer alreadyBreakCount = Objects.isNull(ExamRecordCacheUtil.getAlreadyBreakCount(recordId)) ? 0 : ExamRecordCacheUtil.getAlreadyBreakCount(recordId);
         Integer leftBreakResumeCount = ec.getBreakResumeCount() - alreadyBreakCount;
         Integer breakExpireSeconds = Objects.isNull(ec.getBreakExpireSeconds()) ? 0 : ec.getBreakExpireSeconds();
         //如果断点时间大于整体断点时间,则强制交卷
-        if (Objects.nonNull(lastBreakTime) && (System.currentTimeMillis() - lastBreakTime.getTime()) / 1000 > breakExpireSeconds) {
+        if (Objects.nonNull(lastBreakTime) && (System.currentTimeMillis() - lastBreakTime) / 1000 > breakExpireSeconds) {
             teExamService.finish(examStudentCacheBean.getStudentId(), recordId, FinishTypeEnum.AUTO.name(), durationSeconds);
         } else {
             //如果断点次数小于0,也强制交卷
@@ -764,8 +763,8 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
             ret.setAudioLeftPlayCount(audioLeftPlayCounts);
         }
 
-        Date lastPrepareTime = new Date();
-        ExamRecordCacheUtil.setLastPrepareTime(recordId, new Date(), false);
+        Long lastPrepareTime = System.currentTimeMillis();
+        ExamRecordCacheUtil.setLastPrepareTime(recordId, lastPrepareTime, false);
         ExamRecordCacheUtil.setStatus(recordId, ExamRecordStatusEnum.RESUME_PREPARE, false);
         String[] columns = new String[]{ExamRecordFieldEnum.last_prepare_time.name(), ExamRecordFieldEnum.status.name()};
         Object[] values = new Object[]{lastPrepareTime, ExamRecordStatusEnum.RESUME_PREPARE};
@@ -881,7 +880,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
         } else {//非实时出分
             ret.setStatus(FinishExamResultEnum.NORMAL);
         }
-        Date finishTime = new Date();
+        Long finishTime = System.currentTimeMillis();
         ExamRecordCacheUtil.setFinishTime(recordId, finishTime, false);
         ExamRecordCacheUtil.setDurationSeconds(recordId, durationSeconds, false);
         ExamRecordCacheUtil.setFinishType(recordId, FinishTypeEnum.valueOf(type), false);
@@ -972,14 +971,12 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
                 throw new BusinessException("未找到考试记录");
             }
             ret.setDurationSeconds(er.getDurationSeconds());
-            ret.setFinishTime(er.getFinishTime().getTime());
+            ret.setFinishTime(er.getFinishTime());
             ret.setFinishType(er.getFinishType());
             ret.setObjectiveScore(er.getObjectiveScore());
         } else {
             ret.setDurationSeconds(ExamRecordCacheUtil.getDurationSeconds(recordId));
-            Date finishTime = ExamRecordCacheUtil.getFinishTime(recordId);
-
-            ret.setFinishTime(finishTime == null ? null : finishTime.getTime());
+            ret.setFinishTime(ExamRecordCacheUtil.getFinishTime(recordId));
             ret.setFinishType(ExamRecordCacheUtil.getFinishType(recordId));
             ret.setObjectiveScore(ExamRecordCacheUtil.getObjectiveScore(recordId));
         }
@@ -1130,12 +1127,12 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
             task.setSummary("处理成功");
             task.setProgress(100.0);
             task.setStatus(TaskStatusEnum.FINISH);
-            task.setFinishTime(new Date());
+            task.setFinishTime(System.currentTimeMillis());
         } catch (Exception e) {
             log.error("重新算分出错 recordId:" + (recordId == null ? "" : recordId), e);
             task.setSummary("处理出错");
             task.setStatus(TaskStatusEnum.FINISH);
-            task.setFinishTime(new Date());
+            task.setFinishTime(System.currentTimeMillis());
         } finally {
             redisUtil.releaseLock(lockKey);
         }

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

@@ -85,7 +85,7 @@ public class TEMobileServiceImpl implements TEMobileService {
         Long redisExpire = Long.parseLong(String.valueOf(expireMap.get("redisExpire")));
         TBSession tbSession = new TBSession(sessionId, String.valueOf(es.getStudentId()),
                 authDto.getRoleCodes().toString(), source, platform.name(), deviceId,
-                ServletUtil.getRequest().getLocalAddr(), token, expire);
+                ServletUtil.getRequest().getLocalAddr(), token, expire.getTime());
         redisUtil.setUserSession(sessionId, tbSession, redisExpire);
         ret.setSessionId(sessionId);
         ret.setTime(System.currentTimeMillis());

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

@@ -126,7 +126,7 @@ public class TIeReportServiceImpl implements TIeReportService {
 		Date now = new Date();
 		for (Long acId : totalMap.keySet()) {
 			ExamActivityCacheBean ac = examActivityService.getExamActivityCacheBean(acId);
-			Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000);
+			Long end = ac.getStartTime() + (ac.getOpeningSeconds() * 1000);
 			if (now.getTime() > end) {// 场次开考时间结束,未开考的都是缺考
 				Long done = doneMap.get(acId);
 				if (done == null) {
@@ -183,7 +183,7 @@ public class TIeReportServiceImpl implements TIeReportService {
 		Date now = new Date();
 		for (Long acid : activityIds) {
 			ExamActivityCacheBean ac = examActivityService.getExamActivityCacheBean(acid);
-			Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000);
+			Long end = ac.getStartTime() + (ac.getOpeningSeconds() * 1000);
 			if (now.getTime() > end) {// 场次开考时间结束,未开考的都是缺考
 				absentActivityIds.add(acid);
 			}
@@ -230,7 +230,7 @@ public class TIeReportServiceImpl implements TIeReportService {
 		List<Long> absentActivityIds = new ArrayList<>();
 		Date now = new Date();
 		for (TEExamActivity ac : acs) {
-			Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000L);
+			Long end = ac.getStartTime() + (ac.getOpeningSeconds() * 1000L);
 			if (now.getTime() > end) {// 场次开考时间结束,未开考的都是缺考
 				absentActivityIds.add(ac.getId());
 			}

+ 13 - 19
themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeExamRecordServiceImpl.java

@@ -131,7 +131,7 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
         er.setExamStudentId(examStudentId);
         er.setPaperId(paperId);
         er.setSerialNumber(serialNumber);
-        er.setFirstPrepareTime(new Date());
+        er.setFirstPrepareTime(System.currentTimeMillis());
         er.setStatus(ExamRecordStatusEnum.FIRST_PREPARE);
         er.setObjectiveScore(0.0);
         er.setMonitorKey(String.valueOf(redisUtil.getRedisSequence()));
@@ -381,32 +381,26 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
 
     @Override
     public void dataUpdateMq(Long recordId, String colName, Object colValue) {
-        dataUpdateMq(recordId, colName, colValue, 0);
-    }
-
-    @Override
-    @Transactional
-    public void dataUpdateMq(Long recordId, String colName, Object colValue, Integer isDate) {
         Map<String, Object> transMap = new HashMap<String, Object>();
         transMap.put("recordId", recordId);
         transMap.put("colName", colName);
         transMap.put("colValue", colValue);
-        transMap.put("isDate", isDate);
         //mq发送消息start
         MqDto mqDto = new MqDto(MqTopicEnum.THEMIS_TOPIC.getCode(), MqTagEnum.EXAM_RECORD_UPDATE.name(), transMap, MqTagEnum.EXAM_RECORD_UPDATE, recordId.toString(), colName);
         mqDtoService.assembleSendOneWayMsg(mqDto);
     }
 
+    /**
+     * 单字段更新
+     *
+     * @param recordId
+     * @param colName
+     * @param colValue
+     */
     @Transactional
     @Override
-    public void dataUpdate(Long recordId, String colName, Object colValue, Integer isDate) {
-        if (isDate != null && isDate.intValue() == 1) {
-            Long l = (Long) colValue;
-            Date d = new Date(l);
-            tOeExamRecordMapper.dataUpdate(recordId, colName, d);
-        } else {
-            tOeExamRecordMapper.dataUpdate(recordId, colName, colValue);
-        }
+    public void dataUpdate(Long recordId, String colName, Object colValue) {
+        tOeExamRecordMapper.dataUpdate(recordId, colName, colValue);
     }
 
     /**
@@ -447,12 +441,12 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
         tr.setExamStudentId((Long) param.get("examStudentId"));
         tr.setPaperId((Long) param.get("paperId"));
         tr.setSerialNumber((Integer) param.get("serialNumber"));
-        tr.setFirstPrepareTime(new Date((Long) param.get("firstPrepareTime")));
+        tr.setFirstPrepareTime((Long) param.get("firstPrepareTime"));
         tr.setStatus(ExamRecordStatusEnum.valueOf((String) param.get("status")));
         tr.setObjectiveScore(0.0);
         tr.setAlreadyBreakCount(0);
-        tr.setStartTime(new Date((Long) param.get("startTime")));
-        tr.setEndTime(new Date((Long) param.get("endTime")));
+        tr.setStartTime((Long) param.get("startTime"));
+        tr.setEndTime((Long) param.get("endTime"));
         tr.setOpeningSeconds((Integer) param.get("openingSeconds"));
         tr.setMinDurationSeconds((Integer) param.get("minDurationSeconds"));
         tr.setMaxDurationSeconds((Integer) param.get("maxDurationSeconds"));

+ 48 - 58
themis-business/src/main/java/com/qmth/themis/business/service/impl/TOeLivenessVerifyHistoryServiceImpl.java

@@ -1,12 +1,5 @@
 package com.qmth.themis.business.service.impl;
 
-import java.util.Date;
-
-import javax.annotation.Resource;
-
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.themis.business.bean.exam.LivenessVerifyBean;
 import com.qmth.themis.business.cache.LivenessVerifyCacheUtil;
@@ -18,8 +11,11 @@ import com.qmth.themis.business.enums.VerifyExceptionEnum;
 import com.qmth.themis.business.service.TOeExamBreakHistoryService;
 import com.qmth.themis.business.service.TOeExamRecordService;
 import com.qmth.themis.business.service.TOeLivenessVerifyHistoryService;
-import com.qmth.themis.business.util.RedisUtil;
 import com.qmth.themis.common.contanst.Constants;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
 
 /**
  * @Description: 活体验证记录 服务实现类
@@ -31,55 +27,49 @@ import com.qmth.themis.common.contanst.Constants;
 @Service
 public class TOeLivenessVerifyHistoryServiceImpl extends ServiceImpl<TOeLivenessVerifyHistoryMapper, TOeLivenessVerifyHistory> implements TOeLivenessVerifyHistoryService {
 
-	@Resource
-	RedisUtil redisUtil;
-	
-	@Resource
-	TOeExamBreakHistoryService examBreakHistoryService;
-	
-	@Resource
-	TOeExamRecordService examRecordService;
-	
-	@Override
-	public LivenessVerifyBean verify(Long recordId, String type, String actions, Integer retry, Long startTime,
-			Long finishTime, String exception) {
-		LivenessVerifyCacheBean cache=new LivenessVerifyCacheBean();
-		cache.setId(Constants.idGen.next());
-		cache.setExamRecordId(recordId);
-		cache.setType(LivenessTypeEnum.valueOf(type));
-		cache.setActions(actions);
-		cache.setRetry(retry);
-		cache.setStartTime(new Date(startTime));
-		cache.setFinishTime(new Date(finishTime));
-		cache.setException(VerifyExceptionEnum.valueOf(exception));
-		LivenessVerifyCacheUtil.setLivenessVerifyCacheBean(recordId,cache.getId(), cache);
-		LivenessVerifyBean ret=new LivenessVerifyBean();
-		ret.setId(cache.getId());
-		ret.setUpdateTime(System.currentTimeMillis());
-		if(LivenessTypeEnum.RESUME_START.equals(cache.getType())) {
-			examBreakHistoryService.saveAuthenticationResult(recordId, cache.getId(), cache.getException());
-		}else  {
-			examRecordService.saveLivenessVerify(cache.getType(),recordId, cache.getId(), cache.getException());
-		}
-		return ret;
-	}
-	
-	
-	@Transactional
-	@Override
-	public void save(Long id,Long recordId, String type, String actions, Integer retry, Long startTime,
-			Long finishTime, String exception) {
-		TOeLivenessVerifyHistory entity=new TOeLivenessVerifyHistory();
-		entity.setId(id);
-		entity.setExamRecordId(recordId);
-		entity.setType(LivenessTypeEnum.valueOf(type));
-		entity.setActions(actions);
-		entity.setRetry(retry);
-		entity.setStartTime(new Date(startTime));
-		entity.setFinishTime(new Date(finishTime));
-		entity.setException(VerifyExceptionEnum.valueOf(exception));
-		saveOrUpdate(entity);
-	}
-	
+    @Resource
+    TOeExamBreakHistoryService examBreakHistoryService;
+
+    @Resource
+    TOeExamRecordService examRecordService;
+
+    @Override
+    public LivenessVerifyBean verify(Long recordId, String type, String actions, Integer retry, Long startTime,
+                                     Long finishTime, String exception) {
+        LivenessVerifyCacheBean cache = new LivenessVerifyCacheBean();
+        cache.setId(Constants.idGen.next());
+        cache.setExamRecordId(recordId);
+        cache.setType(LivenessTypeEnum.valueOf(type));
+        cache.setActions(actions);
+        cache.setRetry(retry);
+        cache.setStartTime(startTime);
+        cache.setFinishTime(finishTime);
+        cache.setException(VerifyExceptionEnum.valueOf(exception));
+        LivenessVerifyCacheUtil.setLivenessVerifyCacheBean(recordId, cache.getId(), cache);
+        LivenessVerifyBean ret = new LivenessVerifyBean();
+        ret.setId(cache.getId());
+        ret.setUpdateTime(System.currentTimeMillis());
+        if (LivenessTypeEnum.RESUME_START.equals(cache.getType())) {
+            examBreakHistoryService.saveAuthenticationResult(recordId, cache.getId(), cache.getException());
+        } else {
+            examRecordService.saveLivenessVerify(cache.getType(), recordId, cache.getId(), cache.getException());
+        }
+        return ret;
+    }
 
+    @Transactional
+    @Override
+    public void save(Long id, Long recordId, String type, String actions, Integer retry, Long startTime,
+                     Long finishTime, String exception) {
+        TOeLivenessVerifyHistory entity = new TOeLivenessVerifyHistory();
+        entity.setId(id);
+        entity.setExamRecordId(recordId);
+        entity.setType(LivenessTypeEnum.valueOf(type));
+        entity.setActions(actions);
+        entity.setRetry(retry);
+        entity.setStartTime(startTime);
+        entity.setFinishTime(finishTime);
+        entity.setException(VerifyExceptionEnum.valueOf(exception));
+        saveOrUpdate(entity);
+    }
 }

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskExamPaperImportTemplete.java

@@ -97,7 +97,7 @@ public class TaskExamPaperImportTemplete implements TaskImportTemplete {
 			addResult(result, DateUtil.format(new Date(), timeFormat) + "处理结束");
 			long end = System.currentTimeMillis();
 			addResult(result, "耗时(秒):" + ((end - start) / 1000));
-			taskImportCommon.getTbTaskHistory().setFinishTime(new Date());
+			taskImportCommon.getTbTaskHistory().setFinishTime(System.currentTimeMillis());
 			taskImportCommon.getTbTaskHistory().setStatus(TaskStatusEnum.FINISH);
 			taskImportCommon.getTbTaskHistory().setProgress(100.0d);
 			taskImportCommon.writeImportResultTxt(result.toString(), file);

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskExamStudentImportTemplete.java

@@ -91,7 +91,7 @@ public class TaskExamStudentImportTemplete implements TaskImportTemplete {
                 if (excelErrorList.size() > 0) {
                     taskImportCommon.getTxtList().add(DateUtil.format(new Date(), timeFormat) + "->数据校验异常:" + JSONObject.toJSONString(excelErrorList));
                     taskImportCommon.setException(true);
-                    taskImportCommon.getTbTaskHistory().setFinishTime(new Date());
+                    taskImportCommon.getTbTaskHistory().setFinishTime(System.currentTimeMillis());
                     taskImportCommon.getTbTaskHistory().setProgress(0d);
                     taskImportCommon.getTbTaskHistory().setStatus(TaskStatusEnum.FINISH);
                     taskImportCommon.getTbTaskHistory().setSummary(taskImportCommon.getTxtList().toString());

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskRoomCodeImportTemplete.java

@@ -73,7 +73,7 @@ public class TaskRoomCodeImportTemplete implements TaskImportTemplete {
                 if (excelErrorList.size() > 0) {
                     taskImportCommon.getTxtList().add(DateUtil.format(new Date(), timeFormat) + "->数据校验异常:" + JSONObject.toJSONString(excelErrorList));
                     taskImportCommon.setException(true);
-                    taskImportCommon.getTbTaskHistory().setFinishTime(new Date());
+                    taskImportCommon.getTbTaskHistory().setFinishTime(System.currentTimeMillis());
                     taskImportCommon.getTbTaskHistory().setProgress(0d);
                     taskImportCommon.getTbTaskHistory().setStatus(TaskStatusEnum.FINISH);
                     taskImportCommon.getTbTaskHistory().setSummary(taskImportCommon.getTxtList().toString());

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

@@ -4,7 +4,6 @@ import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.google.gson.Gson;
-import com.qmth.themis.business.config.SystemConfig;
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.dto.ExamStudentImportDto;
 import com.qmth.themis.business.dto.RoomCodeImportDto;
@@ -14,7 +13,6 @@ import com.qmth.themis.business.enums.RoleEnum;
 import com.qmth.themis.business.enums.TaskStatusEnum;
 import com.qmth.themis.business.service.*;
 import com.qmth.themis.business.templete.service.TempleteLogicService;
-import com.qmth.themis.business.util.OssUtil;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.LinkedMultiValueMap;
@@ -35,15 +33,6 @@ import java.util.stream.Collectors;
 @Service
 public class TempleteLogicServiceImpl implements TempleteLogicService {
 
-    @Resource
-    TBTaskHistoryService tbTaskHistoryService;
-
-    @Resource
-    SystemConfig systemConfig;
-
-    @Resource
-    OssUtil ossUtil;
-
     @Resource
     TEExamStudentService teExamStudentService;
 
@@ -89,7 +78,6 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
         Set<String> courseCodeSet = courseCodeMap.keySet().stream().collect(Collectors.toSet());
         teExamCourseQueryWrapper.lambda().in(TEExamCourse::getCourseCode, courseCodeSet).eq(TEExamCourse::getExamId, examId);
         List<TEExamCourse> teExamCourseList = teExamCourseService.list(teExamCourseQueryWrapper);
-        Integer examCount = Integer.parseInt(String.valueOf(map.get("examCount")));
         if (Objects.nonNull(teExamCourseList) && teExamCourseList.size() > 0) {
             teExamCourseList.forEach(s -> {
                 courseCodeMap.remove(s.getCourseCode());
@@ -237,10 +225,6 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
         if (Objects.nonNull(map.get("orgId"))) {
             orgId = Long.parseLong(String.valueOf(map.get("orgId")));
         }
-        Long examId = null;
-        if (Objects.nonNull(map.get("examId"))) {
-            examId = Long.parseLong(String.valueOf(map.get("examId")));
-        }
         Long createId = Long.parseLong(String.valueOf(map.get("createId")));
         List<String> txtList = (List<String>) map.get("txtList");
         TBTaskHistory tbTaskHistory = (TBTaskHistory) map.get("tbTaskHistory");
@@ -349,7 +333,7 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
         if (progress.intValue() == 100) {
             tbTaskHistory.setStatus(TaskStatusEnum.FINISH);
             tbTaskHistory.setSummary("共处理了" + size + "条数据");
-            tbTaskHistory.setFinishTime(new Date());
+            tbTaskHistory.setFinishTime(System.currentTimeMillis());
             txtList.add(DateUtil.format(new Date(), timeFormat) + "->数据处理完毕," + tbTaskHistory.getSummary());
         } else {
             tbTaskHistory.setStatus(TaskStatusEnum.RUNNING);
@@ -357,7 +341,6 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
             txtList.add(DateUtil.format(new Date(), timeFormat) + "->数据处理中," + tbTaskHistory.getSummary());
         }
         tbTaskHistory.setProgress(progress.doubleValue());
-//        tbTaskHistoryService.updateById(tbTaskHistory);
         return txtList;
     }
 
@@ -378,7 +361,7 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
         if (progress.intValue() == 100) {
             tbTaskHistory.setStatus(TaskStatusEnum.FINISH);
             tbTaskHistory.setSummary("共导出了" + size + "条数据");
-            tbTaskHistory.setFinishTime(new Date());
+            tbTaskHistory.setFinishTime(System.currentTimeMillis());
             txtList.add(DateUtil.format(new Date(), timeFormat) + "->数据导出完毕," + tbTaskHistory.getSummary());
         } else {
             tbTaskHistory.setStatus(TaskStatusEnum.RUNNING);
@@ -386,7 +369,6 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
             txtList.add(DateUtil.format(new Date(), timeFormat) + "->数据导出中," + tbTaskHistory.getSummary());
         }
         tbTaskHistory.setProgress(progress.doubleValue());
-//        tbTaskHistoryService.updateById(tbTaskHistory);
         return txtList;
     }
 }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 267 - 372
themis-business/src/main/resources/db/init.sql


+ 8 - 8
themis-business/src/main/resources/mapper/TEExamActivityMapper.xml

@@ -25,10 +25,10 @@
           `max_duration_seconds` int DEFAULT NULL COMMENT '最大考试时长',
           `enable` tinyint DEFAULT '1' COMMENT '是否启用',
           `opening_seconds` int DEFAULT NULL COMMENT '允许开考时长(秒)',
-          `start_time` datetime DEFAULT NULL COMMENT '开考时间',
-          `finish_time` datetime DEFAULT NULL COMMENT '结束时间',
-          `create_time` datetime DEFAULT NULL COMMENT '创建时间',
-          `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+          `start_time` bigint DEFAULT NULL COMMENT '开考时间',
+          `finish_time` bigint DEFAULT NULL COMMENT '结束时间',
+          `create_time` bigint DEFAULT NULL COMMENT '创建时间',
+          `update_time` bigint DEFAULT NULL COMMENT '更新时间',
           `create_id` bigint DEFAULT NULL COMMENT '创建人id',
           `update_id` bigint DEFAULT NULL COMMENT '更新人id',
           PRIMARY KEY (`id`),
@@ -120,10 +120,10 @@
             tees.course_name as courseName,
             IFNULL(teea.opening_seconds,tee.opening_seconds) as openingSeconds,
             teea.opening_seconds as activityOpeningSeconds,
-            UNIX_TIMESTAMP(date_sub(teea.start_time, interval IFNULL(teea.prepare_seconds, tee.prepare_seconds) second)) * 1000 as prepareTime,
-            UNIX_TIMESTAMP(IFNULL(teea.start_time, tee.start_time)) * 1000 as minStartTime,
-            UNIX_TIMESTAMP(date_add(teea.start_time, interval IFNULL(teea.opening_seconds, tee.opening_seconds) second)) * 1000 as maxStartTime,
-            IF(tee.mode = 'TOGETHER' and tee.force_finish = 1, UNIX_TIMESTAMP(IFNULL(teea.finish_time , tee.end_time)) * 1000, null) as maxFinishTime,
+            date_sub(teea.start_time, interval IFNULL(teea.prepare_seconds, tee.prepare_seconds) second) as prepareTime,
+            IFNULL(teea.start_time, tee.start_time) as minStartTime,
+            date_add(teea.start_time, interval IFNULL(teea.opening_seconds, tee.opening_seconds) second) as maxStartTime,
+            IF(tee.mode = 'TOGETHER' and tee.force_finish = 1, IFNULL(teea.finish_time , tee.end_time), null) as maxFinishTime,
             tee.monitor_video_source as monitorVideoSourceStr,
             IFNULL(teea.prepare_seconds,tee.prepare_seconds) as prepareSeconds,
             teea.prepare_seconds as activityPrepareSeconds,

+ 1 - 1
themis-business/src/main/resources/mapper/TEExamBreachLogMapper.xml

@@ -81,7 +81,7 @@
 		(case when f.status=0 then '违纪处理' else '撤销违纪'
 		end)status,
 		t.name createName,
-		UNIX_TIMESTAMP(f.update_time) * 1000
+		f.update_time
 		endTime,
 		f.type type,
 		f.remark remark

+ 0 - 16
themis-business/src/main/resources/mapper/TEExamCourseMapper.xml

@@ -67,25 +67,9 @@
 		) t order by t.courseCode
 	</select>
 
-	<select id="findByCode"
-		resultType="com.qmth.themis.business.entity.TEExamCourse">
-		select * from t_e_exam_course teec
-		<where>
-			1=1
-			<if test="courseCode != null and courseCode != ''">
-				and teec.course_code =#{courseCode}
-			</if>
-			<if test="courseCode == null or courseCode == ''">
-				1=2
-			</if>
-		</where>
-	</select>
-
 	<select id="findByExamIdAndCourseCode"
 		resultType="com.qmth.themis.business.entity.TEExamCourse">
 		select * from t_e_exam_course t
 		where t.exam_id=#{examId} and t.course_code =#{courseCode}
 	</select>
-
-
 </mapper>

+ 4 - 4
themis-business/src/main/resources/mapper/TEExamMapper.xml

@@ -8,8 +8,8 @@
         from
         t_e_exam t
         <where>
-            and t.start_time <![CDATA[ <= ]]> now()
-            and t.end_time <![CDATA[ >= ]]> now()
+            and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
+            and t.end_time <![CDATA[ >= ]]> unix_timestamp(current_timestamp()) * 1000
             and t.enable = 1
             <if test="orgId != null and orgId != ''">
                 and t.org_id = #{orgId}
@@ -70,8 +70,8 @@
         from t_e_exam t
         <where> 1 = 1
             <if test="userId != null and userId != ''">
-                and t.start_time <![CDATA[ <= ]]> now()
-                and t.end_time <![CDATA[ >= ]]> now()
+                and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
+                and t.end_time <![CDATA[ >= ]]> unix_timestamp(current_timestamp()) * 1000
                 and t.enable = 1
                 and EXISTS(
                 select

+ 1 - 1
themis-business/src/main/resources/mapper/TEExamStudentLogMapper.xml

@@ -5,7 +5,7 @@
 	<select id="getExamStudentLogList"
 		resultType="com.qmth.themis.business.bean.backend.ExamStudentLogDetailListBean">
 		SELECT
-		UNIX_TIMESTAMP(f.create_time) * 1000
+		f.create_time
 		createTime,
 		f.type type,
 		f.info remark

+ 2 - 2
themis-business/src/main/resources/mapper/TIeInvigilateExceptionInfoMapper.xml

@@ -46,8 +46,8 @@
 	<select id="getExamExceptionDetailList"
 		resultType="com.qmth.themis.business.bean.backend.ExamExceptionDetailListBean">
 		SELECT
-		UNIX_TIMESTAMP(f.create_time) * 1000 startTime,
-		UNIX_TIMESTAMP(f.update_time) * 1000 endTime,
+		f.create_time startTime,
+		f.update_time endTime,
 		f.type reason,
 		timestampdiff(
 		MINUTE,

+ 2 - 2
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -165,7 +165,7 @@
 			and s.enable = 1
 			and tee.enable = 1
 			and teea.enable = 1
-			and teea.finish_time > now()
+			and teea.finish_time > unix_timestamp(current_timestamp()) * 1000
 		</where>
 	</sql>
 
@@ -605,7 +605,7 @@
 			and s.enable = 1
 			and tee.enable = 1
 			and teea.enable = 1
-			and teea.finish_time > now()
+			and teea.finish_time > unix_timestamp(current_timestamp()) * 1000
 			and t.client_websocket_status = 'OFF_LINE'
 		</where> ) t
 		group by

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

@@ -52,7 +52,7 @@ public class SysController {
                 OrgInfoBean orgInfo = new OrgInfoBean();
                 orgInfo.setLogo(org.getLogo());
                 orgInfo.setName(org.getName());
-                orgInfo.setUpdateTime((org.getUpdateTime() == null ? null : org.getUpdateTime().getTime()));
+                orgInfo.setUpdateTime((org.getUpdateTime() == null ? null : org.getUpdateTime()));
                 env.setOrgInfo(orgInfo);
             }
         }

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

@@ -189,7 +189,7 @@ public class TEStudentController {
         Map<String, Object> expireMap = SystemConstant.getExpireTime(platform);
         Date expire = (Date) expireMap.get("date");
         Long redisExpire = Long.parseLong(String.valueOf(expireMap.get("redisExpire")));
-        TBSession tbSession = new TBSession(sessionId, String.valueOf(teStudent.getId()), authDto.getRoleCodes().toString(), source, platform.name(), deviceId, ServletUtil.getRequest().getLocalAddr(), token, expire);
+        TBSession tbSession = new TBSession(sessionId, String.valueOf(teStudent.getId()), authDto.getRoleCodes().toString(), source, platform.name(), deviceId, ServletUtil.getRequest().getLocalAddr(), token, expire.getTime());
         redisUtil.setUserSession(sessionId, tbSession, redisExpire);
         //mq发送消息start
         MqDto mqDto = new MqDto(MqTopicEnum.THEMIS_TOPIC.getCode(), platform.name(), tbSession, MqTagEnum.valueOf(platform.name()), tbSession.getId(), teStudent.getIdentity());
@@ -224,13 +224,13 @@ public class TEStudentController {
             ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
 
             //获取断点时间
-            Date lastBreakTime = ExamRecordCacheUtil.getLastBreakTime(recordId);
+            Long lastBreakTime = ExamRecordCacheUtil.getLastBreakTime(recordId);
             //获取剩余断点次数
             Integer alreadyBreakCount = Objects.isNull(ExamRecordCacheUtil.getAlreadyBreakCount(recordId)) ? 0 : ExamRecordCacheUtil.getAlreadyBreakCount(recordId);
             Integer leftBreakResumeCount = ec.getBreakResumeCount() - alreadyBreakCount;
             //如果断点时间大于整体断点时间,则强制交卷
             if (Objects.equals(status, ExamRecordStatusEnum.ANSWERING) || Objects.equals(status, ExamRecordStatusEnum.BREAK_OFF) || Objects.equals(status, ExamRecordStatusEnum.RESUME_PREPARE)) {
-                if (Objects.nonNull(lastBreakTime) && (System.currentTimeMillis() - lastBreakTime.getTime()) / 1000 > breakExpireSeconds) {
+                if (Objects.nonNull(lastBreakTime) && (System.currentTimeMillis() - lastBreakTime) / 1000 > breakExpireSeconds) {
                     teExamService.finish(teStudentCacheDto.getId(), recordId, FinishTypeEnum.AUTO.name(), durationSeconds);
                     List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), examId, orgId);
                     if (Objects.nonNull(list) && list.size() > 0) {
@@ -251,10 +251,10 @@ public class TEStudentController {
                             Long breakId = Constants.idGen.next();
                             ExamRecordCacheUtil.setLastBreakId(recordId, breakId, false);
                             ExamRecordCacheUtil.setStatus(recordId, ExamRecordStatusEnum.BREAK_OFF, false);
-                            Date lastBreakTimeNow = new Date();
+                            Long lastBreakTimeNow = System.currentTimeMillis();
                             ExamRecordCacheUtil.setLastBreakTime(recordId, lastBreakTimeNow, false);
                             ExamRecordCacheUtil.setAlreadyBreakCount(recordId, alreadyBreakCount, false);
-                            Date lastStartTime = new Date();
+                            Long lastStartTime = System.currentTimeMillis();
                             ExamRecordCacheUtil.setLastStartTime(recordId, lastStartTime, false);
                             String[] columns = new String[]{ExamRecordFieldEnum.last_break_id.name(), ExamRecordFieldEnum.status.name(), ExamRecordFieldEnum.last_break_time.name(), ExamRecordFieldEnum.already_break_count.name(), ExamRecordFieldEnum.last_start_time.name()};
                             Object[] values = new Object[]{breakId, ExamRecordStatusEnum.BREAK_OFF, lastBreakTimeNow, alreadyBreakCount, lastStartTime};

+ 2 - 2
themis-exam/src/main/java/com/qmth/themis/exam/config/ExamConstant.java

@@ -116,10 +116,10 @@ public class ExamConstant {
             Long breakId = Constants.idGen.next();
             ExamRecordCacheUtil.setLastBreakId(recordId, breakId, false);
             ExamRecordCacheUtil.setStatus(recordId, ExamRecordStatusEnum.BREAK_OFF, false);
-            Date lastBreakTimeNow = new Date();
+            Long lastBreakTimeNow = System.currentTimeMillis();
             ExamRecordCacheUtil.setLastBreakTime(recordId, lastBreakTimeNow, false);
             ExamRecordCacheUtil.setAlreadyBreakCount(recordId, alreadyBreakCount, false);
-            Date lastStartTime = new Date();
+            Long lastStartTime = System.currentTimeMillis();
             ExamRecordCacheUtil.setLastStartTime(recordId, lastStartTime, false);
             String[] columns = new String[]{ExamRecordFieldEnum.last_break_id.name(), ExamRecordFieldEnum.status.name(), ExamRecordFieldEnum.last_break_time.name(), ExamRecordFieldEnum.already_break_count.name(), ExamRecordFieldEnum.last_start_time.name()};
             Object[] values = new Object[]{breakId, ExamRecordStatusEnum.BREAK_OFF, lastBreakTimeNow, alreadyBreakCount, lastStartTime};

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

@@ -24,7 +24,6 @@ import org.springframework.web.servlet.ModelAndView;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.Date;
 import java.util.List;
 import java.util.Objects;
 import java.util.Set;
@@ -78,12 +77,12 @@ public class AuthInterceptor implements HandlerInterceptor {
             if (Objects.isNull(tbSession)) {
                 throw new BusinessException(ExceptionResultEnum.LOGIN_NO);
             } else {
-                if (info.validate(tbSession.getAccessToken()) && info.getTimestamp() < tbSession.getExpireTime().getTime()
+                if (info.validate(tbSession.getAccessToken()) && info.getTimestamp() < tbSession.getExpireTime()
                         && platform.name().equalsIgnoreCase(tbSession.getPlatform()) && Objects.equals(deviceId, tbSession.getDeviceId())) {
                     userId = Long.parseLong(tbSession.getIdentity());
-                    Date expireTime = tbSession.getExpireTime();
+                    Long expireTime = tbSession.getExpireTime();
                     //手机端的token时长为一个月,所以会出现缓存没有的情况
-                    if (expireTime.getTime() <= System.currentTimeMillis()) {//先判断时间是否过期
+                    if (expireTime <= System.currentTimeMillis()) {//先判断时间是否过期
                         throw new BusinessException(ExceptionResultEnum.LOGIN_NO);
                     }
                     TEStudentCacheDto teStudentCacheDto = (TEStudentCacheDto) redisUtil.getStudent(userId);

+ 1 - 1
themis-exam/src/main/java/com/qmth/themis/exam/websocket/WebSocketMobileServer.java

@@ -99,7 +99,7 @@ public class WebSocketMobileServer implements Concurrently {
             if (Objects.isNull(tbSession)) {
                 throw new BusinessException(ExceptionResultEnum.LOGIN_NO);
             } else {
-                if (info.validate(tbSession.getAccessToken()) && info.getTimestamp() < tbSession.getExpireTime().getTime()
+                if (info.validate(tbSession.getAccessToken()) && info.getTimestamp() < tbSession.getExpireTime()
                         && platform.equalsIgnoreCase(tbSession.getPlatform()) && Objects.equals(deviceId, tbSession.getDeviceId())) {
                     this.session = session;
                     session.setMaxIdleTimeout(SystemConstant.WEBSOCKET_MAX_TIME_OUT);

+ 2 - 2
themis-exam/src/main/java/com/qmth/themis/exam/websocket/WebSocketOeServer.java

@@ -101,7 +101,7 @@ public class WebSocketOeServer implements Concurrently {
             if (Objects.isNull(tbSession)) {
                 throw new BusinessException(ExceptionResultEnum.LOGIN_NO);
             } else {
-                if (info.validate(tbSession.getAccessToken()) && info.getTimestamp() < tbSession.getExpireTime().getTime()
+                if (info.validate(tbSession.getAccessToken()) && info.getTimestamp() < tbSession.getExpireTime()
                         && platform.equalsIgnoreCase(tbSession.getPlatform()) && Objects.equals(deviceId, tbSession.getDeviceId())) {
                     this.session = session;
                     session.setMaxIdleTimeout(SystemConstant.WEBSOCKET_MAX_TIME_OUT);
@@ -121,7 +121,7 @@ public class WebSocketOeServer implements Concurrently {
                     ExamRecordCacheUtil.setClientWebsocketStatus(recordId, WebsocketStatusEnum.ON_LINE, false);
                     ExamRecordCacheUtil.setClientCurrentIp(recordId, this.ip, false);
                     ExamRecordCacheUtil.setClientWebsocketId(recordId, this.session.getId(), false);
-                    Date clientLastSyncTime = new Date();
+                    Long clientLastSyncTime = System.currentTimeMillis();
                     ExamRecordCacheUtil.setClientLastSyncTime(recordId, clientLastSyncTime, false);
                     String[] columns = new String[]{ExamRecordFieldEnum.client_websocket_status.name(), ExamRecordFieldEnum.client_current_ip.name(), ExamRecordFieldEnum.client_websocket_id.name(), ExamRecordFieldEnum.client_last_sync_time.name()};
                     Object[] values = new Object[]{WebsocketStatusEnum.ON_LINE, this.ip, this.session.getId(), clientLastSyncTime};

+ 1 - 1
themis-exam/src/main/java/com/qmth/themis/exam/websocketTemplete/WebSocketOeMessageTemplete.java

@@ -86,7 +86,7 @@ public class WebSocketOeMessageTemplete {
         }
         ExamRecordCacheUtil.setAnswerProgress(recordId, progress, false);
         ExamRecordCacheUtil.setDurationSeconds(recordId, durationSeconds, false);
-        Date clientLastSyncTime = new Date();
+        Long clientLastSyncTime = System.currentTimeMillis();
         ExamRecordCacheUtil.setClientLastSyncTime(recordId, clientLastSyncTime, false);
         String[] columns = new String[]{ExamRecordFieldEnum.answer_progress.name(), ExamRecordFieldEnum.duration_seconds.name(), ExamRecordFieldEnum.client_last_sync_time.name()};
         Object[] values = new Object[]{progress, durationSeconds, clientLastSyncTime};

+ 10 - 22
themis-mq/src/main/java/com/qmth/themis/mq/service/impl/MqLogicServiceImpl.java

@@ -39,7 +39,6 @@ import org.springframework.transaction.annotation.Transactional;
 import javax.annotation.Resource;
 import java.io.IOException;
 import java.lang.reflect.Method;
-import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -235,7 +234,7 @@ public class MqLogicServiceImpl implements MqLogicService {
         mqDto.setAck(SystemConstant.STANDARD_ACK_TYPE);//表示成功处理
         Map<String, Object> tranMap = mqDto.getProperties();
         Long recordId = Long.parseLong(String.valueOf(tranMap.get("recordId")));
-        Date clientLastSyncTime = ExamRecordCacheUtil.getClientLastSyncTime(recordId);
+        Long clientLastSyncTime = ExamRecordCacheUtil.getClientLastSyncTime(recordId);
         ExamRecordStatusEnum status = ExamRecordCacheUtil.getStatus(recordId);
         WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(recordId);
         if (Objects.nonNull(websocketStatusEnum) && !Objects.equals(websocketStatusEnum, WebsocketStatusEnum.ON_LINE) && (!Objects.equals(status, ExamRecordStatusEnum.FIRST_PREPARE) || !Objects.equals(status, ExamRecordStatusEnum.FINISHED) || !Objects.equals(status, ExamRecordStatusEnum.PERSISTED))) {
@@ -243,7 +242,7 @@ public class MqLogicServiceImpl implements MqLogicService {
             if (Objects.nonNull(objectMap)) {
                 Integer diff = 0;
                 if (Objects.nonNull(clientLastSyncTime)) {//大于等于当前时间,说明未重连或重登录
-                    Long l = (System.currentTimeMillis() - clientLastSyncTime.getTime()) / 1000;
+                    Long l = (System.currentTimeMillis() - clientLastSyncTime) / 1000;
                     diff = l.intValue();
                 }
                 Long examId = ExamRecordCacheUtil.getExamId(recordId);
@@ -263,10 +262,10 @@ public class MqLogicServiceImpl implements MqLogicService {
                     breakId = Constants.idGen.next();
                     ExamRecordCacheUtil.setLastBreakId(recordId, breakId, false);
                     ExamRecordCacheUtil.setStatus(recordId, ExamRecordStatusEnum.BREAK_OFF, false);
-                    Date lastBreakTime = new Date();
+                    Long lastBreakTime = System.currentTimeMillis();
                     ExamRecordCacheUtil.setLastBreakTime(recordId, lastBreakTime, false);
                     ExamRecordCacheUtil.setAlreadyBreakCount(recordId, alreadyBreakCount, false);
-                    Date lastStartTime = new Date();
+                    Long lastStartTime = System.currentTimeMillis();
                     ExamRecordCacheUtil.setLastStartTime(recordId, lastStartTime, false);
                     String[] columns = new String[]{ExamRecordFieldEnum.last_break_id.name(), ExamRecordFieldEnum.status.name(), ExamRecordFieldEnum.last_break_time.name(), ExamRecordFieldEnum.already_break_count.name(), ExamRecordFieldEnum.last_start_time.name()};
                     Object[] values = new Object[]{breakId, ExamRecordStatusEnum.BREAK_OFF, lastBreakTime, alreadyBreakCount, lastStartTime};
@@ -436,8 +435,7 @@ public class MqLogicServiceImpl implements MqLogicService {
             Long recordId = (Long) param.get("recordId");
             String colName = (String) param.get("colName");
             Object colValue = param.get("colValue");
-            Integer isDate = (Integer) param.get("isDate");
-            examRecordService.dataUpdate(recordId, colName, colValue, isDate);
+            examRecordService.dataUpdate(recordId, colName, colValue);
         } else if (Objects.equals(tag, MqTagEnum.EXAM_RECORD_UPDATE_COLUMNS.name())) {//多字段更新
             Map<String, Object> param = (Map<String, Object>) mqDto.getBody();
             Long recordId = Long.parseLong(String.valueOf(param.get("recordId")));
@@ -447,12 +445,7 @@ public class MqLogicServiceImpl implements MqLogicService {
             for (int i = 0; i < colNames.size(); i++) {
                 String colName = colNames.get(i);
                 Object colValue = colValues.get(i);
-                if (Objects.equals(ExamRecordFieldEnum.finish_time.name(), colName) || Objects.equals(ExamRecordFieldEnum.first_start_time.name(), colName) || Objects.equals(ExamRecordFieldEnum.first_prepare_time.name(), colName) || Objects.equals(ExamRecordFieldEnum.start_time.name(), colName) || Objects.equals(ExamRecordFieldEnum.end_time.name(), colName) || Objects.equals(ExamRecordFieldEnum.client_last_sync_time.name(), colName) || Objects.equals(ExamRecordFieldEnum.last_break_time.name(), colName) || Objects.equals(ExamRecordFieldEnum.last_start_time.name(), colName) || Objects.equals(ExamRecordFieldEnum.last_prepare_time.name(), colName)) {
-                    Date date = new Date((Long) colValue);
-                    tOeExamRecordUpdateWrapper.set(colName, date);
-                } else {
-                    tOeExamRecordUpdateWrapper.set(colName, colValue);
-                }
+                tOeExamRecordUpdateWrapper.set(colName, colValue);
             }
             tOeExamRecordUpdateWrapper.lambda().eq(TOeExamRecord::getId, recordId);
             examRecordService.update(tOeExamRecordUpdateWrapper);
@@ -517,7 +510,7 @@ public class MqLogicServiceImpl implements MqLogicService {
                 tIeExamInvigilateCall.setCallStatus(tIeExamInvigilateCallLog.getCallStatus());
             }
             if (Objects.nonNull(tIeExamInvigilateCall.getUpdateTime())) {
-                long dbtimestamp = tIeExamInvigilateCall.getUpdateTime().getTime();
+                Long dbtimestamp = Objects.nonNull(tIeExamInvigilateCall.getUpdateTime()) ? tIeExamInvigilateCall.getUpdateTime() : 0L;
                 if (mqDto.getTimestamp() > dbtimestamp) {
                     tIeExamInvigilateCallService.updateById(tIeExamInvigilateCall);
                 }
@@ -532,10 +525,10 @@ public class MqLogicServiceImpl implements MqLogicService {
             Long breakId = ExamRecordCacheUtil.getLastBreakId(recordId);
             if (Objects.nonNull(breakId)) {
                 //获取断点时间
-                Date lastBreakTime = ExamRecordCacheUtil.getLastBreakTime(recordId);
+                Long lastBreakTime = ExamRecordCacheUtil.getLastBreakTime(recordId);
                 Integer diff = 0;
                 if (Objects.nonNull(lastBreakTime)) {
-                    Long l = ((System.currentTimeMillis() - lastBreakTime.getTime()) / 1000);
+                    Long l = ((System.currentTimeMillis() - lastBreakTime) / 1000);
                     diff = l.intValue();
                 }
                 //修改异常日志
@@ -625,7 +618,7 @@ public class MqLogicServiceImpl implements MqLogicService {
             });
         }
         //增加断点记录
-        TOeExamBreakHistory tOeExamBreakHistory = new TOeExamBreakHistory(ExamRecordCacheUtil.getLastBreakId(recordId), recordId, new Date(), exceptionEnum, exceptionEnum.name());
+        TOeExamBreakHistory tOeExamBreakHistory = new TOeExamBreakHistory(ExamRecordCacheUtil.getLastBreakId(recordId), recordId, System.currentTimeMillis(), exceptionEnum, exceptionEnum.name());
         tOeExamBreakHistoryService.saveOrUpdate(tOeExamBreakHistory);
         redisUtil.setForHash(RedisKeyHelper.examBreakCacheKey(tOeExamBreakHistory.getId()), SimpleBeanUtil.objectToMap(tOeExamBreakHistory));
 
@@ -664,9 +657,6 @@ public class MqLogicServiceImpl implements MqLogicService {
                         log.info(":{}-:{} 准备执行mq exec:{}逻辑", threadId, threadName, method.getName());
                         method.invoke(this, mqDto, SystemConstant.MQ_TOPIC_BUFFER_LIST);
                         return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
-                    } else {
-                        log.info(":{}-:{} 消息ack未确认,重发", threadId, threadName);
-                        return ConsumeConcurrentlyStatus.RECONSUME_LATER;//重试
                     }
                 }
             }
@@ -708,8 +698,6 @@ public class MqLogicServiceImpl implements MqLogicService {
                         log.info(":{}-:{} 准备执行mq exec:{}逻辑", threadId, threadName, method.getName());
                         method.invoke(this, mqDto, SystemConstant.MQ_DELAY_TOPIC_BUFFER_LIST);
                         return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
-                    } else {
-                        return ConsumeConcurrentlyStatus.RECONSUME_LATER;//重试
                     }
                 }
             }

+ 2 - 2
themis-task/src/main/java/com/qmth/themis/task/listener/service/impl/MqTaskLogicServiceImpl.java

@@ -116,9 +116,9 @@ public class MqTaskLogicServiceImpl implements MqTaskLogicService {
      * @param cls
      * @param quartzTaskEnum
      */
-    public void setCron(Date finishTime, String jobName, Class cls, QuartzTaskEnum quartzTaskEnum) {
+    public void setCron(Long finishTime, String jobName, Class cls, QuartzTaskEnum quartzTaskEnum) {
         Calendar calendar = Calendar.getInstance();
-        calendar.setTime(finishTime);
+        calendar.setTimeInMillis(finishTime);
 //                    calendar.add(Calendar.SECOND, 30);
         if (calendar.getTime().getTime() > System.currentTimeMillis()) {
             int year = calendar.get(Calendar.YEAR);//获取年份

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

@@ -67,8 +67,8 @@ public class QuartzLogicServiceImpl implements QuartzLogicService {
                         //获取该考试批次下所有未交卷的考生的考试记录
                         if (Objects.nonNull(examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum)) {
                             Long recordId = Long.parseLong(k);
-                            Date recordEndTime = ExamRecordCacheUtil.getEndTime(recordId);
-                            if (examActivityCacheBean.getFinishTime().getTime() == recordEndTime.getTime()) {
+                            Long recordEndTime = ExamRecordCacheUtil.getEndTime(recordId);
+                            if (examActivityCacheBean.getFinishTime() == recordEndTime) {
                                 Integer durationSeconds = ExamRecordCacheUtil.getDurationSeconds(recordId);
                                 Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
                                 ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
@@ -85,8 +85,8 @@ public class QuartzLogicServiceImpl implements QuartzLogicService {
                         //获取该考试批次下所有未交卷的考生的考试记录
                         if (Objects.nonNull(examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.ANSWERING, examRecordStatusEnum)) {
                             Long recordId = Long.parseLong(k);
-                            Date recordEndTime = ExamRecordCacheUtil.getEndTime(recordId);
-                            if (examActivityCacheBean.getFinishTime().getTime() == recordEndTime.getTime()) {
+                            Long recordEndTime = ExamRecordCacheUtil.getEndTime(recordId);
+                            if (examActivityCacheBean.getFinishTime() == recordEndTime) {
                                 Integer durationSeconds = ExamRecordCacheUtil.getDurationSeconds(recordId);
                                 Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
                                 ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
@@ -116,8 +116,8 @@ public class QuartzLogicServiceImpl implements QuartzLogicService {
         ExamActivityCacheBean examActivityCacheBean = teExamActivityService.getExamActivityCacheBean(examStudentCacheBean.getExamActivityId());
         //获取该考试批次下所有未交卷的考生的考试记录
         if (Objects.nonNull(examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.ANSWERING, examRecordStatusEnum)) {
-            Date recordEndTime = ExamRecordCacheUtil.getEndTime(recordId);
-            if (examActivityCacheBean.getFinishTime().getTime() == recordEndTime.getTime()) {
+            Long recordEndTime = ExamRecordCacheUtil.getEndTime(recordId);
+            if (examActivityCacheBean.getFinishTime() == recordEndTime) {
                 Integer durationSeconds = ExamRecordCacheUtil.getDurationSeconds(recordId);
                 //交卷
                 teExamService.finish(examStudentCacheBean.getStudentId(), recordId, FinishTypeEnum.AUTO.name(), durationSeconds);

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels