Bladeren bron

管乐迷商城改造

zouxuan 8 maanden geleden
bovenliggende
commit
cfb1ad2ce9
1 gewijzigde bestanden met toevoegingen van 9 en 9 verwijderingen
  1. 9 9
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

+ 9 - 9
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -2100,11 +2100,15 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             throw new BizException("乐团当前状态是{},不能恢复", musicGroup.getStatus().getMsg());
         }
 
-        musicGroup.setStatus(MusicGroupStatusEnum.PROGRESS);
-        musicGroup.setUpdateTime(new Date());
-        musicGroupDao.update(musicGroup);
+		//恢复课表
+		if (musicGroup.getStatus() == MusicGroupStatusEnum.PAUSE) {
+			courseScheduleDao.resumeCourseScheduleByMusicGroupId(musicGroup.getId());
+		}
+		musicGroup.setStatus(MusicGroupStatusEnum.PROGRESS);
+		musicGroup.setUpdateTime(new Date());
+		musicGroupDao.update(musicGroup);
 
-        // 重新设置下次缴费时间
+		// 重新设置下次缴费时间
         /*List<MusicGroupStudentFee> fees = musicGroupStudentFeeDao.queryByMusicGroupId(musicGroupId);
         Date date = new Date();
         fees.forEach(e -> {
@@ -2113,12 +2117,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         });
         musicGroupStudentFeeDao.batchUpdate(fees);*/
 //        musicGroupStudentFeeDao.updateNextPaymentDate(musicGroupId, musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null));
-        musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "恢复乐团", sysUser.getId(), ""));
+		musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "恢复乐团", sysUser.getId(), ""));
 
-        //恢复课表
-        if (musicGroup.getStatus() == MusicGroupStatusEnum.PAUSE) {
-        	courseScheduleDao.resumeCourseScheduleByMusicGroupId(musicGroup.getId());
-        }
 
         //统计变更学员数
         groupEventSource.musicGroupStudentChangeEvent(musicGroupId, StudentMusicGroupStatusEnum.NORMAL, null);