|
@@ -394,10 +394,16 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if(Objects.isNull(totalClassTimes)){
|
|
|
vipGroup.setMonthConsumeRate(0.0);
|
|
|
}else{
|
|
|
- BigDecimal overCoursesOfMonth=new BigDecimal(overCourses),allClassTimes=new BigDecimal(totalClassTimes);
|
|
|
+ if(totalClassTimes<=0){
|
|
|
+ vipGroup.setMonthConsumeRate((double) 0);
|
|
|
+ }else{
|
|
|
+ BigDecimal overCoursesOfMonth=new BigDecimal(overCourses),allClassTimes=new BigDecimal(totalClassTimes);
|
|
|
+
|
|
|
+ Double monthConsumeRate=overCoursesOfMonth.divide(allClassTimes,2,BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
|
+ vipGroup.setMonthConsumeRate(monthConsumeRate);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- Double monthConsumeRate=overCoursesOfMonth.divide(allClassTimes,2,BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
|
- vipGroup.setMonthConsumeRate(monthConsumeRate);
|
|
|
}
|
|
|
|
|
|
});
|
|
@@ -511,7 +517,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
throw new BizException("未找到指定课程");
|
|
|
}
|
|
|
StudentVipGroupDetailDto vipGroupDetail = vipGroupDao.getVipGroupDetail(vipGroupId);
|
|
|
- if(vipGroup.getStatus().equals(VipGroupStatusEnum.APPLYING)){
|
|
|
+ if(StringUtils.isNotEmpty(vipGroup.getCourseSchedulesJson())){
|
|
|
vipGroupDetail.setCourseSchedules(JSON.parseArray(vipGroup.getCourseSchedulesJson(),CourseSchedule.class));
|
|
|
}
|
|
|
|
|
@@ -1250,4 +1256,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
byTeacherAndCategory.getOnlineClassesSalary(),
|
|
|
byTeacherAndCategory.getOfflineClassesSalary());
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void stopVipGroupWithNoCreate() {
|
|
|
+
|
|
|
+ }
|
|
|
}
|