From 0a609314f198a68c875a2dbb5369660ed1b24dca Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Sat, 7 Oct 2023 16:00:45 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pile/service/impl/YKCPushCommandServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java index 12b5a52b1..55825372c 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java @@ -69,8 +69,9 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService { public boolean push(byte[] msg, String pileSn, Enum frameTypeCode) { // 通过桩编号获取channel Channel channel = PileChannelEntity.getChannelByPileSn(pileSn); + String value = ((YKCFrameTypeCode) frameTypeCode).getValue(); if (Objects.isNull(channel)) { - log.error("push命令[{}]失败, 桩号:{}无法获取到长连接, 请检查充电桩连接状态!", ((YKCFrameTypeCode) frameTypeCode).getValue(), pileSn); + log.error("push命令[{}]失败, 桩号:{}无法获取到长连接, 请检查充电桩连接状态!", value, pileSn); return false; } /** @@ -108,12 +109,12 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService { public void operationComplete(ChannelFuture channelFuture) throws Exception { // 检查操作的状态 if (channelFuture.isSuccess()) { - log.info("push结果【成功】, remoteAddress:{}, channelId:{}, 报文:{}, ", channel.remoteAddress(), channel.id(), wholeMsg); + log.info("push结果【成功】, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}, ", channel.remoteAddress(), channel.id(), value, wholeMsg); } else { // 如果发生错误,则访问描述原因的Throwable Throwable cause = channelFuture.cause(); // cause.printStackTrace(); - log.info("push结果【失败】, remoteAddress:{}, channelId:{}, 报文:{}", channel.remoteAddress(), channel.id(), wholeMsg); + log.info("push结果【失败】, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}", channel.remoteAddress(), channel.id(), value, wholeMsg); log.error("push发送命令失败", cause); } }