|
@@ -22,6 +22,7 @@ import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import com.google.common.collect.Maps;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
@@ -353,10 +354,17 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
}
|
|
|
List<VipGroupStudentCoursePrice> vscps = vipGroup.getVipGroupApplyBaseInfo().getVipGroupStudentCoursePrices();
|
|
|
|
|
|
+ //计算课程相关费用信息
|
|
|
+ Map<String, BigDecimal> costInfo = Maps.newHashMap();
|
|
|
|
|
|
// VIP课参数校验
|
|
|
if (CourseSchedule.CourseScheduleType.VIP.getCode().equals(groupType)) {
|
|
|
+
|
|
|
+ // 校验VIP课参数
|
|
|
vipGroupRequestParamValid(vipGroup, vipGroupApplyBaseInfoDto, totalClassTimes, firstCourseSchedule, latestCourseSchedule);
|
|
|
+
|
|
|
+ // 计算老师课薪
|
|
|
+ costInfo = countVipGroupPredictFee1(vipGroupApplyBaseInfoDto, vipGroupApplyBaseInfoDto.getUserId(), null);
|
|
|
}
|
|
|
|
|
|
// LIVE课参数校验
|
|
@@ -378,9 +386,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
className.append(StringUtils.join(studentNames, ","));
|
|
|
vipGroupApplyBaseInfoDto.setName(className.toString());
|
|
|
vipGroupDao.insert(vipGroupApplyBaseInfoDto);
|
|
|
- //计算课程相关费用信息
|
|
|
- Map<String, BigDecimal> costInfo = countVipGroupPredictFee1(vipGroupApplyBaseInfoDto,
|
|
|
- vipGroupApplyBaseInfoDto.getUserId(), null);
|
|
|
+
|
|
|
|
|
|
vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.PASS);
|
|
|
|
|
@@ -390,7 +396,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
// vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.ING);
|
|
|
// }
|
|
|
|
|
|
- vipGroupApplyBaseInfoDto.setTotalPrice(costInfo.get("totalPrice"));
|
|
|
+ vipGroupApplyBaseInfoDto.setTotalPrice(costInfo.getOrDefault("totalPrice", ZERO));
|
|
|
if (CollectionUtils.isEmpty(vscps)) {
|
|
|
vscps = new ArrayList<>();
|
|
|
for (Integer canBuyStudentId : canBuyStudentIds) {
|