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

95 lines
1.7 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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;
}
}