| | |
| | | package com.ruoyi.dataInterchange.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import io.netty.buffer.ByteBuf; |
| | | import io.netty.buffer.ByteBufUtil; |
| | | import io.netty.buffer.Unpooled; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | * 0x01:上级平台客户端与下级平台服务端断开 |
| | | * 0xFF:其他错误 |
| | | */ |
| | | @JsonProperty("ERROR_CODE") |
| | | private String errorCode; |
| | | private int errorCode; |
| | | |
| | | |
| | | public byte[] encode() { |
| | | ByteBuf byteBuf = Unpooled.buffer(1); |
| | | byteBuf.writeInt(this.getErrorCode()); |
| | | byte[] bytes = ByteBufUtil.getBytes(byteBuf); |
| | | byteBuf.release(); |
| | | return bytes; |
| | | } |
| | | } |