From b6a5314a612855cb89ef8b1562809e6cfc22ef17 Mon Sep 17 00:00:00 2001 From: huangfeng Date: Tue, 3 Sep 2024 15:56:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=B8=BA=E7=A9=BA=E7=9A=84=E5=A4=84=E7=90=86?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shxy/xymanager_service/impl/MntnServiceImpl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/MntnServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/MntnServiceImpl.java index 8d7d342..0ac6fa0 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/MntnServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/MntnServiceImpl.java @@ -4,6 +4,7 @@ package com.shxy.xymanager_service.impl; import com.shxy.xymanager_common.entity.*; import com.shxy.xymanager_common.exception.ApiException; import com.shxy.xymanager_common.util.JSONUtil; +import com.shxy.xymanager_common.util.StringUtils; import com.shxy.xymanager_dao.dao.*; import com.shxy.xymanager_service.service.CmdService; import com.shxy.xymanager_service.service.TerminalExtService; @@ -105,10 +106,12 @@ public class MntnServiceImpl implements MntnService { private HashMap buildCmdMap(MntnCmds cmd) throws Exception { HashMap result = new HashMap<>(); - HashMap data = JSONUtil.json2Object(cmd.getCmd(), HashMap.class); - result.putAll(data); - result.put("cid", cmd.getId()); - result.put("cmd", cmd.getName()); + if (StringUtils.isNotBlank(cmd.getCmd())) { + HashMap data = JSONUtil.json2Object(cmd.getCmd(), HashMap.class); + result.putAll(data); + result.put("cid", cmd.getId()); + result.put("cmd", cmd.getName()); + } if ("upgrade".equalsIgnoreCase(cmd.getName())) { result.put("isUpgrade", 1); result.put("sj", 1);