miduo_server/tablemanager/src/main/java/config/SThemeActivityShop.java

95 lines
1.7 KiB
Java
Raw Normal View History

2021-12-02 15:16:02 +08:00
package config;
import manager.STableManager;
import manager.Table;
import java.util.HashMap;
import java.util.Map;
@Table(name ="ThemeActivityShop")
public class SThemeActivityShop implements BaseConfig {
private int id;
private int activityId;
private int type;
private int goodType;
private int goodId;
private int unlockDay;
private int visibleDay;
private int viewDay;
private int buyDay;
private int limitPackFId;
private int limitPackBId;
/**
* key: id value: <key: id value>
*/
public static Map<Integer, Map<Integer,SThemeActivityShop>> themeMap = new HashMap<>();
@Override
public void init() throws Exception {
Map<Integer, SThemeActivityShop> config = STableManager.getConfig(SThemeActivityShop.class);
config.values().forEach(v->{
Map<Integer, SThemeActivityShop> themeActivityShopMap = themeMap.getOrDefault(v.getActivityId(), new HashMap<>());
themeActivityShopMap.put(v.getId(),v);
themeMap.put(v.getActivityId(),themeActivityShopMap);
});
}
public int getId() {
return id;
}
public int getActivityId() {
return activityId;
}
public int getType() {
return type;
}
public int getGoodType() {
return goodType;
}
public int getGoodId() {
return goodId;
}
public int getUnlockDay() {
return unlockDay;
}
public int getVisibleDay() {
return visibleDay;
}
public int getViewDay() {
return viewDay;
}
public int getBuyDay() {
return buyDay;
}
public int getLimitPackFId() {
return limitPackFId;
}
public int getLimitPackBId() {
return limitPackBId;
}
}