Authored by 张帅

站内信每批次数量可配

@@ -89,11 +89,12 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{ @@ -89,11 +89,12 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{
89 89
90 //没有标记位,直接处理 90 //没有标记位,直接处理
91 if(sendTime == null){ 91 if(sendTime == null){
  92 + int batchSize = configReader.getInt("platform.grass.autoPraiseMessage.batchSize" , 500);
92 platformRedis.setValue(MESSAGE_SENDING_FLAG, DateUtil.getCurrentTimeSeconds(), 600); 93 platformRedis.setValue(MESSAGE_SENDING_FLAG, DateUtil.getCurrentTimeSeconds(), 600);
93 List<GrassInBoxAddReq> l = new ArrayList<>(); 94 List<GrassInBoxAddReq> l = new ArrayList<>();
94 for (GrassInBoxAddReq message : messageList) { 95 for (GrassInBoxAddReq message : messageList) {
95 l.add(message); 96 l.add(message);
96 - if (l.size() % 1000 == 0) { 97 + if (l.size() % batchSize == 0) {
97 sendMessage(l); 98 sendMessage(l);
98 l.clear(); 99 l.clear();
99 try { 100 try {