|
@@ -248,6 +248,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
@Autowired
|
|
|
private SysUserCashAccountLogService sysUserCashAccountLogService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ImLiveBroadcastRoomService imLiveBroadcastRoomService;
|
|
|
+
|
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(VipGroup.class);
|
|
|
|
|
|
@Override
|
|
@@ -374,6 +377,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
// 计算老师课薪
|
|
|
costInfo = countVipGroupPredictFee1(vipGroupApplyBaseInfoDto, vipGroupApplyBaseInfoDto.getUserId(), null);
|
|
|
}
|
|
|
+ if (CourseSchedule.CourseScheduleType.LIVE.getCode().equals(groupType)) {
|
|
|
+ costInfo.put("totalPrice",
|
|
|
+ vipGroupApplyBaseInfoDto.getOnlineClassesUnitPrice().multiply(new BigDecimal(vipGroupApplyBaseInfoDto.getOnlineClassesNum())));
|
|
|
+ }
|
|
|
|
|
|
vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.PASS);
|
|
|
|
|
@@ -383,7 +390,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
// vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.ING);
|
|
|
// }
|
|
|
|
|
|
- vipGroupApplyBaseInfoDto.setTotalPrice(costInfo.getOrDefault("totalPrice", ZERO));
|
|
|
+ vipGroupApplyBaseInfoDto.setTotalPrice(costInfo.getOrDefault("totalPrice", ZERO));
|
|
|
if (CollectionUtils.isEmpty(vscps)) {
|
|
|
vscps = new ArrayList<>();
|
|
|
for (Integer canBuyStudentId : canBuyStudentIds) {
|
|
@@ -1601,6 +1608,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
public PageInfo<VipGroup> findVipGroups(VipGroupQueryInfo queryInfo) {
|
|
|
if (queryInfo.getGroupType().equals(GroupType.LIVE.getCode())) {
|
|
|
queryInfo.setOrganId(null);
|
|
|
+ queryInfo.setLiveOrganId(null);
|
|
|
}
|
|
|
PageInfo pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
@@ -4441,13 +4449,39 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
|
|
|
VipGroupApplyBaseInfoDto baseInfoDto = JSON.parseObject(JSON.toJSONString(vipGroup), VipGroupApplyBaseInfoDto.class);
|
|
|
|
|
|
+ vipGroupApplyDto.setVipGroupApplyBaseInfo(baseInfoDto);
|
|
|
// 分部名 声部 乐团主管
|
|
|
|
|
|
String organIdList = baseInfoDto.getOrganIdList();
|
|
|
|
|
|
baseInfoDto.setOrganName(organizationDao.findByOrganIds(organIdList).stream().collect(Collectors.joining(",")));
|
|
|
|
|
|
- // todo
|
|
|
+ Integer educationalTeacherId = baseInfoDto.getEducationalTeacherId();
|
|
|
+ if (Objects.nonNull(educationalTeacherId)) {
|
|
|
+ baseInfoDto.setEducationalTeacherName(sysUserService.queryUserById(educationalTeacherId).getRealName());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置课程
|
|
|
+ List<CourseSchedule> courseSchedules = JSON.parseArray(baseInfoDto.getCourseSchedulesJson(), CourseSchedule.class);
|
|
|
+
|
|
|
+ vipGroupApplyDto.setCourseSchedules(courseSchedules);
|
|
|
+
|
|
|
+ // 直播信息
|
|
|
+ ImLiveBroadcastRoomDto imLiveBroadcastRoomDto = JSON.parseObject(baseInfoDto.getLiveConfigJson(), ImLiveBroadcastRoomDto.class);
|
|
|
+
|
|
|
+ vipGroupApplyDto.setLiveBroadcastRoom(imLiveBroadcastRoomDto);
|
|
|
+ // 主讲人信息
|
|
|
+ SysUser sysUser = sysUserService.queryUserById(imLiveBroadcastRoomDto.getSpeakerId());
|
|
|
+ imLiveBroadcastRoomDto.setSpeakerName(sysUser.getRealName());
|
|
|
+
|
|
|
+
|
|
|
+ String subjectId = imLiveBroadcastRoomDto.getSubjectId();
|
|
|
+ if ("-1".equals(subjectId)) {
|
|
|
+ baseInfoDto.setSubjectName("乐理");
|
|
|
+ } else {
|
|
|
+ baseInfoDto.setSubjectName(subjectDao.findNames(subjectId));
|
|
|
+ }
|
|
|
+
|
|
|
return vipGroupApplyDto;
|
|
|
|
|
|
}
|