From 78168453a33d61caf52d336613eb01da3a37ba4f Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Wed, 15 Jan 2025 15:59:34 +0800 Subject: [PATCH] bugfix --- .../tc/controller/AssetTaskController.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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());