修复考试时间过长的问题,duration改为Long

master
huan.xu 4 years ago
parent 2bff674480
commit e490449c58
  1. 2
      blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/entity/AssessUser.java
  2. 2
      blockchain-server/blockchain-server-yyyf/src/main/java/com/blockchain/server/yyyf/entity/AssessUser.java
  3. 4
      blockchain-server/blockchain-server-yyyf/src/main/java/com/blockchain/server/yyyf/service/impl/AssessUserServiceImpl.java

@ -61,7 +61,7 @@ public class AssessUser implements Serializable {
* 时长
*/
@Column(name = "duration")
private Integer duration;
private Long duration;
/**
* 时长单位
*/

@ -61,7 +61,7 @@ public class AssessUser implements Serializable {
* 时长
*/
@Column(name = "duration")
private Integer duration;
private Long duration;
/**
* 时长单位
*/

@ -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);
//指标库更新

Loading…
Cancel
Save