mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 打印日志
This commit is contained in:
@@ -86,13 +86,15 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
|
||||
}
|
||||
|
||||
// 处理数据
|
||||
byte[] result = ykcService.process(arr, ctx.channel());
|
||||
if (Objects.nonNull(result)) {
|
||||
byte[] response = ykcService.process(arr, ctx.channel());
|
||||
if (Objects.nonNull(response)) {
|
||||
// 响应客户端
|
||||
ByteBuf buffer = ctx.alloc().buffer().writeBytes(result);
|
||||
ByteBuf buffer = ctx.alloc().buffer().writeBytes(response);
|
||||
this.channelWrite(ctx.channel().id(), buffer);
|
||||
if (!CollectionUtils.containsAny(notPrintFrameTypeList, frameType)) {
|
||||
log.info("【>>>>>平台响应消息>>>>>】:{}", BytesUtil.binary(result, 16));
|
||||
log.info("【>>>>>平台响应消息>>>>>】channel:{}, 帧类型:{}, 帧名称:{}, 序列号域:{}, response:{}",
|
||||
ctx.channel().id(), frameType, YKCFrameTypeCode.getFrameTypeStr(frameType), serialNumber,
|
||||
BytesUtil.binary(response, 16));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user