Showing
1 changed file
with
4 additions
and
4 deletions
@@ -89,8 +89,8 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{ | @@ -89,8 +89,8 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{ | ||
89 | //没有标记位,直接处理 | 89 | //没有标记位,直接处理 |
90 | if(sendTime == null){ | 90 | if(sendTime == null){ |
91 | platformRedis.setValue(MESSAGE_SENDING_FLAG, DateUtil.getCurrentTimeSeconds(), 600); | 91 | platformRedis.setValue(MESSAGE_SENDING_FLAG, DateUtil.getCurrentTimeSeconds(), 600); |
92 | + List<GrassInBoxAddReq> l = new ArrayList<>(); | ||
92 | for (GrassInBoxAddReq message : messageList) { | 93 | for (GrassInBoxAddReq message : messageList) { |
93 | - List<GrassInBoxAddReq> l = new ArrayList<>(); | ||
94 | l.add(message); | 94 | l.add(message); |
95 | if (l.size() % 1000 == 0) { | 95 | if (l.size() % 1000 == 0) { |
96 | sendMessage(l); | 96 | sendMessage(l); |
@@ -101,9 +101,9 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{ | @@ -101,9 +101,9 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{ | ||
101 | e.printStackTrace(); | 101 | e.printStackTrace(); |
102 | } | 102 | } |
103 | } | 103 | } |
104 | - if (CollectionUtils.isNotEmpty(l)) { | ||
105 | - sendMessage(l); | ||
106 | - } | 104 | + } |
105 | + if (CollectionUtils.isNotEmpty(l)) { | ||
106 | + sendMessage(l); | ||
107 | } | 107 | } |
108 | platformRedis.delete(MESSAGE_SENDING_FLAG); | 108 | platformRedis.delete(MESSAGE_SENDING_FLAG); |
109 | platformRedis.delete(MESSAGE_KEY); | 109 | platformRedis.delete(MESSAGE_KEY); |
-
Please register or login to post a comment