diff --git a/src/main/java/com/teaching/backend/model/entity/records/CourseLearningRecord.java b/src/main/java/com/teaching/backend/model/entity/records/CourseLearningRecord.java index 80223e7..142cfd5 100644 --- a/src/main/java/com/teaching/backend/model/entity/records/CourseLearningRecord.java +++ b/src/main/java/com/teaching/backend/model/entity/records/CourseLearningRecord.java @@ -51,7 +51,7 @@ public class CourseLearningRecord implements Serializable { @ApiModelProperty(value = "最近学习时间") @TableField("time") - private LocalDateTime time; + private LocalDateTime times; } diff --git a/src/main/java/com/teaching/backend/service/impl/records/CourseLearningRecordServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/records/CourseLearningRecordServiceImpl.java index 0b16ab3..14a9795 100644 --- a/src/main/java/com/teaching/backend/service/impl/records/CourseLearningRecordServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/records/CourseLearningRecordServiceImpl.java @@ -45,7 +45,7 @@ public class CourseLearningRecordServiceImpl extends ServiceImpl { CourseLearningRecordsVo courseLearningRecordsVo = new CourseLearningRecordsVo(); BeanUtil.copyProperties(courseLearningRecord,courseLearningRecordsVo); - Date date = Date.from(courseLearningRecord.getTime().atZone(ZoneId.systemDefault()).toInstant()); + Date date = Date.from(courseLearningRecord.getTimes().atZone(ZoneId.systemDefault()).toInstant()); courseLearningRecordsVo.setTime(sdf.format(date)); //填充课程名称 courseLearningRecordsVo.setCourseName(coursesService.getById(courseLearningRecord.getCourseId()).getName());