diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java index 8957c60..fa3c2ed 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java @@ -520,18 +520,22 @@ public class AssetTaskController extends BaseController { // } StringBuilder a = new StringBuilder(); - if (!assetCurrent.getGlymList().isEmpty()) { + if (assetCurrent.getGlymList() != null) { assetCurrent.getGlymList().forEach(x -> { - a.append(x); - a.append(","); + if (!Objects.equals(x.getKey(), "") && x.getKey() != null) { + a.append(x.getKey()); + a.append(","); + } }); } assetCurrent.setGlym(a.toString()); StringBuilder b = new StringBuilder(); - if (!assetCurrent.getGlIpList().isEmpty()) { - assetCurrent.getGlymList().forEach(x -> { - b.append(x); - b.append(","); + if (assetCurrent.getGlIpList() != null) { + assetCurrent.getGlIpList().forEach(x -> { + if (!Objects.equals(x.getKey(), "") && x.getKey() != null) { + b.append(x.getKey()); + b.append(","); + } }); } assetCurrent.setGlIp(b.toString());