hechunping 2 лет назад
Родитель
Сommit
effbca851f

+ 1 - 1
device-api-service/src/main/java/com/xy/service/DeviceInfoServiceImpl.java

@@ -141,7 +141,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
                 .in(DeviceInfo::getDeviceId, dto.getDeviceId())
                 .select(DeviceInfo::getDeviceId, DeviceInfo::getDeviceName);
         List<DeviceInfo> deviceInfoList = list(lqw);
-        return R.ok(deviceInfoList.stream().collect(Collectors.toMap(DeviceInfo::getDeviceId, DeviceInfo::getDeviceName)));
+        return R.ok(deviceInfoList.stream().collect(Collectors.toMap(DeviceInfo::getDeviceId, i->Optional.ofNullable(i.getDeviceName()).orElse(""))));
     }
 
     @Override