From 10050702097c9037e66cf74254cef2a82cd642c6 Mon Sep 17 00:00:00 2001 From: guochaojie Date: Mon, 8 Jul 2024 15:13:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cc/yunxi/controller/DeviceController.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nxhs-service/src/main/java/cc/yunxi/controller/DeviceController.java b/nxhs-service/src/main/java/cc/yunxi/controller/DeviceController.java index 7d7aebe..d406c28 100644 --- a/nxhs-service/src/main/java/cc/yunxi/controller/DeviceController.java +++ b/nxhs-service/src/main/java/cc/yunxi/controller/DeviceController.java @@ -127,10 +127,11 @@ public class DeviceController { Integer fullSet = bucket.getFullSet(); Integer delay = bucket.getCloseDelay(); BigDecimal weight1 = bucket.getWarningWeight(); - if (smogSet < 0) _bucket.put("smogSet", Integer.valueOf(config.getSmogSet())); - if (fullSet < 0) _bucket.put("fullSet", Integer.valueOf(config.getFullSet())); - if (delay < 0) _bucket.put("closeDelay", config.getCloseDelay()); - if (weight1.compareTo(BigDecimal.ZERO) < 0) _bucket.put("warningWeight", config.getWarningWeight()); + if (null == smogSet || smogSet < 0) _bucket.put("smogSet", Integer.valueOf(config.getSmogSet())); + if (null == fullSet || fullSet < 0) _bucket.put("fullSet", Integer.valueOf(config.getFullSet())); + if (delay == null || delay < 0) _bucket.put("closeDelay", config.getCloseDelay()); + if (null == weight1 || weight1.compareTo(BigDecimal.ZERO) < 0) + _bucket.put("warningWeight", config.getWarningWeight()); /***********************************************************************/ list.add(_bucket); } @@ -141,7 +142,7 @@ public class DeviceController { //获取设备配置 @PostMapping("/conf") - @ApiOperation("小程序接口 设备配置") + @ApiOperation("设备柜接口 设备配置") public CommonResult conf(@RequestBody DeviceVO deviceVO) { CommonResult result = new CommonResult<>();