From 8883d90ba7d60a61590b715d1a3be9e3ae2adb2d Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 29 十月 2024 13:32:34 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/java/com/ycl/jxkg/service/impl/HomeServiceImpl.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ycl/jxkg/service/impl/HomeServiceImpl.java b/src/main/java/com/ycl/jxkg/service/impl/HomeServiceImpl.java index b61702f..ffa07ac 100644 --- a/src/main/java/com/ycl/jxkg/service/impl/HomeServiceImpl.java +++ b/src/main/java/com/ycl/jxkg/service/impl/HomeServiceImpl.java @@ -61,11 +61,13 @@ //瀛︿範璁板綍 StudyRecord studyRecord = studyRecordMapper.getByStudentId(userId); if (studyRecord != null) { + Long studyTime = studyRecord.getStudyTime(); + BigDecimal studyTimeVo = new BigDecimal(studyTime).divide(new BigDecimal(3600), 1, RoundingMode.HALF_UP); vo.setLastTime(studyRecord.getLastTime()); - vo.setStudyTime(studyRecord.getStudyTime()); + vo.setStudyTime(studyTimeVo); vo.setMeetCount(studyRecord.getMeetCount()); }else { - vo.setStudyTime(0L); + vo.setStudyTime(BigDecimal.ZERO); vo.setMeetCount(0); } //骞冲潎鍒� -- Gitblit v1.8.0