|
@@ -96,7 +96,11 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//获取活动信息
|
|
//获取活动信息
|
|
|
|
|
+ BigDecimal discount = new BigDecimal(100);
|
|
|
VipGroupActivity vipGroupActivity = vipGroupActivityDao.get(vipGroup.getVipGroupActivityId());
|
|
VipGroupActivity vipGroupActivity = vipGroupActivityDao.get(vipGroup.getVipGroupActivityId());
|
|
|
|
|
+ if(vipGroupActivity != null){
|
|
|
|
|
+ discount = vipGroupActivity.getDiscount();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
List<CourseSchedule> vipGroupCourseSchedules=courseScheduleDao.findGroupCourseSchedules(vipGroupId.toString(),GroupType.VIP.getCode());
|
|
List<CourseSchedule> vipGroupCourseSchedules=courseScheduleDao.findGroupCourseSchedules(vipGroupId.toString(),GroupType.VIP.getCode());
|
|
|
|
|
|
|
@@ -136,13 +140,13 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
|
|
|
if (teachModeEnum == TeachModeEnum.ONLINE) {
|
|
if (teachModeEnum == TeachModeEnum.ONLINE) {
|
|
|
//学生线上单节课应缴费计算
|
|
//学生线上单节课应缴费计算
|
|
|
courseScheduleStudentPayment.setExpectPrice(
|
|
courseScheduleStudentPayment.setExpectPrice(
|
|
|
- vipGroup.getOnlineClassesUnitPrice().multiply(vipGroupActivity.getDiscount())
|
|
|
|
|
|
|
+ vipGroup.getOnlineClassesUnitPrice().multiply(discount)
|
|
|
.divide(new BigDecimal(100), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP)
|
|
.divide(new BigDecimal(100), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP)
|
|
|
.subtract(couponFee));
|
|
.subtract(couponFee));
|
|
|
}else{
|
|
}else{
|
|
|
//学生线下单节课应缴费计算
|
|
//学生线下单节课应缴费计算
|
|
|
courseScheduleStudentPayment.setExpectPrice(
|
|
courseScheduleStudentPayment.setExpectPrice(
|
|
|
- vipGroup.getOfflineClassesUnitPrice().multiply(vipGroupActivity.getDiscount())
|
|
|
|
|
|
|
+ vipGroup.getOfflineClassesUnitPrice().multiply(discount)
|
|
|
.divide(new BigDecimal(100), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP)
|
|
.divide(new BigDecimal(100), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP)
|
|
|
.subtract(couponFee));
|
|
.subtract(couponFee));
|
|
|
}
|
|
}
|