From d905ec7b23f1f17ace3a3557b569a38ab85c8a77 Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期三, 27 九月 2023 10:59:49 +0800 Subject: [PATCH] 西区手环项目修改接口地址2 --- springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/api/BraceletUserDataApi.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/api/BraceletUserDataApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/api/BraceletUserDataApi.java index 6973b3d..137d517 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/api/BraceletUserDataApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/api/BraceletUserDataApi.java @@ -37,9 +37,15 @@ @PostMapping("/addBracelet") public R addBracelet(@RequestBody BraceletUserDataDO braceletUserDataDO) { - BraceletUserDataDO data=braceletUserDataService.getDetails(braceletUserDataDO.getDeviceId()); braceletUserDataDO.setIsAbnormal("0"); braceletUserDataDO.setOnoff("1"); + + if(!StringUtils.isEmpty(braceletUserDataDO.getDeviceId())) + { + + } + BraceletUserDataDO data=braceletUserDataService.getDetails(braceletUserDataDO.getDeviceId()); + if(data==null || StringUtils.isEmpty(data.getDeviceId())) { return R.ok(braceletUserDataService.addBracelet(braceletUserDataDO)); -- Gitblit v1.7.1