|
@@ -3454,9 +3454,11 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
}else if(!CollectionUtils.isEmpty(userCourseInfos)){
|
|
|
BigDecimal historyPrice = ZERO;
|
|
|
BigDecimal allPrice = ZERO;
|
|
|
+ int overNum = 0;
|
|
|
for (StudentCourseInfoDto userCourseInfo : userCourseInfos) {
|
|
|
allPrice = allPrice.add(userCourseInfo.getExpectPrice());
|
|
|
if(now.after(userCourseInfo.getStartClassTime())){
|
|
|
+ overNum++;
|
|
|
historyPrice = historyPrice.add(userCourseInfo.getTeachMode().equals(TeachModeEnum.ONLINE)?vipGroup.getOnlineClassesUnitPrice():vipGroup.getOfflineClassesUnitPrice());
|
|
|
}
|
|
|
}
|
|
@@ -3464,6 +3466,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if(bigDecimal.compareTo(ZERO) < 0){
|
|
|
bigDecimal = ZERO;
|
|
|
}
|
|
|
+ if(overNum == userCourseInfos.size()){
|
|
|
+ bigDecimal = ZERO;
|
|
|
+ }
|
|
|
result.put("suplusCourseOriginalFee", allPrice);
|
|
|
}else{
|
|
|
bigDecimal = new BigDecimal(0);
|