公会战力排行榜先不跨服

back_recharge
jiahuiwen 2022-04-28 15:31:35 +08:00
parent 3ecfc2b88f
commit 7f7c729752
4 changed files with 16 additions and 16 deletions

View File

@ -1424,7 +1424,7 @@ public class RedisUtil {
RedisKey.PLAYER_INFO_CACHE.equals(type) || RedisKey.FAMILY_INFO.equals(type) ||
RedisKey.PIDGIDTEMP.equals(type) || RedisKey.SERVER_WORLDLEVE_INFO.equals(type) ||
RedisKey.FAMILY_RED_PACKAGE.equals(type) || "red_remain_list".equals(type) ||
RedisKey.FAMILY_RED_PACKAGE_INCRE_ID.equals(type) || RedisKey.GUILD_FORCE_RANK.equals(type) ||
RedisKey.FAMILY_RED_PACKAGE_INCRE_ID.equals(type) || /*RedisKey.GUILD_FORCE_RANK.equals(type) ||*/
"red_already_list".equals(type) || RedisKey.CAR_DEALY_GUILD_FIGHT_PEOPLE_NUM.equals(type) ||
RedisKey.SERVER_SPLIT_INFO.equals(type) || RedisKey.FAMILY_LOGS.equals(type) ||
RedisKey.SERVER_SPLIT_MAIL_INFO.equals(type) || RedisKey.CROSS_ARENA_ROBOT_INFO.equals(type) ||

View File

@ -551,11 +551,6 @@ public class PlayerLogic {
}
private String getRewardOfDay(int goodsId,int days){
return "";
}
public CommonProto.TeamOneInfo.Builder getUserTeamOneInfo(int uid,int teamId) throws Exception {
User user = PlayerLogic.getInstance().getUserByRpc(uid);
CommonProto.TeamOneInfo.Builder oneInfo = CBean2Proto.getTeamOneInfo(user);

View File

@ -6,12 +6,10 @@ import com.ljsd.jieling.logic.dao.GuilidManager;
import com.ljsd.jieling.logic.dao.UserManager;
import com.ljsd.jieling.logic.dao.root.GuildInfo;
import com.ljsd.jieling.logic.dao.root.User;
import org.springframework.data.redis.core.ZSetOperations;
import rpc.protocols.CommonProto;
import rpc.protocols.PlayerInfoProto;
import org.springframework.data.redis.core.ZSetOperations;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
/**
@ -32,12 +30,19 @@ public class GuildForceRank extends AbstractRank {
@Override
public double getScore(double... data) {
return data[0];
Double zSetScore = RedisUtil.getInstence().getZSetScore(redisKey, "", Integer.toString((int) data[0]));
if (zSetScore <= 0) {
return 1800;
}
return zSetScore;
}
@Override
protected void getOptional(int index, ZSetOperations.TypedTuple<String> data, PlayerInfoProto.RankResponse.Builder builder) throws Exception {
GuildInfo guildInfo = GuilidManager.getGuildInfo(Integer.parseInt(data.getValue()));
if (guildInfo == null) {
return;
}
CommonProto.RankInfo.Builder everyRankInfo = CommonProto.RankInfo.newBuilder()
.setRank(index)
.setParam1(getParam1(data.getScore()))

View File

@ -53,24 +53,24 @@ public class HttpPool {
if (statusCode >= 200 && statusCode < 300) {
needBack = false;
String result = EntityUtils.toString(responseEntity, "UTF-8");
LOGGER.debug("Http Send第" + (sendTimes + 1) + "次调用成功,返回码为:[" + statusCode + "]");
LOGGER.info("Http Send第" + (sendTimes + 1) + "次调用成功,返回码为:[" + statusCode + "]");
return result;
// break;
} else {
LOGGER.error("Http Send第" + (sendTimes + 1) + "次调用出错,返回码为:[" + statusCode + "]");
LOGGER.info("Http Send第" + (sendTimes + 1) + "次调用出错,返回码为:[" + statusCode + "]");
if (sendTimes + 1 <= maxSendTimes) {
LOGGER.debug("Http Send" + (sendIntervalTime / 1000) + "秒后,重新发起请求...");
LOGGER.info("Http Send" + (sendIntervalTime / 1000) + "秒后,重新发起请求...");
try {
Thread.sleep(sendIntervalTime);
} catch (InterruptedException e) {
e.printStackTrace();
}
} else {
LOGGER.debug("Http Send达到重发最大次数退出程序");
LOGGER.info("Http Send达到重发最大次数退出程序");
}
}
} catch (IOException e) {
LOGGER.error("Http Send error", e);
LOGGER.info("Http Send error", e);
} finally {
sendTimes++;
if (httpResponse != null) {
@ -78,7 +78,7 @@ public class HttpPool {
try {
EntityUtils.consume(responseEntity);
} catch (IOException e) {
LOGGER.error("EntityUtils.consume(responseEntity)", e);
LOGGER.info("EntityUtils.consume(responseEntity)", e);
}
}
}