mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-25 02:32:57 +08:00
fix: 课程时长四舍五入
This commit is contained in:
@@ -297,7 +297,8 @@ public class CoursePageServiceImpl implements ICoursePageService {
|
||||
// map.put("sysType", coursePageVo.getSysType1());
|
||||
map.put("teacherName", coursePageVo.getTeacherName());
|
||||
// 课程时长:秒转分
|
||||
map.put("courseDuration", coursePageVo.getCourseDuration() / 60);
|
||||
long minutes = Math.round((double) coursePageVo.getCourseDuration() / 60);
|
||||
map.put("courseDuration", minutes);
|
||||
map.put("studys", coursePageVo.getStudys());
|
||||
// 课程评分显示1位小数,四舍五入
|
||||
map.put("score", coursePageVo.getScore() == null ? "0.0" : String.format("%.1f", Math.round(coursePageVo.getScore() * 10.0) / 10.0));
|
||||
|
||||
Reference in New Issue
Block a user