瀏覽代碼

Merge remote-tracking branch 'origin/feature/0529-live' into feature/0529-live

zouxuan 2 年之前
父節點
當前提交
f828eabadd
共有 18 個文件被更改,包括 246 次插入39 次删除
  1. 9 18
      .idea/httpRequests/http-requests-log.http
  2. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ImLiveRoomVideoDao.java
  3. 25 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseScheduleDto.java
  4. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseScheduleStudentDto.java
  5. 22 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ImLiveBroadcastRoomDto.java
  6. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentCourseScheduleRecordDto.java
  7. 12 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/vo/ImLiveBroadcastRoomVo.java
  8. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleService.java
  9. 95 13
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  10. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImLiveBroadcastRoomServiceImpl.java
  11. 10 5
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  12. 4 0
      mec-biz/src/main/resources/config/mybatis/ImLiveBroadcastRoomMapper.xml
  13. 3 0
      mec-biz/src/main/resources/config/mybatis/ImLiveRoomReservationMapper.xml
  14. 7 0
      mec-biz/src/main/resources/config/mybatis/ImLiveRoomVideoMapper.xml
  15. 5 1
      mec-student/src/main/java/com/ym/mec/student/controller/CourseController.java
  16. 1 0
      mec-student/src/main/java/com/ym/mec/student/controller/ImLiveRoomReservationController.java
  17. 5 2
      mec-web/src/main/java/com/ym/mec/web/controller/SysEmployeePositionController.java
  18. 8 0
      mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

+ 9 - 18
.idea/httpRequests/http-requests-log.http

@@ -1,3 +1,12 @@
+GET http://127.0.0.1:8005/task/liveCourseRemind
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-07T141437.200.json
+
+###
+
 GET http://127.0.0.1:8005/teacher/findTeacherByTenantId
 Authorization: bearer 7e4145d6-111d-429b-893a-4546df0f58ed
 tenantId: 1
@@ -791,21 +800,3 @@ Accept-Encoding: br,deflate,gzip,x-gzip
 
 ###
 
-POST http://127.0.0.1:8005/studentManage/userDetail
-Authorization: bearer 81d0c352-fcc8-4812-87f5-0f7a68d10451
-Content-Type: application/json
-coopId: 1
-Content-Length: 63
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "studentId": 2248340,
-  "musicGroupId": 23042419330600001
-}
-
-<> 2023-06-01T160136.200.json
-
-###
-

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ImLiveRoomVideoDao.java

@@ -20,5 +20,7 @@ public interface ImLiveRoomVideoDao extends BaseMapper<ImLiveRoomVideo> {
     ImLiveRoomVideo getLastRecord(@Param("roomId") String roomId, @Param("recordId") String recordId);
 
     List<ImLiveRoomVideoVo> queryVideoList(@Param("roomUid") String roomUid);
+
+    List<ImLiveRoomVideoVo> queryByRoomIds(@Param("roomIds") List<String> roomIds);
 }
 

+ 25 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseScheduleDto.java

@@ -105,6 +105,31 @@ public class CourseScheduleDto extends CourseSchedule {
     @ApiModelProperty("直播客户端")
     private String os;
 
+
+    @ApiModelProperty(value = "房间号")
+    private String  liveRoomId;
+
+    @ApiModelProperty(value = "是否有视频回放")
+    private Boolean  hasVideoRecord;
+
+    @Override
+    public String getLiveRoomId() {
+        return liveRoomId;
+    }
+
+    @Override
+    public void setLiveRoomId(String liveRoomId) {
+        this.liveRoomId = liveRoomId;
+    }
+
+    public Boolean getHasVideoRecord() {
+        return hasVideoRecord;
+    }
+
+    public void setHasVideoRecord(Boolean hasVideoRecord) {
+        this.hasVideoRecord = hasVideoRecord;
+    }
+
     public int getEnableAssignHomework() {
         return enableAssignHomework;
     }

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseScheduleStudentDto.java

@@ -47,6 +47,29 @@ public class CourseScheduleStudentDto{
     @ApiModelProperty(value = "是否达标")
     private Integer qualifiedFlag;
 
+
+    @ApiModelProperty(value = "房间号")
+    private String  liveRoomId;
+
+    @ApiModelProperty(value = "是否有视频回放")
+    private Boolean  hasVideoRecord;
+
+    public String getLiveRoomId() {
+        return liveRoomId;
+    }
+
+    public void setLiveRoomId(String liveRoomId) {
+        this.liveRoomId = liveRoomId;
+    }
+
+    public Boolean getHasVideoRecord() {
+        return hasVideoRecord;
+    }
+
+    public void setHasVideoRecord(Boolean hasVideoRecord) {
+        this.hasVideoRecord = hasVideoRecord;
+    }
+
     public Integer getQualifiedFlag() {
         return qualifiedFlag;
     }

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ImLiveBroadcastRoomDto.java

@@ -23,6 +23,12 @@ public class ImLiveBroadcastRoomDto implements Serializable {
     @ApiModelProperty(value = "主键")
     private Integer id;
 
+    @ApiModelProperty(value = "房间号")
+    private String  liveRoomId;
+
+    @ApiModelProperty(value = "是否有视频回放")
+    private Boolean  hasVideoRecord;
+
     @ApiModelProperty(value = "机构id")
     private Integer tenantId;
 
@@ -160,6 +166,22 @@ public class ImLiveBroadcastRoomDto implements Serializable {
         }
     }
 
+    public String getLiveRoomId() {
+        return liveRoomId;
+    }
+
+    public void setLiveRoomId(String liveRoomId) {
+        this.liveRoomId = liveRoomId;
+    }
+
+    public Boolean getHasVideoRecord() {
+        return hasVideoRecord;
+    }
+
+    public void setHasVideoRecord(Boolean hasVideoRecord) {
+        this.hasVideoRecord = hasVideoRecord;
+    }
+
     public EUseScene getUseScene() {
         return useScene;
     }

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

@@ -70,9 +70,20 @@ public class StudentCourseScheduleRecordDto {
     @ApiModelProperty("教学要点")
     private String teachingPoint;
 
+    @ApiModelProperty("直播房间号")
+    private String  liveRoomId;
+
     @ApiModelProperty("直播课回放记录")
     private Boolean hasVideoRecord;
 
+    public String getLiveRoomId() {
+        return liveRoomId;
+    }
+
+    public void setLiveRoomId(String liveRoomId) {
+        this.liveRoomId = liveRoomId;
+    }
+
     public Integer getQualifiedFlag() {
         return qualifiedFlag;
     }

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/vo/ImLiveBroadcastRoomVo.java

@@ -146,6 +146,18 @@ public class ImLiveBroadcastRoomVo implements Serializable {
     @ApiModelProperty("声部ID")
     private Integer subjectId;
 
+
+    @ApiModelProperty("直播类型 NORMAL:普通直播  LIVE:直播课直播")
+    private String  groupType;
+
+    public String getGroupType() {
+        return groupType;
+    }
+
+    public void setGroupType(String groupType) {
+        this.groupType = groupType;
+    }
+
     public Integer getSubjectId() {
         return subjectId;
     }

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

@@ -769,4 +769,6 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
      *
      */
     Boolean teachingPointCourse(TeachingPointWrapper.TeachingPoint teachingPoint);
+
+    List<CourseScheduleStudentDto> queryDetailList(CourseDetailQueryInfo courseDetailQueryInfo);
 }

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

@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.google.common.collect.Maps;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.*;
@@ -15,6 +14,7 @@ import com.ym.mec.biz.dal.mapper.CourseSchedulePlusMapper;
 import com.ym.mec.biz.dal.page.*;
 import com.ym.mec.biz.dal.school.dto.ClassesForDayDto;
 import com.ym.mec.biz.dal.school.dto.CourseStudentDto;
+import com.ym.mec.biz.dal.vo.ImLiveRoomVideoVo;
 import com.ym.mec.biz.dal.wrapper.DailySummaryOfClassesForTheCurrentSemesterWrapper;
 import com.ym.mec.biz.dal.wrapper.TeachingPointWrapper;
 import com.ym.mec.biz.event.source.CourseEventSource;
@@ -23,7 +23,6 @@ import com.ym.mec.biz.service.*;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.entity.HttpResponseResult;
-import com.ym.mec.common.entity.ImGroupMember;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
@@ -42,7 +41,6 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.ListUtils;
 import org.apache.commons.collections.MapUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.jetbrains.annotations.NotNull;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
@@ -56,13 +54,11 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import java.lang.reflect.InvocationTargetException;
 import java.math.BigDecimal;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.time.*;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.TemporalAdjusters;
 import java.util.*;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 import static com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType.MUSIC_NETWORK;
 import static com.ym.mec.biz.dal.enums.GroupType.*;
@@ -189,6 +185,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
     @Autowired
     private LessonExaminationService lessonExaminationService;
 
+    @Autowired
+    private ImLiveRoomVideoDao imLiveRoomVideoDao;
+
     private final Logger businessLogger = LoggerFactory
             .getLogger(this.getClass());
 
@@ -1081,10 +1080,35 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 						|| cs.getType().equals(CourseScheduleType.COMM))
                 .map(CourseScheduleDto::getId).collect(Collectors.toList());
 
-		// 直播课设置直播间信息
-		Map<String, ImLiveBroadcastRoomDto> liveRoomMap = getLiveRoomMap(studentCourseSchedulesWithDate);
+        courseDataFormat(user, now, studentCourseSchedulesWithDate, courseScheduleIds);
+        result.put("list", studentCourseSchedulesWithDate);
+        return result;
+    }
 
-		Map<Integer, String> subjectNameCourseMap = new HashMap<>();
+    private void courseDataFormat(SysUser user, Date now, List<CourseScheduleDto> studentCourseSchedulesWithDate, List<Long> courseScheduleIds) {
+        // 直播课设置直播间信息
+        Map<String, ImLiveBroadcastRoomDto> liveRoomMap = getLiveRoomMap(studentCourseSchedulesWithDate);
+
+        // 直播间记录回放记录
+
+        // 直播间房间号集合
+        List<String> roomIds = studentCourseSchedulesWithDate.stream()
+                .filter(cs -> cs.getType().equals(CourseSchedule.CourseScheduleType.LIVE))
+                .map(CourseScheduleDto::getLiveRoomId).collect(Collectors.toList());
+
+        Map<String, List<ImLiveRoomVideoVo>> imLiveRoomVideoVoMap = getLiveRecord(roomIds);
+
+        for (CourseScheduleDto courseScheduleDto : studentCourseSchedulesWithDate) {
+            if (StringUtils.isNotEmpty(courseScheduleDto.getLiveRoomId())) {
+                List<ImLiveRoomVideoVo> imLiveRoomVideoVoList = imLiveRoomVideoVoMap.get(courseScheduleDto.getLiveRoomId());
+                if (CollectionUtils.isNotEmpty(imLiveRoomVideoVoList)) {
+                    courseScheduleDto.setHasVideoRecord(true);
+                    continue;
+                }
+                courseScheduleDto.setHasVideoRecord(false);
+            }
+        }
+        Map<Integer, String> subjectNameCourseMap = new HashMap<>();
         Map<Integer, String> subjectIdCourseMap = new HashMap<>();
         Map<Integer, Integer> reviewIdMap = new HashMap<>();
         Map<Long, Long> StudentReviewIdMap = new HashMap<>();
@@ -1100,9 +1124,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 			StudentReviewIdMap = studentReviews.stream().collect(Collectors.toMap(CourseScheduleComplaints::getCourseScheduleId, CourseScheduleComplaints::getId));
 		}
 
-		Set<Long> practiceGroupIds = studentCourseSchedulesWithDate.stream().filter(cs -> CourseScheduleType.PRACTICE.equals(cs.getType())&&Objects.nonNull(cs.getMusicGroupId())).map(cs->Long.valueOf(cs.getMusicGroupId())).collect(Collectors.toSet());
+        Set<Long> practiceGroupIds = studentCourseSchedulesWithDate.stream().filter(cs -> CourseScheduleType.PRACTICE.equals(cs.getType())&&Objects.nonNull(cs.getMusicGroupId())).map(cs->Long.valueOf(cs.getMusicGroupId())).collect(Collectors.toSet());
 
-		Map<Long, PracticeGroupType> practiceGroupTypeMap = new HashMap<>();
+        Map<Long, PracticeGroupType> practiceGroupTypeMap = new HashMap<>();
         if(!CollectionUtils.isEmpty(practiceGroupIds)){
 			List<PracticeCourseDto> practiceGroups = practiceGroupDao.getPracticeGroupByIds(new ArrayList<>(practiceGroupIds));
 			practiceGroupTypeMap = practiceGroups.stream().collect(Collectors.toMap(PracticeCourseDto::getId, PracticeCourseDto::getType));
@@ -1130,11 +1154,22 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				courseScheduleDto.setOs(courseScheduleDto.getLiveBroadcastRoom().getOs());
 			}
         }
-        result.put("list", studentCourseSchedulesWithDate);
-        return result;
     }
 
-	/**
+    private Map<String, List<ImLiveRoomVideoVo>> getLiveRecord(List<String> roomIds) {
+
+        if (CollectionUtils.isEmpty(roomIds)) {
+            return new HashMap<>();
+        }
+        List<ImLiveRoomVideoVo> imLiveRoomVideoVos = imLiveRoomVideoDao.queryByRoomIds(roomIds);
+        if (CollectionUtils.isEmpty(imLiveRoomVideoVos)) {
+            return new HashMap<>();
+        }
+        return imLiveRoomVideoVos.stream().collect(Collectors.groupingBy(ImLiveRoomVideoVo::getRoomUid));
+
+    }
+
+    /**
 	 * 直播课设置直播间信息
 	 * @param studentCourseSchedulesWithDate List<CourseScheduleDto>
 	 * @return Map<String, ImLiveBroadcastRoomDto>
@@ -3458,6 +3493,20 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                     e.setRestOfClass(notStartRecords.size());
                 });
             }
+
+            // 直播房间号ID
+            List<String> liveRoomIds = notStartRecords.stream().map(e -> e.getLiveRoomId()).filter(Objects::nonNull).collect(Collectors.toList());
+
+            Map<String, List<ImLiveRoomVideoVo>> imLiveRoomVideoVoMap = getLiveRecord(liveRoomIds);
+            notStartRecords.forEach(e -> {
+                if (imLiveRoomVideoVoMap != null && imLiveRoomVideoVoMap.containsKey(e.getLiveRoomId())) {
+                    e.setHasVideoRecord(true);
+                } else {
+                    e.setHasVideoRecord(false);
+                }
+            });
+
+
             pageInfo.setRows(notStartRecords);
             return pageInfo;
         }
@@ -3474,6 +3523,19 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
             pageInfo.setTotal(count);
             params.put("offset", pageInfo.getOffset());
             dataList = courseScheduleDao.findStudentCourseScheduleRecords(params);
+
+            // 直播房间号ID
+            List<String> liveRoomIds = dataList.stream().map(e -> e.getLiveRoomId()).filter(Objects::nonNull).collect(Collectors.toList());
+
+            Map<String, List<ImLiveRoomVideoVo>> imLiveRoomVideoVoMap = getLiveRecord(liveRoomIds);
+            dataList.forEach(e -> {
+                if (imLiveRoomVideoVoMap != null && imLiveRoomVideoVoMap.containsKey(e.getLiveRoomId())) {
+                    e.setHasVideoRecord(true);
+                } else {
+                    e.setHasVideoRecord(false);
+                }
+            });
+
         }
         if (count == 0) {
             dataList = new ArrayList<>();
@@ -5758,6 +5820,26 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
     }
 
     @Override
+    public List<CourseScheduleStudentDto> queryDetailList(CourseDetailQueryInfo courseDetailQueryInfo) {
+        List<CourseScheduleStudentDto> courseScheduleStudentDtos = courseScheduleDao.queryDetailList(courseDetailQueryInfo);
+
+
+        // 直播房间号ID
+        List<String> liveRoomIds = courseScheduleStudentDtos.stream().map(e -> e.getLiveRoomId()).filter(Objects::nonNull).collect(Collectors.toList());
+
+        Map<String, List<ImLiveRoomVideoVo>> imLiveRoomVideoVoMap = getLiveRecord(liveRoomIds);
+        courseScheduleStudentDtos.forEach(e -> {
+            if (imLiveRoomVideoVoMap != null && imLiveRoomVideoVoMap.containsKey(e.getLiveRoomId())) {
+                e.setHasVideoRecord(true);
+            } else {
+                e.setHasVideoRecord(false);
+            }
+        });
+
+        return courseScheduleStudentDtos;
+    }
+
+    @Override
 	public List<CourseStudentDto> queryCourseStudentList(Long courseId) {
 		List<CourseStudentDto> courseStudentDtos = studentAttendanceDao.queryCourseStudentList(courseId);
 		if(CollectionUtils.isNotEmpty(courseStudentDtos)){

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

@@ -366,9 +366,11 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         if (StringUtils.isNotBlank(os) && os.toUpperCase(Locale.ROOT).equals("TEACHER")) {
             param.put("speakerId", getSysUser().getId());
             param.put("clientType", SysUserType.TEACHER.getCode());
+            param.put("groupType", "NORMAL");
         } else if (StringUtils.isNotBlank(os) && os.toUpperCase(Locale.ROOT).equals("EDUCATION")) {
             param.put("clientType", SysUserType.EDUCATION.getCode());
             param.put("speakerId", getSysUser().getId());
+            param.put("groupType", "NORMAL");
         }
         Page<ImLiveBroadcastRoomVo> pageInfo = PageUtil.concatTimePage(param, "startTime", "endTime");
         // pageInfo.setDesc("a.created_time_");

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

@@ -119,6 +119,7 @@
         <result column="qualified_flag_" property="qualifiedFlag" />
         <result column="teaching_content_" property="teachingContent" />
         <result column="teaching_point_" property="teachingPoint" />
+        <result column="live_room_id_" property="liveRoomId" />
     </resultMap>
 
     <resultMap type="com.ym.mec.biz.dal.dto.StudentCourseInfoDto" id="StudentCourseInfoDto">
@@ -692,7 +693,8 @@
             csc.id_ IS NOT NULL complaint_status_,
             cs.teach_mode_,
             cs.new_course_id_,
-            cs.group_type_
+            cs.group_type_,
+        cs.live_room_id_
         FROM
             course_schedule_student_payment cssp
             LEFT JOIN course_schedule cs ON cssp.course_schedule_id_=cs.id_
@@ -1165,7 +1167,8 @@
         cs.teaching_content_,
         cs.teaching_point_,
         s.name_ school_name_,
-        sa.qualified_flag_
+        sa.qualified_flag_,
+        cs.live_room_id_
         FROM course_schedule_student_payment cssp
         LEFT JOIN student_attendance sa ON cssp.course_schedule_id_ = sa.course_schedule_id_ AND cssp.user_id_ =
         sa.user_id_
@@ -1200,6 +1203,7 @@
                cs.class_group_id_,
                cs.teaching_content_,
                cs.teaching_point_,
+        cs.live_room_id_,
         		s.name_ school_name_
         FROM course_schedule_student_payment cssp
         LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_
@@ -4131,11 +4135,12 @@
         <result property="teacherName" column="real_name_"/>
         <result property="schoolName" column="schoolName"/>
         <result property="qualifiedFlag" column="qualified_flag_"/>
+        <result property="liveRoomId" column="live_room_id_"/>
     </resultMap>
     <select id="queryDetailList" resultMap="CourseScheduleStudentDto">
         select cssp.course_schedule_id_,cs.class_date_,CONCAT(cs.class_date_," ",cs.start_class_time_) start_class_time_,CONCAT(cs.class_date_," ",cs.end_class_time_) end_class_time_,
                CASE WHEN sa.status_ IS NULL OR sa.status_ = '' THEN 'TRUANT' ELSE sa.status_ END attendanceStatus,cs.status_ courseStatus,
-               cs.group_type_,cs.teach_mode_,cs.name_ courseName,su.avatar_,su.real_name_,co.name_ schoolName,sa.qualified_flag_
+               cs.group_type_,cs.teach_mode_,cs.name_ courseName,su.avatar_,su.real_name_,co.name_ schoolName,sa.qualified_flag_,cs.live_room_id_
         from course_schedule_student_payment cssp
         left join course_schedule cs ON cs.id_ = cssp.course_schedule_id_
         left join sys_user su on cs.actual_teacher_id_ = su.id_
@@ -4328,8 +4333,8 @@
           and cs.live_remind_ = 0
           and cs.type_ = 'LIVE'
           and cs.class_date_ = date_format(now(),'%Y-%m-%d')
-          and CONCAT(class_date_,' ',start_class_time_)  &gt;= date_format(date_add(now(),interval -#{minutes} minute),'%Y-%m-%d %H:%i:%s')
-          and CONCAT(class_date_,' ',start_class_time_)  &lt;= date_format(now(),'%Y-%m-%d %H:%i:%s')
+          and CONCAT(class_date_,' ',start_class_time_)  &lt;= date_format(date_add(now(),interval #{minutes} minute),'%Y-%m-%d %H:%i:%s')
+          and CONCAT(class_date_,' ',start_class_time_)  &gt;= date_format(now(),'%Y-%m-%d %H:%i:%s')
     </select>
 
     <update id="updateRemindStatus">

+ 4 - 0
mec-biz/src/main/resources/config/mybatis/ImLiveBroadcastRoomMapper.xml

@@ -68,6 +68,7 @@
         a.view_mode_ AS viewMode,
         a.shopping_title_ AS shoppingTitle,
         a.use_scene_ as useScene,
+        a.group_type_ as groupType,
         a.subject_id_ as subjectId
         from im_live_broadcast_room as a
         left join tenant_info AS t on a.tenant_id_ = t.id_
@@ -109,6 +110,9 @@
             <if test="param.clientType != null and param.clientType != ''">
                 and  a.client_type_ = #{param.clientType}
             </if>
+            <if test="param.groupType !=null">
+                and a.group_type_ = #{param.groupType}
+            </if>
         </where>
         order by
         <choose>

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/ImLiveRoomReservationMapper.xml

@@ -83,6 +83,9 @@
             <if test="param.roomUid != null">
                 and a.room_uid_ = #{param.roomUid}
             </if>
+            <if test="param.groupType != null">
+                and a.group_type_ = #{param.groupType}
+            </if>
         </where>
     </select>
 

+ 7 - 0
mec-biz/src/main/resources/config/mybatis/ImLiveRoomVideoMapper.xml

@@ -40,4 +40,11 @@
           and a.type = 2
     </select>
 
+    <select id="queryByRoomIds" resultType="com.ym.mec.biz.dal.vo.ImLiveRoomVideoVo">
+        select * from im_live_room_video
+        where room_uid_ in
+        <foreach collection="roomIds" item="roomId" open="(" separator="," close=")">
+            #{roomId}
+        </foreach>
+    </select>
 </mapper>

+ 5 - 1
mec-student/src/main/java/com/ym/mec/student/controller/CourseController.java

@@ -6,6 +6,7 @@ import com.ym.mec.biz.dal.page.CourseDetailQueryInfo;
 import com.ym.mec.biz.dal.page.ImGroupNoticeQueryInfo;
 import com.ym.mec.biz.dal.page.StudentPayLogQueryInfo;
 import com.ym.mec.biz.service.ClassGroupService;
+import com.ym.mec.biz.service.CourseScheduleService;
 import com.ym.mec.biz.service.ImGroupNoticeService;
 import com.ym.mec.biz.service.SysUserService;
 import com.ym.mec.common.controller.BaseController;
@@ -33,6 +34,9 @@ public class CourseController extends BaseController {
     @Autowired
     private CourseScheduleDao courseScheduleDao;
 
+    @Autowired
+    private CourseScheduleService courseScheduleService;
+
     @ApiOperation("获取学生所购买课程列表")
     @GetMapping(value = "/queryUserMusicGroups")
     public HttpResponseResult<PageInfo<CourseListDto>> queryCoursePage(UserMusicGroupQueryInfo queryInfo){
@@ -87,6 +91,6 @@ public class CourseController extends BaseController {
     @PostMapping("/queryDetailList")
     public HttpResponseResult<List<CourseScheduleStudentDto>> queryDetailList(@RequestBody CourseDetailQueryInfo courseDetailQueryInfo){
         courseDetailQueryInfo.setUserId(sysUserService.getUserId());
-        return succeed(courseScheduleDao.queryDetailList(courseDetailQueryInfo));
+        return succeed(courseScheduleService.queryDetailList(courseDetailQueryInfo));
     }
 }

+ 1 - 0
mec-student/src/main/java/com/ym/mec/student/controller/ImLiveRoomReservationController.java

@@ -64,6 +64,7 @@ public class ImLiveRoomReservationController extends BaseController {
     @ApiOperation("学生端-分页查询直播间")
     @PostMapping("/queryPageStudent")
     public HttpResponseResult<PageInfo<ImLiveBroadcastRoomVo>> queryPageStudent(@RequestBody Map<String, Object> param) {
+        param.put("groupType","NORMAL");
         return succeed(imLiveRoomReservationService.queryPageStudent(param));
     }
 

+ 5 - 2
mec-web/src/main/java/com/ym/mec/web/controller/SysEmployeePositionController.java

@@ -26,10 +26,13 @@ public class SysEmployeePositionController extends BaseController {
     @ApiOperation(value = "获取分部下员工职位列表")
     @GetMapping("/findOrganPosition")
     @PreAuthorize("@pcs.hasPermissions('employeePosition/findOrganPosition')")
-    public Object findAll(String id) throws Exception {
-        if(StringUtils.isEmpty(id)){
+    public Object findAll(String id,Boolean all) throws Exception {
+        if(StringUtils.isEmpty(id) || all == null || Boolean.TRUE.equals(!all)){
             id = organizationService.getEmployeeOrgan(id);
         }
+        if (Boolean.TRUE.equals(all)) {
+            id = null;
+        }
         Integer tenantId = TenantContextHolder.getTenantId();
         return succeed(employeePositionService.findOrganPosition(id, tenantId));
     }

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -665,4 +665,12 @@ public class TaskController extends BaseController {
         vipGroupService.liveCourseRemind();
         return succeed();
     }
+
+
+    @ApiOperation("关闭直播课房间")
+    @GetMapping("/closeLiveCourseRoom")
+    public Object closeLiveCourseRoom() {
+//        vipGroupService.closeLiveCourseRoom();
+        return succeed();
+    }
 }