Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

yonge 5 years ago
parent
commit
99e5e20e2d

+ 22 - 19
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentPaymentDao.java

@@ -32,6 +32,7 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
 
     /**
      * 删除学生对应的课程
+     *
      * @param userId
      * @param courseScheduleList
      * @return
@@ -39,73 +40,75 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
     int deleteStudentCourseSchedule(@Param("userId") Integer userId, @Param("courseScheduleList") List<CourseSchedule> courseScheduleList);
 
     /**
+     * @param courseScheduleIds: 课程编号列表
+     * @return int
      * @describe 批量删除课程对应的学生缴费记录
      * @author Joburgess
      * @date 2019/10/31
-     * @param courseScheduleIds: 课程编号列表
-     * @return int
      */
     int deleteByCourseSchedule(@Param("courseScheduleIds") List<Long> courseScheduleIds);
 
     /**
+     * @param params: 班级编号
+     * @return java.util.List<com.ym.mec.biz.dal.dto.StudentAttendanceStatisticsResp>
      * @describe 获取指定班级中的学生
      * @author Joburgess
      * @date 2019/10/28
-     * @param params: 班级编号
-     * @return java.util.List<com.ym.mec.biz.dal.dto.StudentAttendanceStatisticsResp>
      */
-    List<StudentAttendanceStatisticsResponse> findStudentByClassGroup(Map<String,Object> params);
-    int countStudentByClassGroup(Map<String,Object> params);
+    List<StudentAttendanceStatisticsResponse> findStudentByClassGroup(Map<String, Object> params);
+
+    int countStudentByClassGroup(Map<String, Object> params);
 
     /**
+     * @param classGroupId: 班级编号
+     * @param userId:       学生编号
+     * @return java.math.BigDecimal
      * @describe 统计学生剩余课时的费用
      * @author Joburgess
      * @date 2019/11/15
-     * @param classGroupId: 班级编号
-     * @param userId: 学生编号
-     * @return java.math.BigDecimal
      */
     BigDecimal countSurplusCourseFee(@Param("classGroupId") Integer classGroupId,
                                      @Param("userId") Integer userId);
 
     /**
+     * @param classGroupId: 班级编号
+     * @return java.math.BigDecimal
      * @describe 统计所有课时的购买费用
      * @author Joburgess
      * @date 2019/11/27
-     * @param classGroupId: 班级编号
-     * @return java.math.BigDecimal
      */
     BigDecimal countAllCourseFee(@Param("classGroupId") Integer classGroupId);
 
     /**
+     * @param ids: 学生课程缴费信息编号
+     * @return int
      * @describe 删除用户在指定班级上的课程
      * @author Joburgess
      * @date 2019/12/3
-     * @param ids: 学生课程缴费信息编号
-     * @return int
      */
     int batchDeleteWithID(@Param("ids") List<Integer> ids);
 
     /**
-     * @describe 获取用户在指定班级上缴费记录编号
-     * @author Joburgess
-     * @date 2019/12/3
      * @param classGroupId:
      * @param userId:
      * @return java.util.List<java.lang.Integer>
+     * @describe 获取用户在指定班级上缴费记录编号
+     * @author Joburgess
+     * @date 2019/12/3
      */
     List<Integer> findNotStartCourseStudentPaymentIdsWithClassGroupAndStudent(@Param("classGroupId") Integer classGroupId,
                                                                               @Param("userId") Integer userId);
 
     /**
+     * @param vipGroupId: 小课编号
+     * @param teachMode:  教学形式
+     * @return java.math.BigDecimal
      * @describe 获取小课指定形式下最后一节课的课程单价
      * @author Joburgess
      * @date 2019/12/5
-     * @param vipGroupId: 小课编号
-     * @param teachMode: 教学形式
-     * @return java.math.BigDecimal
      */
     BigDecimal findVipGroupCoursePrice(@Param("vipGroupId") Integer vipGroupId,
                                        @Param("teachMode") String teachMode);
 
+    int deleteStudentCourseScheduleByUserId(@Param("courseScheduleId") Long courseScheduleId, @Param("userIdList") List<Integer> userIdList);
 }

+ 25 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseScheduleStudentDto.java

@@ -0,0 +1,25 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.biz.dal.entity.CourseSchedule;
+import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
+import com.ym.mec.biz.dal.enums.TeachTypeEnum;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/9/17
+ */
+public class CourseScheduleStudentDto extends CourseSchedule {
+
+private List<Integer> studentIds;
+
+    public List<Integer> getStudentIds() {
+        return studentIds;
+    }
+
+    public void setStudentIds(List<Integer> studentIds) {
+        this.studentIds = studentIds;
+    }
+}

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java

@@ -348,4 +348,6 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      */
     List<ClassGroup> findByClassGroupIds(List<Integer> classGroupIds);
 
+    boolean updateTotalClassTimes(Long classGroupId, Integer num);
+
 }

+ 32 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -105,6 +105,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
     @Autowired
     private RedisCache<String, Object> redisCache;
+    @Autowired
+    private ClassGroupService classGroupService;
 
     @Override
     public BaseDAO<Integer, ClassGroup> getDAO() {
@@ -1234,9 +1236,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         if (classGroup == null) {
             throw new Exception("班级不存在");
         }
+        Integer courseTimes = classGroup4MixDto.getCourseTimes();
+
         if (classGroup4MixDto.getCourseAddType().equals("renew")) {
             List<CourseSchedule> noStartCourses = courseScheduleService.findNoStartCoursesByClassGroupId(classGroup.getId());
             if (noStartCourses.size() > 0) {
+                courseTimes -=  noStartCourses.size();
                 List<Long> courseScheduleIds = noStartCourses.stream().map(courseSchedule -> courseSchedule.getId()).collect(Collectors.toList());
                 courseScheduleDao.batchDeleteCourseSchedules(courseScheduleIds);
                 courseScheduleTeacherSalaryDao.batchDeleteByCourseScheduleIds(courseScheduleIds);
@@ -1245,6 +1250,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             }
         }
 
+        classGroupService.updateTotalClassTimes(classGroup.getId().longValue(),courseTimes);
+
         MusicGroup musicGroup = musicGroupDao.get(classGroup.getMusicGroupId());
 
         Integer schoolId = musicGroup.getSchoolId();
@@ -1419,8 +1426,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             }
         }
 
-        //检测新排课冲突
-        courseScheduleService.checkNewCourseSchedules(courseScheduleList, false);
+        //排课处理
+        if(classGroup.getType().equals(ClassGroupTypeEnum.SNAP)){
+            courseScheduleService.checkSnapCourseShchedules(courseScheduleList);
+        }else {
+            courseScheduleService.checkNewCourseSchedules(courseScheduleList,false);
+        }
 
         //老师结算表
         courseScheduleTeacherSalaryService.batchInsert(courseScheduleTeacherSalaryList);
@@ -1509,6 +1520,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         //计算每节课的课酬
         List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaryList = new ArrayList<>();
         List<CourseScheduleStudentPayment> courseScheduleStudentPaymentList = new ArrayList<>();
+        List<CourseSchedule> courseScheduleList = new ArrayList<>();
+
         BigDecimal expectPrice = new BigDecimal("0");
         int times = 0;
         Map<String, Integer> holidayDays = new HashMap<>();
@@ -1563,6 +1576,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                 }
                 courseSchedule.setTeacherId(teacherId);
                 courseSchedule.setActualTeacherId(teacherId);
+                courseScheduleList.add(courseSchedule);
 
                 courseScheduleDao.insert(courseSchedule);
 
@@ -1642,6 +1656,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
             now = now.plusDays(1);
         }
+        courseScheduleService.checkSnapCourseShchedules(courseScheduleList);
 
         //老师结算表
         courseScheduleTeacherSalaryService.batchInsert(courseScheduleTeacherSalaryList);
@@ -1910,4 +1925,19 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         imFeignService.groupBatchCreate(imGroupModelList);
         return true;
     }
+
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
+    public boolean updateTotalClassTimes(Long classGroupId, Integer num) {
+        ClassGroup classGroup = classGroupDao.lockClassGroup(classGroupId);
+        if (Objects.isNull(classGroup)) {
+            throw new BizException("班级不存在");
+        }
+        classGroup.setTotalClassTimes(classGroup.getTotalClassTimes() + num);
+        classGroup.setUpdateTime(new Date());
+
+        classGroupDao.update(classGroup);
+
+        return true;
+    }
 }

+ 91 - 102
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -114,9 +114,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	@Transactional(rollbackFor = Exception.class)
 	public void deleteCourseSchedules(List<Long> courseScheduleIds) {
 		courseScheduleDao.batchDeleteCourseSchedules(courseScheduleIds);
-		courseScheduleTeacherSalaryDao.batchDeleteByCourseScheduleIds(courseScheduleIds);
-		courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
-		teacherAttendanceDao.batchDeleteByCourseSchedules(courseScheduleIds);
+        courseScheduleTeacherSalaryDao.batchDeleteByCourseScheduleIds(courseScheduleIds);
+        courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
+        teacherAttendanceDao.batchDeleteByCourseSchedules(courseScheduleIds);
 	}
 
 	@Override
@@ -524,8 +524,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	}
 
 	@Override
+	@Transactional(rollbackFor = Exception.class)
 	public List<Long> checkSnapCourseShchedules(List<CourseSchedule> courseSchedules) {
 		List<Long> courseScheduleIds = new ArrayList<>();
+		List<CourseScheduleStudentDto> courseScheduleStudents =  new ArrayList<>();
 		if(CollectionUtils.isEmpty(courseSchedules)){
 			return courseScheduleIds;
 		}
@@ -555,6 +557,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		existCourseSchedules=existCourseSchedules.stream()
 				.filter(courseSchedule -> !updateCourseScheduleIds.contains(courseSchedule.getId()))
 				.collect(Collectors.toList());
+		if(existCourseSchedules ==null || existCourseSchedules.size()==0){
+			return null;
+		}
 		//新课程对应的班级编号列表
 		List<Integer> newCourseScheduleClassGroupIds = courseSchedules
 				.stream()
@@ -598,109 +603,89 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		Map<Integer, IntegerAndIntegerListDto> classGroupTeachingTeacherMap = classGroupAndUserIdsMap.stream()
 				.collect(Collectors.toMap(IntegerAndIntegerListDto::getId, integerAndIntegerListDto -> integerAndIntegerListDto));
 
-		//将课程计划按照开课时间排序
-		allCourseSchedules.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
-		if(allCourseSchedules.size()>1){
-			//记录连续冲突的次数
-			Integer repeatTimes=1;
-			for (int i=1;i<allCourseSchedules.size();i++){
-				for(int j=1;j<=repeatTimes;j++){
-					//当前课程
-					CourseSchedule preCourseSchedule = allCourseSchedules.get(i-j);
-					//后面一节课程
-					CourseSchedule backCourseSchedule = allCourseSchedules.get(i);
-					//判断前后两节课是否存在冲突
-					if(preCourseSchedule.getEndClassTime().before(backCourseSchedule.getStartClassTime())){
-						repeatTimes=j;
-						continue;
-					}
-					repeatTimes+=1;
-					if(existCourseScheduleIds.contains(preCourseSchedule.getId())
-							&&existCourseScheduleIds.contains(backCourseSchedule.getId())){
-						if(j==repeatTimes){
-							repeatTimes+=1;
-						}
-						continue;
-					}
+		existCourseSchedules.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
+		courseSchedules.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
 
-					//教师冲突检测
-					if(Objects.isNull(preCourseSchedule.getId())){
-						IntegerAndIntegerListDto integerAndIntegerListDto = classGroupTeachingTeacherMap.get(preCourseSchedule.getClassGroupId());
-						if(Objects.nonNull(integerAndIntegerListDto)){
-							preCourseSchedule.setTeachingTeacherIdList(integerAndIntegerListDto.getIds());
-						}
-					}else if(existCourseScheduleIds.contains(preCourseSchedule.getId())){
-						IntegerAndIntegerListDto integerAndIntegerListDto = courseScheduleTeacherMap.get(preCourseSchedule.getId());
-						if(Objects.nonNull(integerAndIntegerListDto)){
-							preCourseSchedule.setTeachingTeacherIdList(integerAndIntegerListDto.getIds());
-						}
-					}
-					if(Objects.isNull(backCourseSchedule.getId())){
-						IntegerAndIntegerListDto integerAndIntegerListDto = classGroupTeachingTeacherMap.get(backCourseSchedule.getClassGroupId());
-						if(Objects.nonNull(integerAndIntegerListDto)){
-							backCourseSchedule.setTeachingTeacherIdList(integerAndIntegerListDto.getIds());
-						}
-					}else if(existCourseScheduleIds.contains(backCourseSchedule.getId())){
-						IntegerAndIntegerListDto integerAndIntegerListDto = courseScheduleTeacherMap.get(backCourseSchedule.getId());
-						if(Objects.nonNull(integerAndIntegerListDto)){
-							backCourseSchedule.setTeachingTeacherIdList(integerAndIntegerListDto.getIds());
-						}
-					}
-					boolean isRepeat = false;
-					if(!CollectionUtils.isEmpty(preCourseSchedule.getTeachingTeacherIdList())
-							&&!CollectionUtils.isEmpty(backCourseSchedule.getTeachingTeacherIdList())){
-						List<Integer> repeatIds = preCourseSchedule.getTeachingTeacherIdList()
-								.stream().filter(backCourseSchedule.getTeachingTeacherIdList()::contains)
-								.collect(Collectors.toList());
-						if(!CollectionUtils.isEmpty(repeatIds)){
-							isRepeat = true;
-						}
-					}
-					//学生冲突检测
-					if(preCourseSchedule.getClassGroupId().equals(backCourseSchedule.getClassGroupId())){
-						//如果班级相同,则学生肯定存在冲突
-						isRepeat = true;
-					}
-					//如果班级不同,则需要检测两个班级是否存在重复的学生
-					List<ClassGroupStudentMapper> preClassGroupStudents=classGroupStudentsMap.get(preCourseSchedule.getClassGroupId());
-					List<ClassGroupStudentMapper> backClassGroupStudents=classGroupStudentsMap.get(backCourseSchedule.getClassGroupId());
-					//当前课程所在班级的学生编号列表
-					List<Integer> preClassGroupStudentIds = preClassGroupStudents.stream()
-							.map(ClassGroupStudentMapper::getUserId)
-							.collect(Collectors.toList());
-					//后面一节课程所在班级的学生编号列表
-					List<Integer> backClassGroupStudentIds = backClassGroupStudents.stream()
-							.map(ClassGroupStudentMapper::getUserId)
-							.collect(Collectors.toList());
-					List<Integer> repeatStudentIds = preClassGroupStudentIds.stream()
-							.filter(backClassGroupStudentIds::contains)
+		newNode:
+		for (CourseSchedule newCourseSchedule : courseSchedules) {
+			exitNode:
+			for (CourseSchedule existCourseSchedule : existCourseSchedules) {
+				if(newCourseSchedule.getEndClassTime().before(existCourseSchedule.getStartClassTime())){
+					continue newNode;
+				}
+				if(existCourseSchedule.getEndClassTime().before(newCourseSchedule.getStartClassTime())){
+					continue exitNode;
+				}
+
+				boolean isTeacherRepeat = false;
+				boolean isStudentRepeat = false;
+				//检测老师冲突
+				existCourseSchedule.setTeachingTeacherIdList(courseScheduleTeacherMap.get(existCourseSchedule.getId()).getIds());
+				newCourseSchedule.setTeachingTeacherIdList(classGroupTeachingTeacherMap.get(newCourseSchedule.getClassGroupId()).getIds());
+
+				if(!CollectionUtils.isEmpty(newCourseSchedule.getTeachingTeacherIdList())
+						&&!CollectionUtils.isEmpty(existCourseSchedule.getTeachingTeacherIdList())){
+					List<Integer> repeatIds = newCourseSchedule.getTeachingTeacherIdList()
+							.stream().filter(existCourseSchedule.getTeachingTeacherIdList()::contains)
 							.collect(Collectors.toList());
-					if(!CollectionUtils.isEmpty(repeatStudentIds)){
-						isRepeat = true;
+					if(!CollectionUtils.isEmpty(repeatIds)){
+						isTeacherRepeat = true;
 					}
+				}
 
-					if(isRepeat){
-						if(preCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.SNAP.getCode())
-								&&backCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.SNAP.getCode())){
-							throw new BizException("教师冲突");
-						}else if(preCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.SNAP.getCode())
-								&&backCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.VIP.getCode())){
-							throw new BizException("教师冲突");
-						}else if(preCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.VIP.getCode())
-								&&backCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.SNAP.getCode())){
-							throw new BizException("教师冲突");
-						}else{
-							if(!preCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.SNAP.getCode())
-								&&preCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.VIP.getCode())){
-								courseScheduleIds.add(preCourseSchedule.getId());
-							}
-							if(!backCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.SNAP.getCode())
-									&&backCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.VIP.getCode())){
-								courseScheduleIds.add(backCourseSchedule.getId());
-							}
-						}
-					}
+				//学生冲突检测
+				if(newCourseSchedule.getClassGroupId().equals(existCourseSchedule.getClassGroupId())){
+					//如果班级相同,则学生肯定存在冲突
+					isTeacherRepeat = true;
+				}
+				//如果班级不同,则需要检测两个班级是否存在重复的学生
+				List<ClassGroupStudentMapper> preClassGroupStudents=classGroupStudentsMap.get(newCourseSchedule.getClassGroupId());
+				List<ClassGroupStudentMapper> backClassGroupStudents=classGroupStudentsMap.get(existCourseSchedule.getClassGroupId());
+				//当前课程所在班级的学生编号列表
+				List<Integer> preClassGroupStudentIds = preClassGroupStudents.stream()
+						.map(ClassGroupStudentMapper::getUserId)
+						.collect(Collectors.toList());
+				//后面一节课程所在班级的学生编号列表
+				List<Integer> backClassGroupStudentIds = backClassGroupStudents.stream()
+						.map(ClassGroupStudentMapper::getUserId)
+						.collect(Collectors.toList());
+				List<Integer> repeatStudentIds = preClassGroupStudentIds.stream()
+						.filter(backClassGroupStudentIds::contains)
+						.collect(Collectors.toList());
+				if(!CollectionUtils.isEmpty(repeatStudentIds)){
+					isStudentRepeat = true;
 				}
+				if(!isTeacherRepeat && !isStudentRepeat){
+					continue;
+				}
+
+				if(existCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.SNAP.getCode())||existCourseSchedule.getClassGroupType().equals(ClassGroupTypeEnum.VIP.getCode())){
+					throw new BizException(courseCheckInfo(newCourseSchedule,existCourseSchedule,existCourseScheduleIds,1));
+				}
+
+				if(isTeacherRepeat){
+					courseScheduleIds.add(existCourseSchedule.getId());
+				}
+				if(isStudentRepeat){
+					CourseScheduleStudentDto courseScheduleStudentDto = new CourseScheduleStudentDto();
+					courseScheduleStudentDto.setId(existCourseSchedule.getId());
+					courseScheduleStudentDto.setStudentIds(repeatStudentIds);
+					courseScheduleStudents.add(courseScheduleStudentDto);
+				}
+
+			}
+		}
+		//老师冲突删除课程课程
+		if(courseScheduleIds.size()>0){
+			courseScheduleDao.batchDeleteCourseSchedules(courseScheduleIds);
+			courseScheduleTeacherSalaryDao.batchDeleteByCourseScheduleIds(courseScheduleIds);
+			teacherAttendanceDao.batchDeleteByCourseSchedules(courseScheduleIds);
+			courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
+		}
+		//学生冲突删除学生课程
+		if(courseScheduleStudents.size()>0){
+			for (CourseScheduleStudentDto courseScheduleStudent : courseScheduleStudents) {
+				courseScheduleStudentPaymentDao.deleteStudentCourseScheduleByUserId(courseScheduleStudent.getId(),courseScheduleStudent.getStudentIds());
 			}
 		}
 		return courseScheduleIds;
@@ -1306,7 +1291,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		for (StudentAttendance studentAttendance : studentAttendanceList) {
 			studentAttendance.setStatus(StudentAttendanceStatusEnum.TRUANT);
 			studentAttendance.setRemark("课程已结束,自动补旷课");
-			studentAttendance.setCurrentClassTimes(studentAttendance.getCurrentClassTimes() + 1);
+			if(Objects.isNull(studentAttendance.getCurrentClassTimes())){
+                studentAttendance.setCurrentClassTimes(1);
+            }else{
+                studentAttendance.setCurrentClassTimes(studentAttendance.getCurrentClassTimes() + 1);
+            }
 			studentAttendance.setCreateTime(date);
 		}
 

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

@@ -845,7 +845,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 				default:
 					throw new BizException("活动类型错误!");
 			}
-			results.put("totalPrice",totalPrice.setScale(0,BigDecimal.ROUND_UP));
+			results.put("totalPrice",totalPrice.setScale(0,BigDecimal.ROUND_CEILING));
 		}
         return results;
     }

+ 6 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -198,4 +198,10 @@
 			#{id}
 		</foreach>
     </delete>
+	<delete id="deleteStudentCourseScheduleByUserId">
+		DELETE FROM course_schedule_student_payment WHERE course_schedule_id_ = #{courseScheduleId} AND user_id_  IN
+		<foreach collection="userIdList" item="userId" index="index" open="(" close=")" separator=",">
+			#{userId}
+		</foreach>
+	</delete>
 </mapper>

+ 1 - 2
mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupController.java

@@ -129,8 +129,7 @@ public class ClassGroupController extends BaseController {
     @ApiOperation(value = "乐团所有班级列表")
     @GetMapping("/findAllClassGroupByMusicGroup")
     @PreAuthorize("@pcs.hasPermissions('classGroup/findAllClassGroupByMusicGroup')")
-    public HttpResponseResult findAllClassGroupByMusicGroup(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId,
-                                                            @ApiParam(value = "班级类型", required = false) @RequestParam String type) {
+    public HttpResponseResult findAllClassGroupByMusicGroup(String musicGroupId,String type) {
         return succeed(classGroupService.findAllClassGroupByMusicGroup(musicGroupId,type));
     }