Bläddra i källkod

Merge remote-tracking branch 'origin/master'

周箭河 5 år sedan
förälder
incheckning
ada56ce6ad

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultVipGroupSalaryServiceImpl.java

@@ -63,6 +63,7 @@ public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Lon
 	public TeacherDefaultVipGroupSalary findByTeacherAndCategory(Integer userId, Integer categoryId) {
 		TeacherDefaultVipGroupSalary byTeacherAndCategory = teacherDefaultVipGroupSalaryDao.findByTeacherAndCategory(userId, categoryId);
 		if (Objects.isNull(byTeacherAndCategory)) {
+			byTeacherAndCategory = new TeacherDefaultVipGroupSalary();
 			byTeacherAndCategory.setOfflineClassesSalary(new BigDecimal(0));
 			byTeacherAndCategory.setOnlineClassesSalary(new BigDecimal(0));
 		}

+ 5 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -2268,12 +2268,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 //			stopVipPush(vipGroup.getId(),vipGroup.getName());
     		return;
 		}
-    	if(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus())){
-			Integer studentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
-			if(studentNum>0){
-				throw new BizException("无法停止课程,需要全部学员退学后,才能停止,请先操作学员退学。");
-			}
+
+		Integer studentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
+		if(studentNum>0){
+			throw new BizException("无法停止课程,需要全部学员退学后,才能停止,请先操作学员退学。");
 		}
+
 		List<Map<Integer, BigDecimal>> maps = vipGroupDao.countSurplusCourseFee(vipGroupId);
     	if(CollectionUtils.isEmpty(maps)||(maps.size()==1&&Objects.isNull(maps.get(0)))){
 			if(courseScheduleIds != null && courseScheduleIds.size() > 0){