From 8874c90db2c238fa4c55df491675fe7fec9d93b2 Mon Sep 17 00:00:00 2001 From: fine <54142345+criver31@users.noreply.github.com> Date: 星期二, 09 一月 2024 11:45:30 +0800 Subject: [PATCH] Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java index e614b9f..14640d8 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java @@ -8,6 +8,7 @@ import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent; import com.genersoft.iot.vmp.utils.DateUtil; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.dom4j.Attribute; import org.dom4j.Document; @@ -214,8 +215,11 @@ return deviceChannel; } Element nameElement = itemDevice.element("Name"); - if (nameElement != null) { + // 褰撻�氶亾鍚嶇О涓虹┖鏃讹紝璁剧疆閫氶亾鍚嶇О涓洪�氶亾缂栫爜锛岄伩鍏嶇骇鑱旀椂鍥犻�氶亾鍚嶇О涓虹┖瀵艰嚧涓婄骇鎺ユ敹閫氶亾澶辫触 + if (nameElement != null && StringUtils.isNotBlank(nameElement.getText())) { deviceChannel.setName(nameElement.getText()); + } else { + deviceChannel.setName(channelId); } if(channelId.length() <= 8) { deviceChannel.setHasAudio(false); -- Gitblit v1.8.0