|
@@ -83,9 +83,8 @@ public class BootNettyChannelInboundHandlerAdapter extends ChannelInboundHandler
|
83
|
String[] split = message.split("&&");
|
83
|
String[] split = message.split("&&");
|
84
|
if (split.length == 3) {
|
84
|
if (split.length == 3) {
|
85
|
JSONObject jsonObject = HJ212MsgUtils.dealMsg2(message);
|
85
|
JSONObject jsonObject = HJ212MsgUtils.dealMsg2(message);
|
86
|
- if (jsonObject!=null && jsonObject.getString(Constant.CN).equals(Constant.MINUTE)
|
|
|
87
|
- || jsonObject.getString(Constant.CN).equals(Constant.HOUR)
|
|
|
88
|
- || jsonObject.getString(Constant.CN).equals(Constant.REAL)){
|
|
|
|
|
86
|
+ if ((jsonObject!=null && jsonObject.getString(Constant.CN).equals(Constant.MINUTE))
|
|
|
87
|
+ ||(jsonObject!=null && jsonObject.getString(Constant.CN).equals(Constant.HOUR))){
|
89
|
adapter.publisherService.pubMsg(jsonObject);
|
88
|
adapter.publisherService.pubMsg(jsonObject);
|
90
|
// adapter.redisQueueService.sendMessage(Constant.SERVER, jsonObject);
|
89
|
// adapter.redisQueueService.sendMessage(Constant.SERVER, jsonObject);
|
91
|
}
|
90
|
}
|
|
@@ -94,9 +93,8 @@ public class BootNettyChannelInboundHandlerAdapter extends ChannelInboundHandler
|
94
|
String startStr = dataMap.get(ctx.channel().id().toString());
|
93
|
String startStr = dataMap.get(ctx.channel().id().toString());
|
95
|
startStr = startStr + message;
|
94
|
startStr = startStr + message;
|
96
|
JSONObject jsonObject = HJ212MsgUtils.dealMsg2(startStr);
|
95
|
JSONObject jsonObject = HJ212MsgUtils.dealMsg2(startStr);
|
97
|
- if (jsonObject!=null && jsonObject.getString(Constant.CN).equals(Constant.MINUTE)
|
|
|
98
|
- || jsonObject.getString(Constant.CN).equals(Constant.HOUR)
|
|
|
99
|
- || jsonObject.getString(Constant.CN).equals(Constant.REAL)){
|
|
|
|
|
96
|
+ if ((jsonObject!=null && jsonObject.getString(Constant.CN).equals(Constant.MINUTE))
|
|
|
97
|
+ || (jsonObject!=null && jsonObject.getString(Constant.CN).equals(Constant.HOUR))){
|
100
|
// adapter.redisQueueService.sendMessage(Constant.SERVER, jsonObject);
|
98
|
// adapter.redisQueueService.sendMessage(Constant.SERVER, jsonObject);
|
101
|
adapter.publisherService.pubMsg(jsonObject);
|
99
|
adapter.publisherService.pubMsg(jsonObject);
|
102
|
}
|
100
|
}
|
|
@@ -114,6 +112,7 @@ public class BootNettyChannelInboundHandlerAdapter extends ChannelInboundHandler
|
114
|
}
|
112
|
}
|
115
|
} catch (Exception e) {
|
113
|
} catch (Exception e) {
|
116
|
System.out.println("channelRead--" + e.toString());
|
114
|
System.out.println("channelRead--" + e.toString());
|
|
|
115
|
+ throw new RuntimeException(e);
|
117
|
}
|
116
|
}
|
118
|
}
|
117
|
}
|
119
|
/**
|
118
|
/**
|