From 7c6219ca75f1c26c33b172e698b0f3d20dad7b09 Mon Sep 17 00:00:00 2001 From: youngq Date: Tue, 6 Aug 2024 10:22:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=A8=E5=91=98=E8=A7=82?= =?UTF-8?q?=E7=9C=8B=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Frontend/RoomController.cs | 17 +++++++++++++++++ WGShare.API/WGShare.API.xml | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/WGShare.API/Controllers/Frontend/RoomController.cs b/WGShare.API/Controllers/Frontend/RoomController.cs index 470baaa..24b74fd 100644 --- a/WGShare.API/Controllers/Frontend/RoomController.cs +++ b/WGShare.API/Controllers/Frontend/RoomController.cs @@ -342,6 +342,23 @@ namespace WGShare.API.Controllers.Frontend await _hubContext.Clients.Groups(roomNum).RefreshView(type); } + /// + /// 全员观看 + /// + /// + [HttpGet("show-user")] + public async Task GetShowUser([FromQuery] string roomNum) + { + var channelUsers = RedisHelper.HGetAll(RedisKeyConstant.SessionManage.GetChannelUserKey(TenantId, roomNum)); + + if (channelUsers.IsNullOrEmpty()) + { + throw Oops.Oh("无效会议号!"); + } + + return channelUsers.FirstOrDefault().Key; + } + #region 文件分享 /// /// 分享上传文件 diff --git a/WGShare.API/WGShare.API.xml b/WGShare.API/WGShare.API.xml index 1d26a16..e86c5e7 100644 --- a/WGShare.API/WGShare.API.xml +++ b/WGShare.API/WGShare.API.xml @@ -157,6 +157,12 @@ + + + 全员观看 + + + 分享上传文件