Browse Source

回复消息 bug修改

zjs 4 days ago
parent
commit
e9a8fb31d5

+ 4 - 4
src/main/java/com/cn/esermis/netty/BootNettyChannelInboundHandlerAdapter.java

@@ -95,8 +95,8 @@ public class BootNettyChannelInboundHandlerAdapter extends ChannelInboundHandler
95
                             String CN = jsonObject.getString("CN");
95
                             String CN = jsonObject.getString("CN");
96
                             String MN = jsonObject.getString("MN");
96
                             String MN = jsonObject.getString("MN");
97
                             String dataTime = jsonObject.getString("DataTime");
97
                             String dataTime = jsonObject.getString("DataTime");
98
-                            if (!adapter.redisQueueService.isElementExist(CN + MN + dataTime, dataTime)){
99
-                                adapter.redisQueueService.addElementWithExpire(CN+MN+dataTime, dataTime, 1, TimeUnit.HOURS);
98
+                            if (!adapter.redisQueueService.isElementExist(MN +":"+ CN +":"+ dataTime, dataTime)){
99
+                                adapter.redisQueueService.addElementWithExpire(MN +":"+ CN +":"+ dataTime, dataTime, 1, TimeUnit.HOURS);
100
                                 adapter.redisQueueService.sendMessage(Constant.SERVER, jsonObject);
100
                                 adapter.redisQueueService.sendMessage(Constant.SERVER, jsonObject);
101
                             }
101
                             }
102
                         }
102
                         }
@@ -112,8 +112,8 @@ public class BootNettyChannelInboundHandlerAdapter extends ChannelInboundHandler
112
                                 String CN = jsonObject.getString("CN");
112
                                 String CN = jsonObject.getString("CN");
113
                                 String MN = jsonObject.getString("MN");
113
                                 String MN = jsonObject.getString("MN");
114
                                 String dataTime = jsonObject.getString("DataTime");
114
                                 String dataTime = jsonObject.getString("DataTime");
115
-                                if (!adapter.redisQueueService.isElementExist(CN + MN + dataTime, dataTime)){
116
-                                    adapter.redisQueueService.addElementWithExpire(CN+MN+dataTime, dataTime, 1, TimeUnit.HOURS);
115
+                                if (!adapter.redisQueueService.isElementExist(MN +":"+ CN +":"+ dataTime, dataTime)){
116
+                                    adapter.redisQueueService.addElementWithExpire(MN +":"+ CN +":"+ dataTime, dataTime, 1, TimeUnit.HOURS);
117
                                     adapter.redisQueueService.sendMessage(Constant.SERVER, jsonObject);
117
                                     adapter.redisQueueService.sendMessage(Constant.SERVER, jsonObject);
118
                                 }
118
                                 }
119
                             }
119
                             }