瀏覽代碼

1、课程调整时排除自动补签记录
2、删除请假时班级学生状态更新代码
3、小课过期课程调整生成后加入学生缴费信息
4、vip课点名添加开课前时间限制
5、学生端可购买小课获取条件调整
6、学员请假课程调整限制
7、点名列表兼容sys_user无数据
8、兼容无教学点

Joburgess 5 年之前
父節點
當前提交
4483f05cdd

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

@@ -1123,7 +1123,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         checkNewCourseSchedules(courseSchedules, false);
         courseScheduleDao.batchUpdate(courseSchedules);
         classGroupService.updateClassGroupInfo(classGroup.getId());
-        courseScheduleStudentPaymentService.updateVipGiveCourse(vipGroup.getId());
+//        courseScheduleStudentPaymentService.updateVipGiveCourse(vipGroup.getId());
     }
 
     @Override
@@ -1604,9 +1604,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
             studentAttendanceDao.deleteByCourseSchedules(needCreateStudentPaymentCourses.stream().map(CourseSchedule::getId).collect(Collectors.toList()));
         }
 
-        if(oldCourseScheduleList.get(0).getGroupType().equals(GroupType.VIP)){
-            courseScheduleStudentPaymentService.updateVipGiveCourse(Long.valueOf(oldCourseScheduleList.get(0).getMusicGroupId()));
-        }
+//        if(oldCourseScheduleList.get(0).getGroupType().equals(GroupType.VIP)){
+//            courseScheduleStudentPaymentService.updateVipGiveCourse(Long.valueOf(oldCourseScheduleList.get(0).getMusicGroupId()));
+//        }
 
         try {
             //推送课时调整

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

@@ -226,15 +226,16 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
 		List<VipGroupGiveCourseSortDto> vipGroupSortCourseByGroup = courseScheduleStudentPaymentDao.findVipGroupSortCourseByGroup(vipGroupId.toString());
 		Map<Integer, List<VipGroupGiveCourseSortDto>> userCourseMap = vipGroupSortCourseByGroup.stream().collect(Collectors.groupingBy(VipGroupGiveCourseSortDto::getUserId));
 
+        BigDecimal zero = new BigDecimal("0.00");
+
 		List<CourseScheduleStudentPayment> needUpdatePayments=new ArrayList<>();
 		for (Map.Entry<Integer, List<VipGroupGiveCourseSortDto>> integerListEntry : userCourseMap.entrySet()) {
 			List<VipGroupGiveCourseSortDto> courses = integerListEntry.getValue();
 			Map<BigDecimal, Long> expectPriceCountMap = courses.stream()
 					.collect(Collectors.groupingBy(VipGroupGiveCourseSortDto::getExpectPrice, Collectors.counting()));
-			BigDecimal zero = new BigDecimal("0.00");
 			Long zeroPriceNum = expectPriceCountMap.get(zero);
 			if(Objects.isNull(zeroPriceNum)||zeroPriceNum<=0){
-				return;
+				break;
 			}
 
 			List<VipGroupGiveCourseSortDto> zeroExpectPricePayments = courses.stream()
@@ -251,7 +252,7 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
 
 				if(!vipGroupGiveCourseSortDto.getId().equals(zeroExpectPricePayments.get(i).getId())
 						&&!vipGroupGiveCourseSortDto.getTeachMode().equals(zeroExpectPricePayments.get(i).getTeachMode())){
-					throw new BizException("不支持将不同教学形式的课程调整赠送课时后");
+					throw new BizException("不支持将不同教学形式的课程调整赠送课时后");
 				}
 
 				if(!vipGroupGiveCourseSortDto.getId().equals(zeroExpectPricePayments.get(i).getId())){
@@ -262,7 +263,7 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
 		}
 
 		if(!CollectionUtils.isEmpty(needUpdatePayments)){
-//			courseScheduleStudentPaymentDao.batchUpdate(needUpdatePayments);
+			courseScheduleStudentPaymentDao.batchUpdate(needUpdatePayments);
 		}
 	}
 }

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

@@ -2137,7 +2137,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		classGroupService.updateClassGroupInfo(classGroup.getId());
 
-		courseScheduleStudentPaymentService.updateVipGiveCourse(vipGroup.getId());
+//		courseScheduleStudentPaymentService.updateVipGiveCourse(vipGroup.getId());
 
 		ImGroupMember[] imGroupMembers = imGroupMemberList.toArray(new ImGroupMember[imGroupMemberList.size()]);
 		imFeignService.groupJoin(new ImGroupModel(classGroup.getId().toString(),
@@ -2381,7 +2381,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		VipGroupStatusEnum vipGroupStatus = vipGroup.getStatus();
 
         Integer currentStudentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
-		if(vipGroup.getStatus().equals(VipGroupStatusEnum.APPLYING)
+		if((!vipGroup.getStatus().equals(VipGroupStatusEnum.PAUSE)
+				||!vipGroup.getStatus().equals(VipGroupStatusEnum.CANCEL))
             &&currentStudentNum.compareTo(classGroup.getExpectStudentNum())>=0){
             vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
             vipGroupDao.update(vipGroup);
@@ -2461,6 +2462,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
                 	if(vipGroup.getStatus().equals(VipGroupStatusEnum.PAUSE)){
                 		continue;
 					}
+                	if(vipGroup.getStatus().equals(VipGroupStatusEnum.CANCEL)){
+                		continue;
+					}
                     if(now.before(vipGroup.getRegistrationStartTime())){
                         vipGroup.setStatus(VipGroupStatusEnum.NOT_START);
                     }

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

@@ -283,6 +283,7 @@
 		FROM course_schedule_student_payment cssp
 			LEFT JOIN course_schedule cs ON cssp.course_schedule_id_=cs.id_
 		WHERE cssp.music_group_id_=#{groupId} AND cssp.group_type_='VIP'
+-- 		AND CONCAT(cs.class_date_,' ',cs.start_class_time_) &gt; NOW()
 		AND cssp.settlement_time_ IS NULL
 	</select>