back_recharge
parent
cdda1b414e
commit
f8d7247ae3
|
@ -96,6 +96,7 @@ public class CrossLingmaiSecretAreaBattleHandler extends BaseHandler<ArenaInfoPr
|
|||
return;
|
||||
}
|
||||
String serverName = CrossServiceLogic.simplifyServerName(GameApplication.serverId);
|
||||
String key = RedisKey.CROSS_LINGMAISECRET_INFO;
|
||||
int nowInt = TimeUtils.nowInt();
|
||||
//没人占领 攻击机器人 pve
|
||||
if (!lingMaiMap.containsKey(String.valueOf(id))) {
|
||||
|
@ -121,14 +122,14 @@ public class CrossLingmaiSecretAreaBattleHandler extends BaseHandler<ArenaInfoPr
|
|||
LingMaiSecretArea myLingmai = lingMaiMap.get(String.valueOf(myLingmaiId));
|
||||
CrossLingmaiLogic.getInstance().sendNormalMail(uid,myLingmai);
|
||||
//清除已有灵脉数据
|
||||
RedisUtil.getInstence().removeMapEntrys(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey, String.valueOf(myLingmaiId));
|
||||
RedisUtil.getInstence().removeMapEntrys(key, groupKey, String.valueOf(myLingmaiId));
|
||||
}
|
||||
LingMaiSecretArea lingMaiSecretArea = new LingMaiSecretArea();
|
||||
lingMaiSecretArea.setId(id);
|
||||
lingMaiSecretArea.setUid(uid);
|
||||
lingMaiSecretArea.setServerName(serverName);
|
||||
lingMaiSecretArea.setOccupyTime(nowInt);
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey, String.valueOf(id), lingMaiSecretArea);
|
||||
RedisUtil.getInstence().putMapEntry(key, groupKey, String.valueOf(id), lingMaiSecretArea);
|
||||
}
|
||||
res.setResult(fightResult.getResult());
|
||||
}
|
||||
|
@ -171,19 +172,19 @@ public class CrossLingmaiSecretAreaBattleHandler extends BaseHandler<ArenaInfoPr
|
|||
LingMaiSecretArea myLingmai = lingMaiMap.get(String.valueOf(myLingmaiId));
|
||||
CrossLingmaiLogic.getInstance().sendNormalMail(uid,myLingmai);
|
||||
//清除已有灵脉数据
|
||||
RedisUtil.getInstence().removeMapEntrys(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey, String.valueOf(myLingmai.getId()));
|
||||
RedisUtil.getInstence().removeMapEntrys(key, groupKey, String.valueOf(myLingmai.getId()));
|
||||
}
|
||||
// 给失败者发邮件
|
||||
LingMaiSecretArea nowLingMai = lingMaiMap.get(String.valueOf(id));
|
||||
CrossLingmaiLogic.getInstance().sendBeAckMail(nowLingMai.getUid(),nowLingMai,uid);
|
||||
//清除已有灵脉数据
|
||||
RedisUtil.getInstence().removeMapEntrys(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey, String.valueOf(nowLingMai.getId()));
|
||||
RedisUtil.getInstence().removeMapEntrys(key, groupKey, String.valueOf(nowLingMai.getId()));
|
||||
|
||||
// 更新灵脉信息
|
||||
nowLingMai.setUid(uid);
|
||||
nowLingMai.setServerName(serverName);
|
||||
nowLingMai.setOccupyTime(nowInt);
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey, String.valueOf(id), nowLingMai);
|
||||
RedisUtil.getInstence().putMapEntry(key, groupKey, String.valueOf(id), nowLingMai);
|
||||
|
||||
//挑战者记录
|
||||
String key1 = RedisKey.getKey(RedisKey.CROSS_LINGMAISECRET_RECORD, String.valueOf(user.getId()), false);
|
||||
|
|
|
@ -1,26 +1,23 @@
|
|||
package com.ljsd.jieling.logic.arena;
|
||||
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.fight.LingMaiSecretArea;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.logic.GlobleSystemLogic;
|
||||
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
import com.ljsd.jieling.logic.rank.RankContext;
|
||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
||||
import config.*;
|
||||
import config.SErrorCodeEerverConfig;
|
||||
import config.SLodeConfig;
|
||||
import config.SMServerLodeSetting;
|
||||
import config.SSpecialConfig;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import util.StringUtil;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 跨服 灵脉秘境
|
||||
|
@ -55,9 +52,10 @@ public class CrossLingmaiLogic {
|
|||
int[][] restTime = setting.getRestTime();
|
||||
int[][] battleTime = setting.getBattleTime();
|
||||
long mondayZeroTime = TimeUtils.getWeekZero(1);
|
||||
long now = TimeUtils.now();
|
||||
//休战期
|
||||
for (int[] everyTime : restTime) {
|
||||
if (TimeUtils.now() >= mondayZeroTime + everyTime[0] * 1000L && TimeUtils.now() <= mondayZeroTime + everyTime[1] * 1000L) {
|
||||
if (now >= mondayZeroTime + everyTime[0] * 1000L && now <= mondayZeroTime + everyTime[1] * 1000L) {
|
||||
result[0] = 2;
|
||||
result[1] = (int) (mondayZeroTime / 1000) + everyTime[1];
|
||||
return;
|
||||
|
@ -65,7 +63,7 @@ public class CrossLingmaiLogic {
|
|||
}
|
||||
//抢夺期
|
||||
for (int[] everyTime : battleTime) {
|
||||
if (TimeUtils.now() > mondayZeroTime + everyTime[0] * 1000L && TimeUtils.now() < mondayZeroTime + everyTime[1] * 1000L) {
|
||||
if (now > mondayZeroTime + everyTime[0] * 1000L && now < mondayZeroTime + everyTime[1] * 1000L) {
|
||||
result[0] = 1;
|
||||
result[1] = (int) (mondayZeroTime / 1000) + everyTime[1];
|
||||
return;
|
||||
|
@ -97,9 +95,10 @@ public class CrossLingmaiLogic {
|
|||
|
||||
public Map<String, LingMaiSecretArea> getLingmaiMap(int crossGroup, int group){
|
||||
int nowInt = TimeUtils.nowInt();
|
||||
String key = RedisKey.CROSS_LINGMAISECRET_INFO;
|
||||
String groupKey = crossGroup + RedisKey.Delimiter_colon + group;
|
||||
int second = SSpecialConfig.getIntegerValue(SSpecialConfig.lingmai_basic_configuration);
|
||||
Map<String, LingMaiSecretArea> mapValues = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey, String.class, LingMaiSecretArea.class);
|
||||
Map<String, LingMaiSecretArea> mapValues = RedisUtil.getInstence().getMapValues(key, groupKey, String.class, LingMaiSecretArea.class);
|
||||
Iterator<Map.Entry<String, LingMaiSecretArea>> iterator = mapValues.entrySet().iterator();
|
||||
while (iterator.hasNext()){
|
||||
Map.Entry<String, LingMaiSecretArea> next = iterator.next();
|
||||
|
@ -108,7 +107,7 @@ public class CrossLingmaiLogic {
|
|||
if (time > second){
|
||||
iterator.remove();
|
||||
sendNormalMail(lingMaiSecretArea.getUid(),lingMaiSecretArea);
|
||||
RedisUtil.getInstence().removeMapEntrys(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey, String.valueOf(lingMaiSecretArea.getId()));
|
||||
RedisUtil.getInstence().removeMapEntrys(key, groupKey, String.valueOf(lingMaiSecretArea.getId()));
|
||||
}
|
||||
}
|
||||
return mapValues;
|
||||
|
@ -154,25 +153,25 @@ public class CrossLingmaiLogic {
|
|||
LOGGER.info("跨服灵脉,零点重置, key:{} 跨服分组 ={},未获取到锁",lockKey, crossGroup);
|
||||
return;
|
||||
}
|
||||
|
||||
String key = RedisKey.CROSS_LINGMAISECRET_INFO;
|
||||
// 清理组别1
|
||||
String groupKey1 = crossGroup + RedisKey.Delimiter_colon + 1;
|
||||
Map<String, LingMaiSecretArea> mapValues = redisUtil.getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey1, String.class, LingMaiSecretArea.class);
|
||||
Map<String, LingMaiSecretArea> mapValues = redisUtil.getMapValues(key, groupKey1, String.class, LingMaiSecretArea.class);
|
||||
for (LingMaiSecretArea value : mapValues.values()) {
|
||||
sendNormalMail(value.getUid(),value);
|
||||
}
|
||||
String key1 = redisUtil.getKey(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey1);
|
||||
String key1 = redisUtil.getKey(key, groupKey1);
|
||||
redisUtil.del(key1);
|
||||
LOGGER.info("灵脉初始化,key:{}, 长度:{}",key1,mapValues.size());
|
||||
mapValues.clear();
|
||||
|
||||
// 清理组别2
|
||||
String groupKey2 = crossGroup + RedisKey.Delimiter_colon + 2;
|
||||
Map<String, LingMaiSecretArea> mapValue2 = redisUtil.getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey1, String.class, LingMaiSecretArea.class);
|
||||
Map<String, LingMaiSecretArea> mapValue2 = redisUtil.getMapValues(key, groupKey1, String.class, LingMaiSecretArea.class);
|
||||
for (LingMaiSecretArea value : mapValue2.values()) {
|
||||
sendNormalMail(value.getUid(),value);
|
||||
}
|
||||
String key2 = redisUtil.getKey(RedisKey.CROSS_LINGMAISECRET_INFO, groupKey2);
|
||||
String key2 = redisUtil.getKey(key, groupKey2);
|
||||
redisUtil.del(key2);
|
||||
LOGGER.info("灵脉初始化,key:{}, 长度:{}",key2,mapValue2.size());
|
||||
mapValue2.clear();
|
||||
|
@ -181,111 +180,110 @@ public class CrossLingmaiLogic {
|
|||
redisUtil.del(lockKey);
|
||||
}
|
||||
|
||||
|
||||
public static LingMaiSecretArea getLingaMaiData(int id, int uid,int crossGroup,int group) {
|
||||
//排行榜上有数据 灵脉里没数据 说明被打下去了
|
||||
AbstractRank rank = RankContext.getRankEnum(RankEnum.CROSS_LINGMAI_RANK_PERSON.getType());
|
||||
double disappearScore = rank.getScoreById(uid, crossGroup + RedisKey.Delimiter_colon + group);
|
||||
LingMaiSecretArea lingMaiSecretArea = new LingMaiSecretArea();
|
||||
lingMaiSecretArea.setId(id);
|
||||
lingMaiSecretArea.setUid(uid);
|
||||
String serverName = CrossServiceLogic.simplifyServerName(GameApplication.serverId);
|
||||
lingMaiSecretArea.setServerName(serverName);
|
||||
//lingMaiSecretArea.setName(user.getPlayerInfoManager().getNickName());
|
||||
lingMaiSecretArea.setGetAwardTimeOrOccupyTime(TimeUtils.nowInt());
|
||||
lingMaiSecretArea.setBeginOccupyTime(TimeUtils.nowInt());
|
||||
if(disappearScore>0){
|
||||
Map<String, LingMaiSecretArea> lingMaiMap = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + group, String.class, LingMaiSecretArea.class);
|
||||
if(lingMaiMap.values().stream().noneMatch(n->n.getUid()==uid)){
|
||||
lingMaiSecretArea.setScore1((int) disappearScore);
|
||||
}
|
||||
}
|
||||
return lingMaiSecretArea;
|
||||
}
|
||||
|
||||
/**
|
||||
* 占领奖励 每十分钟发放一次
|
||||
*/
|
||||
public void sendOccypyReward() {
|
||||
//周二 四 六 日开放 9点-21点
|
||||
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
if (crossGroup == -1) {
|
||||
return;
|
||||
}
|
||||
Map<String, LingMaiSecretArea> lingMaiMap1 = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + 1, String.class, LingMaiSecretArea.class);
|
||||
Map<String, LingMaiSecretArea> lingMaiMap2 = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + 2, String.class, LingMaiSecretArea.class);
|
||||
updateLingmaiData(lingMaiMap1, crossGroup, 1);
|
||||
updateLingmaiData(lingMaiMap2, crossGroup, 2);
|
||||
}
|
||||
|
||||
|
||||
public static void updateLingmaiData(Map<String, LingMaiSecretArea> lingMaiMap, int crossGroup, int group) {
|
||||
int nowTime = TimeUtils.nowInt();
|
||||
String groupkey = crossGroup + RedisKey.Delimiter_colon + group;
|
||||
for (Map.Entry<String, LingMaiSecretArea> map : lingMaiMap.entrySet()) {
|
||||
try {
|
||||
User user = UserManager.getUser(map.getValue().getUid());
|
||||
if (user != null) {
|
||||
SLodeConfig config = SLodeConfig.lodeConfig.get(map.getValue().getId());
|
||||
if (config != null) {
|
||||
int occupyTime = (int) map.getValue().getGetAwardTimeOrOccupyTime();
|
||||
//分钟
|
||||
int minute = (nowTime - occupyTime) / 60;
|
||||
//秒
|
||||
int second = Math.min((nowTime - occupyTime) % 60, 60);
|
||||
//difVal =1 ;
|
||||
LOGGER.error("玩家" + map.getValue().getUid() + "原有秒:"+map.getValue().getOccupyTime()+" 获得秒:" + (minute*60+second));
|
||||
map.getValue().setOccupyTime(map.getValue().getOccupyTime() + minute*60+second);
|
||||
map.getValue().setGetAwardTimeOrOccupyTime(nowTime);
|
||||
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.CROSS_LINGMAISECRET_INFO, groupkey, map.getKey(), map.getValue());
|
||||
AbstractRank rank = RankContext.getRankEnum(RankEnum.CROSS_LINGMAI_RANK_PERSON.getType());
|
||||
LOGGER.error("minute:"+map.getValue().getOccupyTime()+" per:"+(config.getRewardList()[0][1]/60));
|
||||
long score = (long)map.getValue().getOccupyTime() * config.getRewardList()[0][1]/60 + map.getValue().getScore1();
|
||||
double test = rank.getScoreById(user.getId(), groupkey);
|
||||
LOGGER.error("之前是:" + test + "之后是:" + score);
|
||||
rank.addRank(user.getId(), groupkey, score);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 结算奖励
|
||||
*/
|
||||
public void sendMailReward() {
|
||||
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
if (crossGroup == -1) {
|
||||
return;
|
||||
}
|
||||
String rkey1 = RedisUtil.getInstence().getKey(RedisKey.CROSS_LINGMAI_RANK_PERSON, crossGroup + RedisKey.Delimiter_colon + "1");
|
||||
String rkey2 = RedisUtil.getInstence().getKey(RedisKey.CROSS_LINGMAI_RANK_PERSON, crossGroup + RedisKey.Delimiter_colon + "2");
|
||||
Set<String> arenaRank1 = RedisUtil.getInstence().getReverseZset(rkey1, 0, -1);
|
||||
Set<String> arenaRank2 = RedisUtil.getInstence().getReverseZset(rkey2, 0, -1);
|
||||
sendMailReward(arenaRank1);
|
||||
sendMailReward(arenaRank2);
|
||||
}
|
||||
|
||||
public void sendMailReward(Set<String> arenaRank) {
|
||||
List<Integer> arenaRankfilt = arenaRank.stream().mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("LingmaiReward_mail_title");
|
||||
for (int i = 0; i < arenaRankfilt.size(); i++) {
|
||||
SLodeRankReward config = SLodeRankReward.getIdByScore(i + 1);
|
||||
if (config == null){
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("LingmaiReward_mail_txt", new Object[]{(i + 1)}, new int[0], "#");
|
||||
MailLogic.getInstance().sendMail(arenaRankfilt.get(i), title, content,
|
||||
StringUtil.parseArrayToString(config.getSeasonReward()), TimeUtils.nowInt(), Global.MAIL_EFFECTIVE_TIME);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
// public static LingMaiSecretArea getLingaMaiData(int id, int uid,int crossGroup,int group) {
|
||||
// //排行榜上有数据 灵脉里没数据 说明被打下去了
|
||||
// AbstractRank rank = RankContext.getRankEnum(RankEnum.CROSS_LINGMAI_RANK_PERSON.getType());
|
||||
// double disappearScore = rank.getScoreById(uid, crossGroup + RedisKey.Delimiter_colon + group);
|
||||
// LingMaiSecretArea lingMaiSecretArea = new LingMaiSecretArea();
|
||||
// lingMaiSecretArea.setId(id);
|
||||
// lingMaiSecretArea.setUid(uid);
|
||||
// String serverName = CrossServiceLogic.simplifyServerName(GameApplication.serverId);
|
||||
// lingMaiSecretArea.setServerName(serverName);
|
||||
// //lingMaiSecretArea.setName(user.getPlayerInfoManager().getNickName());
|
||||
// lingMaiSecretArea.setGetAwardTimeOrOccupyTime(TimeUtils.nowInt());
|
||||
// lingMaiSecretArea.setBeginOccupyTime(TimeUtils.nowInt());
|
||||
// if(disappearScore>0){
|
||||
// Map<String, LingMaiSecretArea> lingMaiMap = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + group, String.class, LingMaiSecretArea.class);
|
||||
// if(lingMaiMap.values().stream().noneMatch(n->n.getUid()==uid)){
|
||||
// lingMaiSecretArea.setScore1((int) disappearScore);
|
||||
// }
|
||||
// }
|
||||
// return lingMaiSecretArea;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 占领奖励 每十分钟发放一次
|
||||
// */
|
||||
// public void sendOccypyReward() {
|
||||
// //周二 四 六 日开放 9点-21点
|
||||
// int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
// if (crossGroup == -1) {
|
||||
// return;
|
||||
// }
|
||||
// Map<String, LingMaiSecretArea> lingMaiMap1 = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + 1, String.class, LingMaiSecretArea.class);
|
||||
// Map<String, LingMaiSecretArea> lingMaiMap2 = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + 2, String.class, LingMaiSecretArea.class);
|
||||
// updateLingmaiData(lingMaiMap1, crossGroup, 1);
|
||||
// updateLingmaiData(lingMaiMap2, crossGroup, 2);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public static void updateLingmaiData(Map<String, LingMaiSecretArea> lingMaiMap, int crossGroup, int group) {
|
||||
// int nowTime = TimeUtils.nowInt();
|
||||
// String groupkey = crossGroup + RedisKey.Delimiter_colon + group;
|
||||
// for (Map.Entry<String, LingMaiSecretArea> map : lingMaiMap.entrySet()) {
|
||||
// try {
|
||||
// User user = UserManager.getUser(map.getValue().getUid());
|
||||
// if (user != null) {
|
||||
// SLodeConfig config = SLodeConfig.lodeConfig.get(map.getValue().getId());
|
||||
// if (config != null) {
|
||||
// int occupyTime = (int) map.getValue().getGetAwardTimeOrOccupyTime();
|
||||
// //分钟
|
||||
// int minute = (nowTime - occupyTime) / 60;
|
||||
// //秒
|
||||
// int second = Math.min((nowTime - occupyTime) % 60, 60);
|
||||
// //difVal =1 ;
|
||||
// LOGGER.error("玩家" + map.getValue().getUid() + "原有秒:"+map.getValue().getOccupyTime()+" 获得秒:" + (minute*60+second));
|
||||
// map.getValue().setOccupyTime(map.getValue().getOccupyTime() + minute*60+second);
|
||||
// map.getValue().setGetAwardTimeOrOccupyTime(nowTime);
|
||||
//
|
||||
// RedisUtil.getInstence().putMapEntry(RedisKey.CROSS_LINGMAISECRET_INFO, groupkey, map.getKey(), map.getValue());
|
||||
// AbstractRank rank = RankContext.getRankEnum(RankEnum.CROSS_LINGMAI_RANK_PERSON.getType());
|
||||
// LOGGER.error("minute:"+map.getValue().getOccupyTime()+" per:"+(config.getRewardList()[0][1]/60));
|
||||
// long score = (long)map.getValue().getOccupyTime() * config.getRewardList()[0][1]/60 + map.getValue().getScore1();
|
||||
// double test = rank.getScoreById(user.getId(), groupkey);
|
||||
// LOGGER.error("之前是:" + test + "之后是:" + score);
|
||||
// rank.addRank(user.getId(), groupkey, score);
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 结算奖励
|
||||
// */
|
||||
// public void sendMailReward() {
|
||||
// int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
// if (crossGroup == -1) {
|
||||
// return;
|
||||
// }
|
||||
// String rkey1 = RedisUtil.getInstence().getKey(RedisKey.CROSS_LINGMAI_RANK_PERSON, crossGroup + RedisKey.Delimiter_colon + "1");
|
||||
// String rkey2 = RedisUtil.getInstence().getKey(RedisKey.CROSS_LINGMAI_RANK_PERSON, crossGroup + RedisKey.Delimiter_colon + "2");
|
||||
// Set<String> arenaRank1 = RedisUtil.getInstence().getReverseZset(rkey1, 0, -1);
|
||||
// Set<String> arenaRank2 = RedisUtil.getInstence().getReverseZset(rkey2, 0, -1);
|
||||
// sendMailReward(arenaRank1);
|
||||
// sendMailReward(arenaRank2);
|
||||
// }
|
||||
//
|
||||
// public void sendMailReward(Set<String> arenaRank) {
|
||||
// List<Integer> arenaRankfilt = arenaRank.stream().mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
|
||||
// String title = SErrorCodeEerverConfig.getI18NMessage("LingmaiReward_mail_title");
|
||||
// for (int i = 0; i < arenaRankfilt.size(); i++) {
|
||||
// SLodeRankReward config = SLodeRankReward.getIdByScore(i + 1);
|
||||
// if (config == null){
|
||||
// continue;
|
||||
// }
|
||||
// try {
|
||||
// String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("LingmaiReward_mail_txt", new Object[]{(i + 1)}, new int[0], "#");
|
||||
// MailLogic.getInstance().sendMail(arenaRankfilt.get(i), title, content,
|
||||
// StringUtil.parseArrayToString(config.getSeasonReward()), TimeUtils.nowInt(), Global.MAIL_EFFECTIVE_TIME);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
public static class Instance {
|
||||
public final static CrossLingmaiLogic instance = new CrossLingmaiLogic();
|
||||
|
|
|
@ -54,6 +54,7 @@ public class MailLogic {
|
|||
for (Mail mail : mailMap.values()) {
|
||||
sendMail(mail);
|
||||
}
|
||||
RedisUtil.getInstence().del(key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -245,13 +245,6 @@ public class MinuteTask extends Thread {
|
|||
FourChallengeLogic.getInstance().check();
|
||||
// 助战
|
||||
HelpHeroLogic.getInstance().zeroClearRedisHelp();
|
||||
|
||||
//灵脉秘境占位数据重置
|
||||
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
if (crossGroup != -1){
|
||||
RedisUtil.getInstence().remove(RedisUtil.getInstence().getKey(RedisKey.CROSS_LINGMAISECRET_INFO,crossGroup + RedisKey.Delimiter_colon + 1,true));
|
||||
RedisUtil.getInstence().remove(RedisUtil.getInstence().getKey(RedisKey.CROSS_LINGMAISECRET_INFO,crossGroup + RedisKey.Delimiter_colon + 2,true));
|
||||
}
|
||||
//探索排行每日重置
|
||||
/*String key = RedisUtil.getInstence().getKey(RedisKey.EXPLORE_RANK,"",true);
|
||||
Set<String> exploreRank = RedisUtil.getInstence().getReverseZset(key,0,-1);
|
||||
|
|
Loading…
Reference in New Issue