Merge branch 'master_test_gn' of http://60.1.1.230/backend/jieling_server into master_test_gn

back_recharge
jiahuiwen 2021-09-26 18:34:53 +08:00
commit 177b95c6fe
2 changed files with 26 additions and 5 deletions

View File

@ -128,8 +128,23 @@ public class GlobleSystemLogic implements IEventHandler {
}
}
}
public static long oneWeekTimelong = 604800000L;
/**
*
* @return
*/
public static boolean isOpenServer7(){
// 开服时间戳
long openTime = TimeUtils.stringToTimeLong2(GameApplication.serverConfig.getOpenTime());
long openServer7DayTime = openTime + oneWeekTimelong;
// 当前时间戳
long now = TimeUtils.now();
if(now >= openServer7DayTime){
return false;
}else{
return true;
}
}
/**
*
*
@ -138,12 +153,14 @@ public class GlobleSystemLogic implements IEventHandler {
* 2 50
*/
public void calCulRank() {
//开服前7天不开放跨服功能
/*if(isOpenServer7()){
return;
}*/
//不参与跨服,不用计算世界等级
if(!GameApplication.serverProperties.isArenaCross()){
return;
}
SMServerArenaSetting setting = STableManager.getConfig(SMServerArenaSetting.class).get(1);
int rankEndLine = setting.getWorldLevLimit();
double sum=0;

View File

@ -394,9 +394,13 @@ public class MailLogic {
//检测跨服分组邮件
Integer split = redisUtil.getMapValue(RedisKey.SERVER_SPLIT_MAIL_INFO, "", String.valueOf(GameApplication.serverId), Integer.class);
if(split!=null){
sendServerSplitMail();
//开服前七天不发跨服分组邮件
if(!GlobleSystemLogic.isOpenServer7()){
sendServerSplitMail();
}
redisUtil.removeMapEntrys(RedisKey.SERVER_SPLIT_MAIL_INFO, "", String.valueOf(GameApplication.serverId));
}
//检测个人邮件
Map<String, MailCache> mails =redisUtil.getMapValues(RedisKey.READY_TO_USER_MAIL, "", String.class, MailCache.class);
if (mails.size()<1){