From b0a4ce6982a3b3694679f69c39c59df84ecdcb06 Mon Sep 17 00:00:00 2001
From: zhaowenyu <35589726@qq.com>
Date: Wed, 11 Feb 2026 11:12:40 +0800
Subject: [PATCH] 2026-02-04 优化minio中转接口

---
 ard-admin/src/main/java/com/ard/web/controller/sample/DeviceHmsController.java |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/ard-admin/src/main/java/com/ard/web/controller/sample/DeviceHmsController.java b/ard-admin/src/main/java/com/ard/web/controller/sample/DeviceHmsController.java
index d913f04..75b7c89 100644
--- a/ard-admin/src/main/java/com/ard/web/controller/sample/DeviceHmsController.java
+++ b/ard-admin/src/main/java/com/ard/web/controller/sample/DeviceHmsController.java
@@ -5,6 +5,9 @@
 import com.ard.sample.manage.model.dto.DeviceHmsDTO;
 import com.ard.sample.manage.model.param.DeviceHmsQueryParam;
 import com.ard.sample.manage.service.IDeviceHmsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.Operation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -18,7 +21,7 @@
  * @version 1.1
  * @date 2022/7/7
  */
-
+@Api(tags = "设备HMS管理")
 @RestController
 @Slf4j
 @RequestMapping("/dock/devices")
@@ -28,14 +31,17 @@
     private IDeviceHmsService deviceHmsService;
 
     /**
-     * Page to query the hms information of the device.
+     * 查询设备hms信息的页面。/{workspace_id},@PathVariable("workspace_id") String workspaceId
      * @param param
-     * @param workspaceId
      * @return
      */
-    @GetMapping("/{workspace_id}/devices/hms")
-    public ResponseResult<PaginationData<DeviceHmsDTO>> getHmsInformation(DeviceHmsQueryParam param,
-                                                          @PathVariable("workspace_id") String workspaceId) {
+    @Operation(summary = "获取设备HMS信息", description = "参数传空则忽略该条件,返回所有符合其他条件的数据")
+    @ApiOperation("获取设备HMS信息")
+    @GetMapping("/devices/hms")
+    public ResponseResult<PaginationData<DeviceHmsDTO>> getHmsInformation(DeviceHmsQueryParam param) {
+        if (param == null) {
+            param = new DeviceHmsQueryParam();
+        }
         PaginationData<DeviceHmsDTO> devices = deviceHmsService.getDeviceHmsByParam(param);
 
         return ResponseResult.success(devices);
@@ -46,7 +52,8 @@
      * @param deviceSn
      * @return
      */
-    @PutMapping("/{workspace_id}/devices/hms/{device_sn}")
+    @ApiOperation("更新HMS消息为已读状态")
+    @PutMapping("/devices/hms/{device_sn}")
     public ResponseResult updateReadHmsByDeviceSn(@PathVariable("device_sn") String deviceSn) {
         deviceHmsService.updateUnreadHms(deviceSn);
         return ResponseResult.success();
@@ -57,7 +64,8 @@
      * @param deviceSn
      * @return
      */
-    @GetMapping("/{workspace_id}/devices/hms/{device_sn}")
+    @ApiOperation("获取设备未读HMS消息")
+    @GetMapping("/devices/hms/{device_sn}")
     public ResponseResult<List<DeviceHmsDTO>> getUnreadHmsByDeviceSn(@PathVariable("device_sn") String deviceSn) {
         PaginationData<DeviceHmsDTO> paginationData = deviceHmsService.getDeviceHmsByParam(
                 DeviceHmsQueryParam.builder()

--
Gitblit v1.9.3