From bd9fece99c72a4df5836ed3522ba5b959b2332b0 Mon Sep 17 00:00:00 2001 From: wanghao Date: Thu, 12 Mar 2026 16:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E6=89=8B=E8=A1=A8=E7=BB=91=E5=AE=9A=E8=A7=A3=E7=BB=91=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/renkang/watch/dto/BindDeviceDTO.java | 19 +++++++++++++++++ .../watch/controller/WatchController.java | 6 ++---- .../controller/WatchDeviceController.java | 14 ++++++++++++- .../watch/service/IWatchDeviceService.java | 6 +++++- .../service/impl/WatchDeviceServiceImpl.java | 21 ++++++++++++++++++- 5 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 health-watch/health-watch-api/src/main/java/com/renkang/watch/dto/BindDeviceDTO.java diff --git a/health-watch/health-watch-api/src/main/java/com/renkang/watch/dto/BindDeviceDTO.java b/health-watch/health-watch-api/src/main/java/com/renkang/watch/dto/BindDeviceDTO.java new file mode 100644 index 0000000..694637c --- /dev/null +++ b/health-watch/health-watch-api/src/main/java/com/renkang/watch/dto/BindDeviceDTO.java @@ -0,0 +1,19 @@ +package com.renkang.watch.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * @author TianZi + * @date 2023/11/7 14:13 + */ +@Data +public class BindDeviceDTO { + + @Schema(title = "手表编号") + private String watchNo; +} diff --git a/health-watch/health-watch-biz/src/main/java/com/renkang/watch/controller/WatchController.java b/health-watch/health-watch-biz/src/main/java/com/renkang/watch/controller/WatchController.java index 3c94fa4..eb27c08 100644 --- a/health-watch/health-watch-biz/src/main/java/com/renkang/watch/controller/WatchController.java +++ b/health-watch/health-watch-biz/src/main/java/com/renkang/watch/controller/WatchController.java @@ -11,10 +11,7 @@ import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.Date; import java.util.List; @@ -327,4 +324,5 @@ public class WatchController { // } return result; } + } diff --git a/health-watch/health-watch-biz/src/main/java/com/renkang/watch/controller/WatchDeviceController.java b/health-watch/health-watch-biz/src/main/java/com/renkang/watch/controller/WatchDeviceController.java index 4a71e99..40e64d5 100644 --- a/health-watch/health-watch-biz/src/main/java/com/renkang/watch/controller/WatchDeviceController.java +++ b/health-watch/health-watch-biz/src/main/java/com/renkang/watch/controller/WatchDeviceController.java @@ -185,6 +185,12 @@ public class WatchDeviceController extends JeecgController { */ Result bindUser(BindUserDTO dto) throws ParseException; + Result bindDevice(String watchNo) throws ParseException; + /** * 绑定用户 * @param dto * @return */ - Result unbundleUser(BindUserDTO dto) throws ParseException; + Result unbundleUser(BindUserDTO dto); + + Result unbundleDevice(String watchNo); /** * 工具开关 diff --git a/health-watch/health-watch-biz/src/main/java/com/renkang/watch/service/impl/WatchDeviceServiceImpl.java b/health-watch/health-watch-biz/src/main/java/com/renkang/watch/service/impl/WatchDeviceServiceImpl.java index a773a82..a68c0bc 100644 --- a/health-watch/health-watch-biz/src/main/java/com/renkang/watch/service/impl/WatchDeviceServiceImpl.java +++ b/health-watch/health-watch-biz/src/main/java/com/renkang/watch/service/impl/WatchDeviceServiceImpl.java @@ -350,6 +350,16 @@ public class WatchDeviceServiceImpl extends ServiceImpl