package config; import manager.STableManager; import manager.Table; import java.util.HashMap; import java.util.Map; @Table(name ="LuxuryFund") public class SLuxuryFund implements BaseConfig { private int id; private int type; private int day; private int[][] reward; /** * key: type value: < key: day value: SLuxuryFund对象 > */ public static Map> typeMap = new HashMap<>(); @Override public void init() throws Exception { Map config = STableManager.getConfig(SLuxuryFund.class); config.values().forEach(v->{ Map fundMap = typeMap.getOrDefault(v.getType(), new HashMap<>()); fundMap.put(v.getDay(),v); typeMap.put(v.getType(),fundMap); }); } public int getId() { return id; } public int getType() { return type; } public int getDay() { return day; } public int[][] getReward() { return reward; } }