فهرست منبع

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

zouxuan 5 سال پیش
والد
کامیت
d7f55ce959

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -358,9 +358,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		calender.setStartPaymentDate(startTime);
 		calender.setDeadlinePaymentDate(endTime);
 		calender.setUpdateTime(date);
-		if (date.after(endTime)) {
+		if (endTime.before(date) && !DateUtil.isSameDay(date,endTime)) {
 			calender.setPaymentStatus(PaymentStatusEnum.YES);
-		} else if (date.after(startTime) || DateUtil.format(date,DateUtil.DEFAULT_PATTERN).equals(DateUtil.format(endTime,DateUtil.DEFAULT_PATTERN))) {
+		} else if (date.after(startTime) || DateUtil.isSameDay(date,endTime)) {
 			calender.setPaymentStatus(PaymentStatusEnum.OPEN);
 			//修改Fee缴费状态为未缴费
 			musicGroupStudentFeeDao.updatePaymentStatus(calender.getId(),"NON_PAYMENT");
@@ -476,4 +476,4 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 			}
 		}
 	}
-}
+}

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

@@ -1059,14 +1059,14 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			}
 		}
 
-//		ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId.longValue(), null);
-//
-//		if(classGroup.getStudentNum()>0&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
-//			int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.VIP);
-//			if(i<=0){
-//				throw new BizException("该课程已经无法通过购买加入,请联系教务老师!");
-//			}
-//		}
+		ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId.longValue(), null);
+
+		if(classGroup.getStudentNum()>0&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
+			int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.VIP);
+			if(i<=0){
+				throw new BizException("该课程已经无法通过购买加入,请联系教务老师!");
+			}
+		}
 
 		List<CourseSchedule> courseSchedules = JSON.parseArray(vipGroup.getCourseSchedulesJson(),CourseSchedule.class);
 		courseScheduleService.checkNewCourseSchedules(courseSchedules,false);
@@ -1181,12 +1181,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         VipGroup vipGroup = vipGroupDao.get(vipGroupBuyParams.getVipGroupId());
 
 
-//		if(classGroup.getStudentNum()>0&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
-//			int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupBuyParams.getVipGroupId().toString(), GroupType.VIP);
-//			if(i<=0){
-//				throw new BizException("该课程已经无法通过购买加入,请联系教务老师!");
-//			}
-//		}
+		if(classGroup.getStudentNum()>0&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
+			int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupBuyParams.getVipGroupId().toString(), GroupType.VIP);
+			if(i<=0){
+				throw new BizException("该课程已经无法通过购买加入,请联系教务老师!");
+			}
+		}
 
 		if(vipGroup.getPaymentExpireDate().before(date)){
 			throw new BizException("该课程已结束报名!");
@@ -2494,12 +2494,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
 
-//		if(classGroup.getStudentNum()>0&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
-//			int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.VIP);
-//			if(i>0){
-//				throw new BizException("已有学员购买了该课程组,无法添加,请走学员购买流程!");
-//			}
-//		}
+		if(classGroup.getStudentNum()>0&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
+			int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.VIP);
+			if(i>0){
+				throw new BizException("已有学员购买了该课程组,无法添加,请走学员购买流程!");
+			}
+		}
 
 		if(VipGroupStatusEnum.PAUSE.equals(vipGroup.getStatus())
 				||VipGroupStatusEnum.FINISHED.equals(vipGroup.getStatus())