From e490449c5853b8eb481decf56bc32ff2c60b3572 Mon Sep 17 00:00:00 2001 From: "huan.xu" <275942173@qq.com> Date: Tue, 17 Nov 2020 17:06:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=80=83=E8=AF=95=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=BF=87=E9=95=BF=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?duration=E6=94=B9=E4=B8=BALong?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/blockchain/server/user/entity/AssessUser.java | 2 +- .../java/com/blockchain/server/yyyf/entity/AssessUser.java | 2 +- .../server/yyyf/service/impl/AssessUserServiceImpl.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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); //指标库更新