From 0bfae9191ab602ecbc8016db823475497cedb71c Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Thu, 22 Aug 2024 11:04:07 +0800 Subject: [PATCH] =?UTF-8?q?iot=E8=AE=BE=E5=A4=87code=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sgzb/material/service/impl/IotMachineServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/IotMachineServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/IotMachineServiceImpl.java index 0882bc49..1ac01251 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/IotMachineServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/IotMachineServiceImpl.java @@ -16,6 +16,7 @@ import com.bonus.sgzb.material.domain.*; import com.bonus.sgzb.material.mapper.IotMachineMapper; import com.bonus.sgzb.material.service.IotMachineService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; @@ -288,7 +289,7 @@ public class IotMachineServiceImpl implements IotMachineService { @Override public AjaxResult getLocation(IotDto iotDto) { log.info("getLocation:{}", iotDto); - if (iotDto == null || iotDto.getIotId() == null) { + if (iotDto == null || StringUtils.isBlank(iotDto.getIotId())) { throw new RuntimeException(ExceptionEnum.PARAM_NULL.getMsg()); } List list=new ArrayList<>();