|
|
@@ -281,6 +281,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
throw new BizException("所在城市暂不参与此活动");
|
|
|
}
|
|
|
BigDecimal oneMonthPrice;
|
|
|
+ BigDecimal oneMonthOriginalPrice=practiceGroupBuyParams.getDrillTimesOnWeek()==1?practiceGroupSellPrice.getOnceOriginalPrice():practiceGroupSellPrice.getTwiceOriginalPrice();
|
|
|
if(practiceBuyActivityExpireDate.after(now)){
|
|
|
oneMonthPrice=practiceGroupBuyParams.getDrillTimesOnWeek()==1?practiceGroupSellPrice.getOnceActivityPrice():practiceGroupSellPrice.getTwiceActivityPrice();
|
|
|
if(!now.before(practicePromotionActivityStartDate)&&practiceGroupBuyParams.getBuyMonths()>=3&&studentExitChargePractices>0){
|
|
|
@@ -291,6 +292,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
}else{
|
|
|
oneMonthPrice=practiceGroupBuyParams.getDrillTimesOnWeek()==1?practiceGroupSellPrice.getOnceOriginalPrice():practiceGroupSellPrice.getTwiceOriginalPrice();
|
|
|
}
|
|
|
+ BigDecimal originalAmount = oneMonthOriginalPrice.multiply(new BigDecimal(practiceGroupBuyParams.getBuyMonths()));
|
|
|
BigDecimal amount= oneMonthPrice.multiply(new BigDecimal(practiceGroupBuyParams.getBuyMonths()));
|
|
|
if(!now.before(practicePromotionActivityStartDate)&&now.before(practiceBuyActivityExpireDate)&&studentExitChargePractices<=0){
|
|
|
amount= oneMonthPrice.multiply(new BigDecimal(1));
|
|
|
@@ -377,6 +379,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
teacherDefaultSalary=teacherDefaultPracticeGroupSalary.getMainTeacherSalary();
|
|
|
}
|
|
|
BigDecimal studentSingleCourseCost=amount.divide(new BigDecimal(practiceCourses.size()), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN);
|
|
|
+ BigDecimal studentSingleCourseOriginalCost=originalAmount.divide(new BigDecimal(practiceCourses.size()), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN);
|
|
|
for (CourseSchedule courseSchedule : practiceCourses) {
|
|
|
//课程与老师薪水表
|
|
|
CourseScheduleTeacherSalary courseScheduleTeacherSalary = new CourseScheduleTeacherSalary();
|
|
|
@@ -398,6 +401,8 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
courseScheduleStudentPayment.setCourseScheduleId(courseSchedule.getId());
|
|
|
courseScheduleStudentPayment.setUserId(practiceGroupBuyParams.getStudentId());
|
|
|
courseScheduleStudentPayment.setExpectPrice(studentSingleCourseCost);
|
|
|
+ courseScheduleStudentPayment.setActualPrice(studentSingleCourseCost);
|
|
|
+ courseScheduleStudentPayment.setOriginalPrice(studentSingleCourseOriginalCost);
|
|
|
courseScheduleStudentPayment.setClassGroupId(classGroup.getId());
|
|
|
courseScheduleStudentPayment.setCreateTime(now);
|
|
|
courseScheduleStudentPayment.setUpdateTime(now);
|
|
|
@@ -1078,6 +1083,8 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
courseScheduleStudentPayment.setCourseScheduleId(courseSchedule.getId());
|
|
|
courseScheduleStudentPayment.setUserId(practiceGroupBuyParams.getStudentId());
|
|
|
courseScheduleStudentPayment.setExpectPrice(BigDecimal.ZERO);
|
|
|
+ courseScheduleStudentPayment.setActualPrice(BigDecimal.ZERO);
|
|
|
+ courseScheduleStudentPayment.setOriginalPrice(BigDecimal.ZERO);
|
|
|
courseScheduleStudentPayment.setClassGroupId(classGroup.getId());
|
|
|
courseScheduleStudentPayment.setCreateTime(now);
|
|
|
courseScheduleStudentPayment.setUpdateTime(now);
|