From 38d4960e88accd6b1b7351b8b66899cc54a56b30 Mon Sep 17 00:00:00 2001 From: wenyu441069198 <14186472+wenyu441069198@user.noreply.gitee.com> Date: Mon, 29 Jul 2024 18:22:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AD=A6=E4=B9=A0=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/model/entity/records/CourseLearningRecord.java | 2 +- .../service/impl/records/CourseLearningRecordServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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());