1078-修复分包消息处理
This commit is contained in:
@@ -74,4 +74,14 @@ public class Header {
|
||||
return Bin.get(msgPro, 14);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Header{" +
|
||||
"消息ID='" + msgId + '\'' +
|
||||
", 消息体属性=" + msgPro +
|
||||
", 终端手机号='" + terminalId + '\'' +
|
||||
", 消息体流水号=" + sn +
|
||||
", 协议版本号=" + version +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import org.springframework.context.ApplicationEvent;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -35,6 +36,12 @@ public class J0802 extends Re {
|
||||
protected Rs decode0(ByteBuf buf, Header header, Session session) {
|
||||
respNo = buf.readUnsignedShort();
|
||||
int length = buf.readUnsignedShort();
|
||||
if (length == 0) {
|
||||
log.info("[JT-存储多媒体数据检索应答]: {}", length);
|
||||
SessionManager.INSTANCE.response(header.getTerminalId(), "0802", (long) respNo, new ArrayList<>());
|
||||
return null;
|
||||
}
|
||||
mediaDataInfoList = new ArrayList<>(length);
|
||||
for (int i = 0; i < length; i++) {
|
||||
mediaDataInfoList.add(JTMediaDataInfo.decode(buf));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user