代码调整

This commit is contained in:
2024-12-20 16:36:41 +08:00
parent bc33f78d0c
commit 8f0b923744

View File

@@ -43,10 +43,27 @@ public class NettyServerHandler extends SimpleChannelInboundHandler<String> {
}else{
channel.writeAndFlush("socket指令结果成功指令");
}*/
JSONObject jsonObject = new JSONObject();
jsonObject.put("requestId","yjc_ytxjy");
jsonObject.put("code","10200");
channel.writeAndFlush(jsonObject.toJSONString()+'\n');
if(!msg.contains("HeartBeat")){
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("requestId","yjc_ytxjy");
jsonObject1.put("operateCode","INIT_GATHER");
jsonObject1.put("code","10201");
channel.writeAndFlush(jsonObject1.toJSONString()+'\n');
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("requestId","yjc_ytxjy");
jsonObject.put("operateCode","INIT_GATHER");
jsonObject.put("code","10200");
channel.writeAndFlush(jsonObject.toJSONString()+'\n');
}
}
@Override