From d7f515b94c561a8daa08362e97b30def3fda38a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E6=A2=A6=E5=8D=83=E5=B9=B4?= <421281095@qq.com> Date: Wed, 26 Nov 2025 14:26:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(fire-management):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=A4=A7=E5=8D=8E=E6=91=84=E5=83=8F=E5=A4=B4=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=94=AF=E6=8C=81=20-=20=E4=B8=BA=20ListDaHu?= =?UTF-8?q?aCameraInfo=20=E6=96=B9=E6=B3=95=E6=B7=BB=E5=8A=A0=20isOnline?= =?UTF-8?q?=20=E5=8F=82=E6=95=B0=E4=BB=A5=E7=AD=9B=E9=80=89=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E7=8A=B6=E6=80=81=20-=20=E4=B8=BA=20GetDaHuaRtsp=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=B7=BB=E5=8A=A0=20streamType=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=BB=A5=E6=94=AF=E6=8C=81=E4=B8=8D=E5=90=8C=E7=A0=81?= =?UTF-8?q?=E6=B5=81=E7=B1=BB=E5=9E=8B=20-=20=E8=B0=83=E6=95=B4=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=8F=82=E6=95=B0=E9=BB=98=E8=AE=A4=E5=80=BC=EF=BC=8C?= =?UTF-8?q?pageNum=20=E9=BB=98=E8=AE=A4=E4=B8=BA=201=EF=BC=8CpageSize=20?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BA=2010=20-=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=99=A8=E6=96=B9=E6=B3=95=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=20AllowAnonymous=20=E7=89=B9=E6=80=A7=20-=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E7=94=A8=E9=80=BB=E8=BE=91=E4=BB=A5?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E6=96=B0=E5=A2=9E=E5=8F=82=E6=95=B0=E5=88=B0?= =?UTF-8?q?=E5=A4=A7=E5=8D=8E=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ServiceApp/FireManagement/FireManagementApp.cs | 8 ++++---- .../FireManagement/CameraController.cs | 14 ++++++-------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/OpenAuth.App/ServiceApp/FireManagement/FireManagementApp.cs b/OpenAuth.App/ServiceApp/FireManagement/FireManagementApp.cs index 25bd046..f9da5ec 100644 --- a/OpenAuth.App/ServiceApp/FireManagement/FireManagementApp.cs +++ b/OpenAuth.App/ServiceApp/FireManagement/FireManagementApp.cs @@ -1492,7 +1492,7 @@ ORDER BY }; } - public async Task> ListDaHuaCameraInfo(int pageNum ,int pageSize) + public async Task> ListDaHuaCameraInfo(int pageNum, int pageSize, int isOnline) { var daHuaApi = new DaHuaApi("https://icc-dev.hibetatest.com:4077"); var channelCategoryRequest = new ChannelCategoryRequest @@ -1511,15 +1511,15 @@ ORDER BY Result = channelCategoryResponse.data.pageData }; } + return new Response { Code = channelCategoryResponse.code, Message = channelCategoryResponse.errMsg }; - } - public async Task> GetDaHuaRtsp(string channelCode) + public async Task> GetDaHuaRtsp(string channelCode,string streamType) { var daHuaApi = new DaHuaApi("https://icc-dev.hibetatest.com:4077"); @@ -1529,7 +1529,7 @@ ORDER BY { channelId = channelCode, dataType = "1", - streamType = "1" //主码流 + streamType = streamType //主码流 } }; var y = await daHuaApi.StartRtspPreviewAsync(request); diff --git a/OpenAuth.WebApi/Controllers/ServiceControllers/FireManagement/CameraController.cs b/OpenAuth.WebApi/Controllers/ServiceControllers/FireManagement/CameraController.cs index 0b6f222..695f93c 100644 --- a/OpenAuth.WebApi/Controllers/ServiceControllers/FireManagement/CameraController.cs +++ b/OpenAuth.WebApi/Controllers/ServiceControllers/FireManagement/CameraController.cs @@ -30,16 +30,14 @@ public class CameraController : ControllerBase } [HttpGet] - [AllowAnonymous] - public async Task> ListDaHuaCameraInfo(int pageNum,int pageSize) + public async Task> ListDaHuaCameraInfo(int pageNum = 1, int pageSize = 10, int isOnline = 1) { - return await _app.ListDaHuaCameraInfo(pageNum,pageSize); + return await _app.ListDaHuaCameraInfo(pageNum, pageSize, isOnline); } - [HttpGet] - [AllowAnonymous] - public async Task> GetDaHuaRtsp(string channelCode) + + [HttpGet] + public async Task> GetDaHuaRtsp(string channelCode, string streamType = "1") { - return await _app.GetDaHuaRtsp(channelCode); + return await _app.GetDaHuaRtsp(channelCode, streamType); } - } \ No newline at end of file