diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcSwitchServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcSwitchServiceImpl.java index 469b2d7a..f0161678 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcSwitchServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcSwitchServiceImpl.java @@ -208,19 +208,19 @@ public class DcSwitchServiceImpl extends ServiceImpl i .filter(dcSwitch -> dcSwitch.getDeviceList().contains(deviceIdString)) .findFirst().map(DcSwitch::getSwitchIp).orElse(null); if (StringUtils.isBlank(switchIp)){ //switchIp为空不存在交换机ip - redisCache.setCacheObject(DEVICEDIAGNOSTICS+deviceIp,"未查询到相关的二层交换机",2, TimeUnit.MINUTES); - return AjaxResult.success("未查询到相关的二层交换机"); + redisCache.setCacheObject(DEVICEDIAGNOSTICS+deviceIp,"未查询到相关的交换机",2, TimeUnit.MINUTES); + return AjaxResult.success("未查询到相关的交换机"); } List switchList = dcSwitchMapper.getSwitchName(switchIp); if (switchList.size()!=1){ - redisCache.setCacheObject(DEVICEDIAGNOSTICS+deviceIp,"二层交换机IP存在冲突",2, TimeUnit.MINUTES); - return AjaxResult.success("二层交换机IP存在冲突"); + redisCache.setCacheObject(DEVICEDIAGNOSTICS+deviceIp,"交换机IP存在冲突",2, TimeUnit.MINUTES); + return AjaxResult.success("交换机IP存在冲突"); }else { for (DcSwitch switchListValue:switchList) { InetAddress newSwitchIp = InetAddress.getByName(switchIp); if (!newSwitchIp.isReachable(UniversalEnum.FIVE_THOUSAND.getNumber())) { - redisCache.setCacheObject(DEVICEDIAGNOSTICS+deviceIp,"设备二层交换机"+switchListValue.getSwitchName()+"网络异常",2, TimeUnit.MINUTES); - return AjaxResult.success("设备二层交换机"+switchListValue.getSwitchName()+"网络异常"); + redisCache.setCacheObject(DEVICEDIAGNOSTICS+deviceIp,"设备交换机"+switchListValue.getSwitchName()+"网络异常",2, TimeUnit.MINUTES); + return AjaxResult.success("设备交换机"+switchListValue.getSwitchName()+"网络异常"); } } }