TRX 1 vuosi sitten
vanhempi
commit
d958c4519d

+ 3 - 0
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/device/DeviceInfoService.java

@@ -470,6 +470,9 @@ public class DeviceInfoService {
     }
 
     public DeviceInfoSimpleModel toSimpleModel(String deviceId) {
+        if (StringUtils.isEmpty(deviceId)) {
+            return null;
+        }
         DeviceInfo deviceInfo = deviceInfoDao.findTopByDeviceId(deviceId);
         return toSimpleModel(deviceInfo);
     }