|
@@ -565,7 +565,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
vipGroupApplyBaseInfoDto.setStatus(VipGroupStatusEnum.APPLYING);
|
|
|
|
|
|
vipGroupApplyBaseInfoDto.setTotalPrice(costInfo.getOrDefault("totalPrice", ZERO));
|
|
|
- vipGroupApplyBaseInfoDto.setTotalPrice(costInfo.getOrDefault("originalTotalPrice", ZERO));
|
|
|
+ vipGroupApplyBaseInfoDto.setOriginalTotalPrice(costInfo.getOrDefault("originalTotalPrice", ZERO));
|
|
|
if (CollectionUtils.isEmpty(vscps)) {
|
|
|
vscps = new ArrayList<>();
|
|
|
for (Integer canBuyStudentId : canBuyStudentIds) {
|
|
@@ -3835,7 +3835,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
|
|
|
Integer studentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
|
|
|
if (studentNum > 0) {
|
|
|
- throw new BizException("无法停止课程,需要全部学员退学后,才能停止,请先操作学员退学。");
|
|
|
+ throw new BizException("无法关闭课程,需要全部学员退学后,才能关闭,请先操作学员退学。");
|
|
|
}
|
|
|
|
|
|
List<Map<Integer, BigDecimal>> maps = vipGroupDao.countSurplusCourseFee(vipGroupId);
|
|
@@ -3866,7 +3866,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
StudentPaymentOrder studentPaymentOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroupId, userId,
|
|
|
DealStatusEnum.SUCCESS.getCode(),orderType);
|
|
|
if (null == studentPaymentOrder) {
|
|
|
- throw new BizException("无法停止课程,需要全部学员退学后,才能停止,请先操作学员退学。");
|
|
|
+ throw new BizException("无法关闭课程,需要全部学员退学后,才能关闭,请先操作学员退学。");
|
|
|
}
|
|
|
// sysUserCashAccountService.updateBalance(userId.intValue(),studentSurplusClassFees.get(userId));
|
|
|
// SysUserCashAccount sysUserCashAccount = sysUserCashAccountService.get(userId.intValue());
|
|
@@ -4589,7 +4589,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
|
public void updateVipGroupStatusToFinished() {
|
|
|
-
|
|
|
Date now = new Date();
|
|
|
//更新至已结束
|
|
|
List<VipGroup> vipGroupList = vipGroupDao.queryRequiredOverList();
|
|
@@ -4620,13 +4619,11 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
vipGroup.setStatus(VipGroupStatusEnum.CANCEL);
|
|
|
vipGroup.setUpdateTime(now);
|
|
|
vipGroup.setStopReason("没有学员");
|
|
|
-
|
|
|
// 删除课表
|
|
|
- courseScheduleDao.deleteCourseSchedulesByMusicGroupID(vipGroup.getId() + "", GroupType.VIP);
|
|
|
- courseScheduleTeacherSalaryDao.deleteByMusicGroupId(vipGroup.getId() + "", GroupType.VIP);
|
|
|
-
|
|
|
+ courseScheduleDao.deleteCourseSchedulesByMusicGroupID(vipGroup.getId().toString(), vipGroup.getGroupType());
|
|
|
+ courseScheduleTeacherSalaryDao.deleteByMusicGroupId(vipGroup.getId().toString(), vipGroup.getGroupType());
|
|
|
//删除考勤
|
|
|
- teacherAttendanceDao.deleteByMusicGroupId(vipGroup.getId() + "", GroupType.VIP);
|
|
|
+ teacherAttendanceDao.deleteByMusicGroupId(vipGroup.getId().toString(), vipGroup.getGroupType());
|
|
|
}
|
|
|
vipGroupDao.batchUpdate(vipGroupList);
|
|
|
|
|
@@ -4635,42 +4632,23 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //更新到进行中或报名中
|
|
|
- List<VipGroup> normalVipGroupList = vipGroupDao.queryNormalStatusList();
|
|
|
+ //更新到报名中
|
|
|
+/* List<VipGroup> normalVipGroupList = vipGroupDao.queryNormalStatusList();
|
|
|
if (!CollectionUtils.isEmpty(normalVipGroupList)) {
|
|
|
List<VipGroup> needUpdateVipGroups = new ArrayList<>();
|
|
|
for (VipGroup vipGroup : normalVipGroupList) {
|
|
|
- try {
|
|
|
- if (Objects.isNull(vipGroup.getRegistrationStartTime())) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if (vipGroup.getStatus().equals(VipGroupStatusEnum.PAUSE) || vipGroup.getStatus().equals(VipGroupStatusEnum.CANCEL)
|
|
|
- || vipGroup.getStatus().equals(VipGroupStatusEnum.FINISHED) || vipGroup.getStatus().equals(VipGroupStatusEnum.PROGRESS)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if (now.before(vipGroup.getRegistrationStartTime())) {
|
|
|
- vipGroup.setStatus(VipGroupStatusEnum.NOT_START);
|
|
|
- } else if (vipGroup.getRegistrationStartTime().before(now)
|
|
|
- && vipGroup.getPaymentExpireDate().after(now)
|
|
|
- && VipGroupStatusEnum.NOT_START.equals(vipGroup.getStatus())) {
|
|
|
- vipGroup.setStatus(VipGroupStatusEnum.APPLYING);
|
|
|
- } else {
|
|
|
- continue;
|
|
|
- }
|
|
|
- VipGroup vipGroup1 = new VipGroup();
|
|
|
- vipGroup1.setId(vipGroup.getId());
|
|
|
- vipGroup1.setStatus(vipGroup.getStatus());
|
|
|
- vipGroup1.setUpdateTime(now);
|
|
|
- vipGroup1.setTotalPrice(vipGroup.getTotalPrice());
|
|
|
- needUpdateVipGroups.add(vipGroup1);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ if (Objects.isNull(vipGroup.getRegistrationStartTime())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (now.after(vipGroup.getRegistrationStartTime())) {
|
|
|
+ vipGroup.setStatus(VipGroupStatusEnum.APPLYING);
|
|
|
+ needUpdateVipGroups.add(vipGroup);
|
|
|
}
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(needUpdateVipGroups)) {
|
|
|
vipGroupDao.batchUpdate(needUpdateVipGroups);
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
|
|
|
@Override
|