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 ="TreasureSunlongTaskConfig") public class STreasureSunlongTaskConfig implements BaseConfig { private int id; private int activityId; private int type; private int taskType; private int[][] taskValue; private int[][] integral; private int weight; public static Map treasureTaskConfig; public static Map> taskTypeMap; public static Map> sTreasureTaskConfigListByTypeMapTmp; @Override public void init() throws Exception { treasureTaskConfig = STableManager.getConfig(STreasureSunlongTaskConfig.class); taskTypeMap = new HashMap<>(); sTreasureTaskConfigListByTypeMapTmp = new HashMap<>(); for(Map.Entry entry:treasureTaskConfig.entrySet()){ STreasureSunlongTaskConfig entryValue = entry.getValue(); taskTypeMap.computeIfAbsent(entryValue.getType(),v->new ArrayList<>()).add(entry.getKey()); sTreasureTaskConfigListByTypeMapTmp.computeIfAbsent(entryValue.getTaskType(),v->new ArrayList<>()).add(entryValue); } } public int getId() { return id; } public int getActivityId() { return activityId; } public int getType() { return type; } public int getTaskType() { return taskType; } public int[][] getTaskValue() { return taskValue; } public int[][] getIntegral() { return integral; } public int getWeight() { return weight; } }