浏览代码

Merge branch 'dev_20230222_live' into master_saas

Eric 2 年之前
父节点
当前提交
ff2e1b9edd

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

@@ -143,6 +143,11 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
             //老师端
             return teacherQueryRoomAndCheck(roomUid, sysUser);
         }
+
+        // 校验直播间是否存在
+        Optional.ofNullable(roomUid).map(this::queryRoomInfo)
+                .orElseThrow(() -> new BizException("直播间不存在"));
+
         return queryRoomAndCheck(roomUid, sysUser);
     }
 

+ 15 - 2
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherImLiveBroadcastRoomController.java

@@ -67,10 +67,23 @@ public class TeacherImLiveBroadcastRoomController extends BaseController {
     }
 
     @ApiOperation("查询房间信息并校验房间是否合规")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "roomUid", dataType = "String", value = "房间uid", required = true),
+            @ApiImplicitParam(name = "userId", dataType = "Integer", value = "用户id", required = true),
+            @ApiImplicitParam(name = "liveAssistant", dataType = "Boolean", value = "直播助手"),
+    })
     @GetMapping("/queryRoom")
     public HttpResponseResult<ImLiveBroadcastRoomVo> queryRoomAndCheck(@ApiParam(value = "房间uid", required = true) String roomUid,
-                                                                       @ApiParam(value = "用户id", required = true) Integer userId) {
-        return succeed(imLiveBroadcastRoomService.queryRoomAndCheck(roomUid, userId, 2));
+                                                                       @ApiParam(value = "用户id", required = true) Integer userId,
+                                                                       @RequestParam(defaultValue = "false") Boolean liveAssistant) {
+
+        // 请求来源业源
+        int osType = 2; // 老师端
+        if (Optional.ofNullable(liveAssistant).orElse(false)) {
+            osType = 3; // 直播助手
+        }
+
+        return succeed(imLiveBroadcastRoomService.queryRoomAndCheck(roomUid, userId, osType));
     }
 
     @ApiOperation("关闭直播间")

+ 2 - 2
pom.xml

@@ -192,11 +192,11 @@
 				<version>1.3.2</version>
 			</dependency>
 
-			<dependency>
+			<!--<dependency>
 				<groupId>org.springframework.social</groupId>
 				<artifactId>spring-social-security</artifactId>
 				<version>1.1.6.RELEASE</version>
-			</dependency>
+			</dependency>-->
 
 			<dependency>
 				<groupId>commons-beanutils</groupId>