update 电单车协议

This commit is contained in:
Guoqs
2024-08-29 14:40:41 +08:00
parent 4e69180aa8
commit 30250b51ef
2 changed files with 1 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
package com.jsowell.netty.server.electricbicycles;
import com.alibaba.fastjson2.JSON;
import com.google.common.collect.Lists;
import com.jsowell.common.enums.ykc.PileChannelEntity;
import com.jsowell.common.util.BytesUtil;
@@ -61,10 +60,7 @@ public class ElectricBicyclesServerHandler extends ChannelInboundHandlerAdapter
*/
@Override
public void channelRead(ChannelHandlerContext ctx, Object message) throws Exception {
Channel channel = ctx.channel();
log.info("收到消息, channelId:{}, msg:{}", channel.id().toString(), JSON.toJSONString(message));
byte[] msg = (byte[]) message;
// 处理数据
byte[] response = eBikeService.process(msg, ctx);
if (Objects.nonNull(response)) {