|
@@ -411,7 +411,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
List<CourseMenuVo> courseMenuVoList = iCourseMenuService.selectList(bo1);
|
|
|
if (courseMenuVoList != null && courseMenuVoList.size() > 0) {
|
|
|
courseMenuVoList.forEach(courseMenuVo -> {
|
|
|
- classHours.updateAndGet(v -> v + Math.round(courseMenuVo.getClassHours()));
|
|
|
+ classHours.updateAndGet(v -> v + courseMenuVo.getClassHours());
|
|
|
if(courseMenuVo.getType()==1){
|
|
|
//获取章信息
|
|
|
List<CourseModuleChapterVo> courseModuleChapterVoList = iCourseModuleChapterService.getListById(courseMenuVo.getMenuId());
|
|
@@ -427,7 +427,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- classHours.updateAndGet(v -> v + Math.round(chapterHours.get()));
|
|
|
+ classHours.updateAndGet(v -> v + chapterHours.get());
|
|
|
}
|
|
|
else if(courseMenuVo.getType()==2){
|
|
|
AtomicReference<Double> chapterHours = new AtomicReference<>(0.0);
|
|
@@ -438,14 +438,14 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
chapterHours.updateAndGet(v -> v + courseChapterSectionVo.getClassHours());
|
|
|
});
|
|
|
}
|
|
|
- classHours.updateAndGet(v -> v + Math.round(chapterHours.get()));
|
|
|
+ classHours.updateAndGet(v -> v + chapterHours.get());
|
|
|
}
|
|
|
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- goodsVo.setClassHours((new BigDecimal(String.valueOf(classHours))).setScale(0, HALF_UP));
|
|
|
+ goodsVo.setClassHours((new BigDecimal(String.valueOf(classHours))).setScale(0, BigDecimal.ROUND_HALF_UP));
|
|
|
});
|
|
|
}
|
|
|
return list;
|