浏览代码

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

yonge 2 年之前
父节点
当前提交
d49480d84a

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

@@ -1876,6 +1876,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		if (CollectionUtils.isEmpty(courseSchedules)) {
 		if (CollectionUtils.isEmpty(courseSchedules)) {
 			return false;
 			return false;
 		}
 		}
+		//直播课不校验冲突
+		if(courseSchedules.get(0).getGroupType() == LIVE){
+			return true;
+		}
 		List<String> classDates = courseSchedules.stream().map(courseSchedule -> DateUtil.dateToString(courseSchedule.getClassDate(), "yyyy-MM-dd"))
 		List<String> classDates = courseSchedules.stream().map(courseSchedule -> DateUtil.dateToString(courseSchedule.getClassDate(), "yyyy-MM-dd"))
 				.collect(Collectors.toList());
 				.collect(Collectors.toList());
 
 
@@ -3516,11 +3520,14 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		}
 		}
 
 
 		if(newCourseSchedules.size() > 0){
 		if(newCourseSchedules.size() > 0){
-			courseScheduleDao.batchUpdate(newCourseSchedules);
-			List<Integer> classGroupIds = newCourseSchedules.stream().filter(courseSchedule -> Objects.nonNull(courseSchedule.getClassGroupId())).map(CourseSchedule::getClassGroupId).collect(Collectors.toList());
-			if(!CollectionUtils.isEmpty(classGroupIds)){
-				classGroupService.updateClassGroupsCourseInfo(classGroupIds);
-			}
+            for (CourseSchedule course : newCourseSchedules) {
+                course.setLiveRemind(0);
+            }
+            courseScheduleDao.batchUpdate(newCourseSchedules);
+            List<Integer> classGroupIds = newCourseSchedules.stream().filter(courseSchedule -> Objects.nonNull(courseSchedule.getClassGroupId())).map(CourseSchedule::getClassGroupId).collect(Collectors.toList());
+            if(!CollectionUtils.isEmpty(classGroupIds)){
+                classGroupService.updateClassGroupsCourseInfo(classGroupIds);
+            }
 			courseScheduleModifyLogService.pushSchoolCourseChange(newCourseSchedules.get(0));
 			courseScheduleModifyLogService.pushSchoolCourseChange(newCourseSchedules.get(0));
 		}
 		}
 
 
@@ -6479,7 +6486,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 					CourseSchedule next = beforeCourse.get(i + 1);
 					CourseSchedule next = beforeCourse.get(i + 1);
 
 
 					if (!next.getContinuousCourse()) {
 					if (!next.getContinuousCourse()) {
-						newCourseSchedules.add(next);
+						//newCourseSchedules.add(next);
 						break;
 						break;
 					}
 					}
 				}
 				}

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

@@ -5131,10 +5131,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 
         DateTime time = DateTime.parse(liveStartTime, DateTimeFormat.forPattern(DateUtil.DEFAULT_PATTERN + " " + DateUtil.EXPANDED_TIME_FORMAT));
         DateTime time = DateTime.parse(liveStartTime, DateTimeFormat.forPattern(DateUtil.DEFAULT_PATTERN + " " + DateUtil.EXPANDED_TIME_FORMAT));
 
 
-        String roomUid = "LIVE-" + roomId + "-" + time.toDate().getTime();
+        String roomUid = "LIVE-" + roomId + "-" + courseSchedule.getActualTeacherId().toString() + time.toDate().getTime();
         ImLiveBroadcastRoom room = imLiveBroadcastRoomService.getByRoomUid(roomUid);
         ImLiveBroadcastRoom room = imLiveBroadcastRoomService.getByRoomUid(roomUid);
         if (Objects.nonNull(room)) {
         if (Objects.nonNull(room)) {
-            return;
+            liveRoom.setId(room.getId());
         }
         }
         liveRoom.setTenantId(TenantContextHolder.getTenantId());
         liveRoom.setTenantId(TenantContextHolder.getTenantId());
         liveRoom.setRoomUid(roomUid);
         liveRoom.setRoomUid(roomUid);
@@ -5149,7 +5149,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         liveRoom.setTenantId(courseSchedule.getTenantId());
         liveRoom.setTenantId(courseSchedule.getTenantId());
 
 
         // 创建直播间
         // 创建直播间
-        imLiveBroadcastRoomService.save(liveRoom);
+        imLiveBroadcastRoomService.saveOrUpdate(liveRoom);
 
 
         // 开启直播间
         // 开启直播间
         try {
         try {

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

@@ -1913,7 +1913,7 @@
         )
         )
         and cs.tenant_id_ = #{tenantId}
         and cs.tenant_id_ = #{tenantId}
         AND (cs.del_flag_ IS NULL OR cs.del_flag_=0)
         AND (cs.del_flag_ IS NULL OR cs.del_flag_=0)
-        AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_)
+        AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_) AND cs.group_type_ != 'LIVE'
     </select>
     </select>
 
 
     <select id="queryStudentCoursesTimesOfTomorrow" resultMap="Mapper">
     <select id="queryStudentCoursesTimesOfTomorrow" resultMap="Mapper">

+ 6 - 3
mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java

@@ -400,11 +400,14 @@ public class RoomServiceImpl implements RoomService {
 
 
         DateTime time = DateTime.parse(liveStartTime, DateTimeFormat.forPattern(DateUtil.DEFAULT_PATTERN + " " + DateUtil.EXPANDED_TIME_FORMAT));
         DateTime time = DateTime.parse(liveStartTime, DateTimeFormat.forPattern(DateUtil.DEFAULT_PATTERN + " " + DateUtil.EXPANDED_TIME_FORMAT));
 
 
-        String roomUid = "LIVE-" + roomId + "-" + time.toDate().getTime();
+        String roomUid = "LIVE-" + roomId + "-" + courseSchedule.getActualTeacherId().toString() + time.toDate().getTime();
         ImLiveBroadcastRoom liveRoom = JSON.parseObject(vipGroup.getLiveConfigJson(), ImLiveBroadcastRoom.class);
         ImLiveBroadcastRoom liveRoom = JSON.parseObject(vipGroup.getLiveConfigJson(), ImLiveBroadcastRoom.class);
 
 
         try {
         try {
-
+            ImLiveBroadcastRoom room = imLiveBroadcastRoomService.getByRoomUid(roomUid);
+            if (Objects.nonNull(room)) {
+                liveRoom.setId(room.getId());
+            }
 
 
             if (StringUtils.isBlank(liveRoom.getServiceProvider())) {
             if (StringUtils.isBlank(liveRoom.getServiceProvider())) {
                 //查询房间过期时间
                 //查询房间过期时间
@@ -424,7 +427,7 @@ public class RoomServiceImpl implements RoomService {
             liveRoom.setTenantId(courseSchedule.getTenantId());
             liveRoom.setTenantId(courseSchedule.getTenantId());
 
 
             // 创建直播间
             // 创建直播间
-            imLiveBroadcastRoomService.save(liveRoom);
+            imLiveBroadcastRoomService.saveOrUpdate(liveRoom);
 
 
             // 开启直播间
             // 开启直播间
             imLiveBroadcastRoomService.createLiveRoom(liveRoom);
             imLiveBroadcastRoomService.createLiveRoom(liveRoom);

+ 6 - 0
pom.xml

@@ -244,11 +244,17 @@
 			<id>anigiomaven</id>
 			<id>anigiomaven</id>
 			<name>AnigioMaven</name>
 			<name>AnigioMaven</name>
 			<url>https://mvn.dayaedu.com/repository/maven-public/</url>
 			<url>https://mvn.dayaedu.com/repository/maven-public/</url>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
 		</repository>
 		</repository>
 		<repository>
 		<repository>
 			<id>alimaven</id>
 			<id>alimaven</id>
 			<name>aliyun maven</name>
 			<name>aliyun maven</name>
 			<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
 			<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
 		</repository>
 		</repository>
 
 
 		<repository>
 		<repository>