浏览代码

feat:乐理课

Joburgess 4 年之前
父节点
当前提交
46d4c9949b
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

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

@@ -1819,7 +1819,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			throw new BizException("不能对已停止的课程进行此操作");
 		}
 
-        List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
+		VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId());
+
+		List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
 		if(!CollectionUtils.isEmpty(studentApplyRefunds)){
 		    throw new BizException("此学生存在退课申请,请到系统日志中查看");
         }
@@ -1877,7 +1879,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             courseScheduleStudentPaymentDao.batchDeleteWithID(studentPaymentIds);
         }
 
-        if(!vipGroup.getStatus().equals(VipGroupStatusEnum.APPLYING)){
+        if(!vipGroup.getStatus().equals(VipGroupStatusEnum.APPLYING)||(Objects.nonNull(vipGroupCategory)&&vipGroupCategory.getMusicTheory())){
 			courseScheduleTeacherSalaryService.updateVipGroupCourseTeacherSalary(vipGroupId.intValue(), vipGroup.getUserId());
 		}