diff --git a/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/entity/AssessUser.java b/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/entity/AssessUser.java index 8e47bcf..fa5d11f 100644 --- a/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/entity/AssessUser.java +++ b/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/entity/AssessUser.java @@ -61,7 +61,7 @@ public class AssessUser implements Serializable { * 时长 */ @Column(name = "duration") - private Integer duration; + private Long duration; /** * 时长单位 */ diff --git a/blockchain-server/blockchain-server-yyyf/src/main/java/com/blockchain/server/yyyf/entity/AssessUser.java b/blockchain-server/blockchain-server-yyyf/src/main/java/com/blockchain/server/yyyf/entity/AssessUser.java index f3e8485..78e72fd 100644 --- a/blockchain-server/blockchain-server-yyyf/src/main/java/com/blockchain/server/yyyf/entity/AssessUser.java +++ b/blockchain-server/blockchain-server-yyyf/src/main/java/com/blockchain/server/yyyf/entity/AssessUser.java @@ -61,7 +61,7 @@ public class AssessUser implements Serializable { * 时长 */ @Column(name = "duration") - private Integer duration; + private Long duration; /** * 时长单位 */ diff --git a/blockchain-server/blockchain-server-yyyf/src/main/java/com/blockchain/server/yyyf/service/impl/AssessUserServiceImpl.java b/blockchain-server/blockchain-server-yyyf/src/main/java/com/blockchain/server/yyyf/service/impl/AssessUserServiceImpl.java index 3966ba0..4b88cae 100644 --- a/blockchain-server/blockchain-server-yyyf/src/main/java/com/blockchain/server/yyyf/service/impl/AssessUserServiceImpl.java +++ b/blockchain-server/blockchain-server-yyyf/src/main/java/com/blockchain/server/yyyf/service/impl/AssessUserServiceImpl.java @@ -196,7 +196,7 @@ public class AssessUserServiceImpl implements AssessUserService { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //考试时长 long duration = sdf.parse(sdf.format(now)).getTime() - sdf.parse(sdf.format(startTime)).getTime(); - assessUser.setDuration(Math.toIntExact(duration)); + assessUser.setDuration(duration); if (assessUser.getUserType() == 0 && assessUser.getAchieveMentType() == 0) { YyyfStudentAnswerDto yyyfStudentAnswerDto = new YyyfStudentAnswerDto(); BeanUtils.copyProperties(assessUser, yyyfStudentAnswerDto); @@ -247,7 +247,7 @@ public class AssessUserServiceImpl implements AssessUserService { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //考试时长 long duration = sdf.parse(sdf.format(now)).getTime() - sdf.parse(sdf.format(startTime)).getTime(); - assessUserDto.setDuration(Math.toIntExact(duration)); + assessUserDto.setDuration(duration); updateAssessUserDtoList.add(assessUserDto); //指标库更新