Browse Source

活动排课

zouxuan 4 years ago
parent
commit
fe9c0b1630

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

@@ -2566,17 +2566,17 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			classGroup.setStudentNum(classGroup.getStudentNum()+num);
 			classGroup.setStudentNum(classGroup.getStudentNum()+num);
 		}
 		}
 
 
-		Integer studentPaymentNum=studentPaymentOrderDao.countStudentPaymentNum(vipGroupId.toString());
+		Integer studentPaymentNum = studentPaymentOrderDao.countStudentPaymentNum(vipGroupId.toString());
 
 
 //		Integer studentPaymentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
 //		Integer studentPaymentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
 
 
-		if(studentPaymentNum.equals(classGroup.getExpectStudentNum())&&updateVipStatus){
+		if(studentPaymentNum.equals(classGroup.getExpectStudentNum()) && updateVipStatus){
 			classGroup.setStudentNum(studentPaymentNum);
 			classGroup.setStudentNum(studentPaymentNum);
 			classGroup.setDelFlag(0);
 			classGroup.setDelFlag(0);
 			classGroupDao.update(classGroup);
 			classGroupDao.update(classGroup);
 			createVipGroupCourseScheInfo(vipGroupId,classGroup);
 			createVipGroupCourseScheInfo(vipGroupId,classGroup);
 		}
 		}
-		if(num!=0||updateVipStatus){
+		if(num != 0 || updateVipStatus){
 			int i = courseScheduleDao.countVipGroupCourses(vipGroupId.intValue(),"VIP");
 			int i = courseScheduleDao.countVipGroupCourses(vipGroupId.intValue(),"VIP");
 			classGroup.setTotalClassTimes(i);
 			classGroup.setTotalClassTimes(i);
 			classGroupDao.update(classGroup);
 			classGroupDao.update(classGroup);
@@ -2706,7 +2706,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			//更新班级人数,如果订单支付失败则减少
 			//更新班级人数,如果订单支付失败则减少
 			this.updateVipGroupStudentNumAndStatus(vipGroup.getId(),classGroup,1,false);
 			this.updateVipGroupStudentNumAndStatus(vipGroup.getId(),classGroup,1,false);
 
 
-			ClassGroupStudentMapper classGroupStudentMapper=classGroupStudentMapperDao.query(classGroup.getId(),user.getId());
+			ClassGroupStudentMapper classGroupStudentMapper = classGroupStudentMapperDao.query(classGroup.getId(),user.getId());
 			if(Objects.isNull(classGroupStudentMapper)){
 			if(Objects.isNull(classGroupStudentMapper)){
 				classGroupStudentMapper=new ClassGroupStudentMapper(classGroup.getId(),user.getId().intValue());
 				classGroupStudentMapper=new ClassGroupStudentMapper(classGroup.getId(),user.getId().intValue());
 				classGroupStudentMapper.setGroupType(GroupType.VIP);
 				classGroupStudentMapper.setGroupType(GroupType.VIP);