package config; import manager.STableManager; import manager.Table; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @Table(name ="GodSacrificeConfig") public class SGodSacrificeConfig implements BaseConfig { private int id; private int activityId; private int rewardType; private int minRank; private int maxRank; private int[][] rankingReward; private int basLineScore; private int basLineRewardId; private static Map sGodSacrificeConfigMap; private static Map>> integerListMap=new HashMap<>(); @Override public void init() throws Exception { sGodSacrificeConfigMap = STableManager.getConfig(SGodSacrificeConfig.class); for (SGodSacrificeConfig sGodSacrificeConfig : sGodSacrificeConfigMap.values()) { int activityId = sGodSacrificeConfig.getActivityId(); Map> integerListHash = integerListMap.getOrDefault(sGodSacrificeConfig.getRewardType(),new HashMap<>()); if (!integerListHash.containsKey(activityId)) { integerListHash.put(activityId, new ArrayList<>()); } integerListHash.get(activityId).add(sGodSacrificeConfig); integerListMap.put(sGodSacrificeConfig.getRewardType(),integerListHash); } } public int getId() { return id; } public int getActivityId() { return activityId; } public int getRewardType() { return rewardType; } public int getMinRank() { return minRank; } public int getMaxRank() { return maxRank; } public int[][] getRankingReward() { return rankingReward; } public int getBasLineScore() { return basLineScore; } public int getBasLineRewardId() { return basLineRewardId; } public static Map getsGodSacrificeConfigMap() { return sGodSacrificeConfigMap; } public static Map>> getIntegerListMap() { return integerListMap; } }