Jelajahi Sumber

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

yonge 5 tahun lalu
induk
melakukan
19a5590552

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherAttendance.java

@@ -54,6 +54,17 @@ public class TeacherAttendance {
 	/**  */
 	private java.util.Date createTime;
 
+	public TeacherAttendance() {
+	}
+
+	public TeacherAttendance(Integer teacherId, String musicGroupId, Integer classGroupId, Long courseScheduleId, Date createTime) {
+		this.teacherId = teacherId;
+		this.musicGroupId = musicGroupId;
+		this.classGroupId = classGroupId;
+		this.courseScheduleId = courseScheduleId;
+		this.createTime = createTime;
+	}
+
 	public YesOrNoEnum getSignInStatus() {
 		return signInStatus;
 	}

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

@@ -315,7 +315,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                     CourseSchedule preCourseSchedule = allCourseSchedules.get(i-j);
                     //后面一节课程
                     CourseSchedule backCourseSchedule = allCourseSchedules.get(i);
-                    //判断前后两课是否存在冲突
+                    //判断前后两课是否存在冲突
                     if(backCourseSchedule.getStartClassTime().before(preCourseSchedule.getEndClassTime())){
                         //提示信息
                         StringBuffer errInfo = new StringBuffer("在");

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

@@ -753,14 +753,15 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		if(Objects.isNull(classGroup)){
 			throw new BizException("课程信息错误");
 		}
-		if(classGroup.getStudentNum()>=classGroup.getExpectStudentNum()){
-			throw new BizException("该课程人数已达上限");
-		}
 
 		StudentPaymentOrder byStudentVipGroup = studentPaymentOrderDao.findByStudentVipGroup(vipGroupBuyParams.getVipGroupId(),
 				user.getId(),
 				DealStatusEnum.ING.getCode());
 
+        if(classGroup.getStudentNum()>=classGroup.getExpectStudentNum()&&Objects.nonNull(byStudentVipGroup)){
+            throw new BizException("该课程人数已达上限");
+        }
+
 		if(Objects.nonNull(byStudentVipGroup)){
 			byStudentVipGroup.setStatus(DealStatusEnum.CLOSE);
 			studentPaymentOrderDao.update(byStudentVipGroup);

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

@@ -32,7 +32,7 @@
 		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
 		</selectKey>
 		-->
-		INSERT INTO student_vip_group_payment (id_,user_id_,vip_group_id_,class_group_id_,create_time_,student_payment_order_id_) VALUES(#{id},#{userId},#{vipGroupId},#{classGroupId},#{createTime},#{studentPaymentOrderId})
+		INSERT INTO student_vip_group_payment (id_,user_id_,vip_group_id_,class_group_id_,create_time_,student_payment_order_id_) VALUES(#{id},#{userId},#{vipGroupId},#{classGroupId},now(),#{studentPaymentOrderId})
 	</insert>
 	
 	<!-- 根据主键查询一条记录 -->