Browse Source

1、超级管理员课表预览bug修复
2、连堂课条件判断逻辑调整
3、vip课教师不做异常签到、签退判断
4、课程调整,如果调整时间大于当前时间,则清空之前的签到信息
5、VIP课学员复学增加时间限制

Joburgess 5 years ago
parent
commit
d7ce22f419

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

@@ -12,6 +12,7 @@ import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
 import java.math.BigDecimal;
@@ -140,6 +141,7 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
     }
 
 	@Override
+	@Transactional(rollbackFor = Exception.class)
 	public void createCourseScheduleStudentPaymentByCourseSchedules(List<CourseSchedule> courseSchedules) {
 		if(CollectionUtils.isEmpty(courseSchedules)){
 			return;

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

@@ -1435,6 +1435,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		if(Objects.isNull(studentRecoverInfo.getVipGroupId())||Objects.isNull(studentRecoverInfo.getUserId())){
 			throw new BizException("请指定小课与学生");
 		}
+		Date now=new Date();
+		if(studentRecoverInfo.getCourseCreateStartTime().before(now)){
+			throw new BizException("排课起始时间不得小于当前时间");
+		}
 		VipGroup vipGroup=vipGroupDao.get(studentRecoverInfo.getVipGroupId().longValue());
 		if(Objects.isNull(vipGroup)){
 			throw new BizException("指定的课程不存在");
@@ -1519,8 +1523,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		BigDecimal surplusCourseFee = new BigDecimal(0);
 
-		Date now=new Date();
-
 		List<CourseSchedule> surplusCourseWithGroup = courseScheduleDao.findSurplusCourseWithGroup(GroupType.VIP, studentRecoverInfo.getVipGroupId().toString());
 		surplusCourseWithGroup.sort(Comparator.comparing(CourseSchedule::getStartClassTime));