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