|
@@ -9,6 +9,7 @@ import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -45,7 +46,11 @@ public class ImLiveBroadcastRoomController extends BaseController {
|
|
@GetMapping("/queryRoom")
|
|
@GetMapping("/queryRoom")
|
|
public HttpResponseResult<LiveRoomWrapper.LiveRoomVo> queryRoomAndCheck(@ApiParam(value = "房间uid", required = true) String roomUid,
|
|
public HttpResponseResult<LiveRoomWrapper.LiveRoomVo> queryRoomAndCheck(@ApiParam(value = "房间uid", required = true) String roomUid,
|
|
@ApiParam(value = "用户id", required = true) String userId) {
|
|
@ApiParam(value = "用户id", required = true) String userId) {
|
|
- return succeed(liveRoomService.queryRoomAndCheck(roomUid, Long.parseLong(imGroupService.analysisImUserId(userId)), 1));
|
|
|
|
|
|
+ Long userIdLong = null;
|
|
|
|
+ if (StringUtils.isNotBlank(userId)) {
|
|
|
|
+ userIdLong = Long.parseLong(imGroupService.analysisImUserId(userId));
|
|
|
|
+ }
|
|
|
|
+ return succeed(liveRoomService.queryRoomAndCheck(roomUid, userIdLong, 1));
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("/quitRoom")
|
|
@PostMapping("/quitRoom")
|
|
@@ -63,7 +68,11 @@ public class ImLiveBroadcastRoomController extends BaseController {
|
|
if (microphoneFlag == null) {
|
|
if (microphoneFlag == null) {
|
|
microphoneFlag = true;
|
|
microphoneFlag = true;
|
|
}
|
|
}
|
|
- liveRoomService.joinRoom(roomUid, Long.parseLong(imGroupService.analysisImUserId(userId)),microphoneFlag);
|
|
|
|
|
|
+ Long userIdLong = null;
|
|
|
|
+ if (StringUtils.isNotBlank(userId)) {
|
|
|
|
+ userIdLong = Long.parseLong(imGroupService.analysisImUserId(userId));
|
|
|
|
+ }
|
|
|
|
+ liveRoomService.joinRoom(roomUid, userIdLong,microphoneFlag);
|
|
return succeed();
|
|
return succeed();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -72,7 +81,11 @@ public class ImLiveBroadcastRoomController extends BaseController {
|
|
public HttpResponseResult<Object> userWhetherMic(@ApiParam(value = "房间uid", required = true) String roomUid,
|
|
public HttpResponseResult<Object> userWhetherMic(@ApiParam(value = "房间uid", required = true) String roomUid,
|
|
@ApiParam(value = "用户id", required = true) String userId,
|
|
@ApiParam(value = "用户id", required = true) String userId,
|
|
@ApiParam(value = "连麦状态 0:未申请1:申请连麦中2:连麦中", required = true) Integer whetherMicStatus) {
|
|
@ApiParam(value = "连麦状态 0:未申请1:申请连麦中2:连麦中", required = true) Integer whetherMicStatus) {
|
|
- liveRoomService.userWhetherMic(roomUid,Long.parseLong(imGroupService.analysisImUserId(userId)),whetherMicStatus);
|
|
|
|
|
|
+ Long userIdLong = null;
|
|
|
|
+ if (StringUtils.isNotBlank(userId)) {
|
|
|
|
+ userIdLong = Long.parseLong(imGroupService.analysisImUserId(userId));
|
|
|
|
+ }
|
|
|
|
+ liveRoomService.userWhetherMic(roomUid,userIdLong,whetherMicStatus);
|
|
return succeed();
|
|
return succeed();
|
|
}
|
|
}
|
|
}
|
|
}
|