补充:跨服分组兼容,当分组id<=0时,表示不用跨服

back_recharge
duhui 2022-02-21 17:17:35 +08:00
parent dc0eacd113
commit 803280eaf0
1 changed files with 10 additions and 1 deletions

View File

@ -270,7 +270,16 @@ public class GlobleSystemLogic implements IEventHandler {
// }});
// 分组逻辑
Map<String, Integer> split = redisUtil.getMapValues(RedisKey.CROSS_SERVER_GROUP, "", String.class, Integer.class);
Map<String, Integer> cross = redisUtil.getMapValues(RedisKey.CROSS_SERVER_GROUP, "", String.class, Integer.class);
Map<String, Integer> split = new HashMap<>();
// 遍历gm分组剔除所有分组id小于等于0的分组这些默认不跨服
for (Map.Entry<String, Integer> entry : cross.entrySet()) {
if (entry.getValue()<=0){
continue;
}
split.put(entry.getKey(),entry.getValue());
}
redisUtil.putMapEntrys(RedisKey.SERVER_SPLIT_INFO,"",split);
//发分组邮件
split.keySet().forEach(server->redisUtil.putMapEntry(RedisKey.SERVER_SPLIT_MAIL_INFO,"",server,0));