Browse Source

修改推送
修改查询直播录像的房间类型

hgw 2 năm trước cách đây
mục cha
commit
4f20920d85

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

@@ -2,6 +2,7 @@ package com.ym.mec.biz.dal.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ym.mec.biz.dal.entity.ImLiveRoomVideo;
+import com.ym.mec.biz.dal.vo.ImLiveRoomVideoVo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -17,5 +18,7 @@ public interface ImLiveRoomVideoDao extends BaseMapper<ImLiveRoomVideo> {
     int insertBatch(@Param("entities") List<ImLiveRoomVideo> entities);
 
     ImLiveRoomVideo getLastRecord(@Param("roomId") String roomId, @Param("recordId") String recordId);
+
+    List<ImLiveRoomVideoVo> queryVideoList(@Param("roomUid") String roomUid);
 }
 

+ 3 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/vo/ImLiveBroadcastRoomDetailVo.java

@@ -1,6 +1,5 @@
 package com.ym.mec.biz.dal.vo;
 
-import com.ym.mec.biz.dal.entity.ImLiveRoomVideo;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
@@ -43,7 +42,7 @@ public class ImLiveBroadcastRoomDetailVo implements Serializable {
     @ApiModelProperty(value = "直播状态 0未开始 1开始 2已结束")
     private Integer liveState;
 
-    private List<ImLiveRoomVideo> videoList;
+    private List<ImLiveRoomVideoVo> videoList;
 
     public Date getLiveStartTime() {
         return liveStartTime;
@@ -125,11 +124,11 @@ public class ImLiveBroadcastRoomDetailVo implements Serializable {
         this.totalLiveTime = totalLiveTime;
     }
 
-    public List<ImLiveRoomVideo> getVideoList() {
+    public List<ImLiveRoomVideoVo> getVideoList() {
         return videoList;
     }
 
-    public void setVideoList(List<ImLiveRoomVideo> videoList) {
+    public void setVideoList(List<ImLiveRoomVideoVo> videoList) {
         this.videoList = videoList;
     }
 }

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/vo/ImLiveRoomVideoVo.java

@@ -0,0 +1,22 @@
+package com.ym.mec.biz.dal.vo;
+
+import com.ym.mec.biz.dal.entity.ImLiveRoomVideo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+@ApiModel(value = "im_live_room_video-直播视频记录参数返回")
+public class ImLiveRoomVideoVo extends ImLiveRoomVideo implements Serializable {
+
+    @ApiModelProperty(value = "播出端-  pc网页端 移动端mobile")
+    private String os;
+
+    public String getOs() {
+        return os;
+    }
+
+    public void setOs(String os) {
+        this.os = os;
+    }
+}

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/ImLiveRoomVideoService.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ym.mec.biz.dal.dao.ImLiveRoomVideoDao;
 import com.ym.mec.biz.dal.entity.ImLiveRoomVideo;
+import com.ym.mec.biz.dal.vo.ImLiveRoomVideoVo;
 
 import java.util.List;
 
@@ -16,6 +17,6 @@ public interface ImLiveRoomVideoService extends IService<ImLiveRoomVideo> {
 
     ImLiveRoomVideoDao getDao();
 
-    List<ImLiveRoomVideo> queryList(String roomUid);
+    List<ImLiveRoomVideoVo> queryList(String roomUid);
 }
 

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

@@ -1156,7 +1156,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
             log.error("sendRoomState error: teacherBaseUrl is null");
             return;
         }
-        teacherBaseUrl = "7?" + teacherBaseUrl;
+        teacherBaseUrl = "13?" + teacherBaseUrl;
         Map<Integer, String> pushMap = new HashMap<>();
         pushMap.put(user.getId(), user.getId().toString());
         String memo;

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

@@ -1,20 +1,16 @@
 package com.ym.mec.biz.service.impl;
 
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ym.mec.biz.dal.dao.ImLiveRoomVideoDao;
 import com.ym.mec.biz.dal.entity.ImLiveRoomVideo;
+import com.ym.mec.biz.dal.vo.ImLiveRoomVideoVo;
 import com.ym.mec.biz.service.ImLiveRoomVideoService;
-import com.ym.mec.common.page.PageInfo;
-import com.ym.mec.common.page.PageUtil;
 import com.ym.mec.common.page.WrapperUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
-import java.util.Map;
 
 /**
  * 直播视频记录(ImLiveRoomVideo)表服务实现类
@@ -32,13 +28,9 @@ public class ImLiveRoomVideoServiceImpl extends ServiceImpl<ImLiveRoomVideoDao,
         return this.baseMapper;
     }
 
-    public List<ImLiveRoomVideo> queryList(String roomUid) {
-        return baseMapper.selectList(new WrapperUtil<ImLiveRoomVideo>()
-                .hasEq("room_uid_",roomUid)
-                .hasEq("type",2).queryWrapper()
-        );
+    public List<ImLiveRoomVideoVo> queryList(String roomUid) {
+        return baseMapper.queryVideoList(roomUid);
     }
 
-
 }
 

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

@@ -27,8 +27,17 @@
             #{entity.endTime}, #{entity.type}, #{entity.createdTime})
         </foreach>
     </insert>
+
     <select id="getLastRecord" resultMap="BaseResultMap">
         SELECT * FROM im_live_room_video WHERE room_uid_ = #{roomId} AND record_id_ = #{recordId} ORDER BY id_ DESC LIMIT 1
     </select>
 
+    <select id="queryVideoList" parameterType="object" resultType="com.ym.mec.biz.dal.vo.ImLiveRoomVideoVo">
+        select a.*,b.os_ as os
+        from im_live_room_video a
+                 left join im_live_broadcast_room b on a.room_uid_ = b.room_uid_
+        where a.room_uid_ = #{roomUid}
+          and a.type = 2
+    </select>
+
 </mapper>

+ 2 - 1
mec-student/src/main/java/com/ym/mec/student/controller/ImLiveRoomVideoController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.student.controller;
 
 import com.ym.mec.biz.dal.entity.ImLiveRoomVideo;
+import com.ym.mec.biz.dal.vo.ImLiveRoomVideoVo;
 import com.ym.mec.biz.service.ImLiveRoomVideoService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
@@ -26,7 +27,7 @@ public class ImLiveRoomVideoController extends BaseController {
 
     @ApiOperation("查询该机构目前推广的直播间")
     @GetMapping(value = "/queryList")
-    public HttpResponseResult<List<ImLiveRoomVideo>> queryList(String roomUid) {
+    public HttpResponseResult<List<ImLiveRoomVideoVo>> queryList(String roomUid) {
         return succeed(imLiveRoomVideoService.queryList(roomUid));
     }
 }

+ 2 - 1
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherImLiveRoomVideoController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.teacher.controller;
 
 import com.ym.mec.biz.dal.entity.ImLiveRoomVideo;
+import com.ym.mec.biz.dal.vo.ImLiveRoomVideoVo;
 import com.ym.mec.biz.service.ImLiveRoomVideoService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
@@ -26,7 +27,7 @@ public class TeacherImLiveRoomVideoController extends BaseController {
 
     @ApiOperation("查询该机构目前推广的直播间")
     @GetMapping(value = "/queryList")
-    public HttpResponseResult<List<ImLiveRoomVideo>> queryList(String roomUid) {
+    public HttpResponseResult<List<ImLiveRoomVideoVo>> queryList(String roomUid) {
         return succeed(imLiveRoomVideoService.queryList(roomUid));
     }
 }