From 967dee0ec73e696e745423fbd7d4998d6fa3627e Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 10 七月 2024 15:43:25 +0800
Subject: [PATCH] 教学资源增加文件类型

---
 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