136 lines
2.6 KiB
Java
136 lines
2.6 KiB
Java
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 ="GlobalSystemConfig")
|
|
public class SGlobalSystemConfig implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private int[] openRules;
|
|
|
|
private String systemOpen;
|
|
|
|
private String systemEnd;
|
|
|
|
private String seasonOpen;
|
|
|
|
private String seasonEnd;
|
|
|
|
private int seasonInterval;
|
|
|
|
|
|
private long systemOpenLong;
|
|
|
|
private long systemEndLong;
|
|
|
|
private long seasonOpenLong;
|
|
|
|
private long seasonEndLong;
|
|
|
|
private int isOpen;
|
|
|
|
private int type;
|
|
|
|
private int[][] openGifts;
|
|
|
|
private int isIDdSame;
|
|
|
|
public static Map<Integer, List<Integer>> idsByType;
|
|
@Override
|
|
public void init() throws Exception {
|
|
Map<Integer, List<Integer>> idsByTypeTmp = new HashMap<>();
|
|
STableManager.getConfig(SGlobalSystemConfig.class).forEach((id,item)->{
|
|
if(!idsByTypeTmp.containsKey(item.getType())){
|
|
idsByTypeTmp.put(item.getType(),new ArrayList<>());
|
|
}
|
|
idsByTypeTmp.get(item.getType()).add(item.getId());
|
|
});
|
|
idsByType = idsByTypeTmp;
|
|
}
|
|
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public int[] getOpenRules() {
|
|
return openRules;
|
|
}
|
|
|
|
public String getSystemOpen() {
|
|
return systemOpen;
|
|
}
|
|
|
|
public String getSystemEnd() {
|
|
return systemEnd;
|
|
}
|
|
|
|
public String getSeasonOpen() {
|
|
return seasonOpen;
|
|
}
|
|
|
|
public String getSeasonEnd() {
|
|
return seasonEnd;
|
|
}
|
|
|
|
public int getSeasonInterval() {
|
|
return seasonInterval;
|
|
}
|
|
|
|
|
|
|
|
public long getSystemOpenLong() {
|
|
return systemOpenLong;
|
|
}
|
|
|
|
public void setSystemOpenLong(long systemOpenLong) {
|
|
this.systemOpenLong = systemOpenLong;
|
|
}
|
|
|
|
public long getSystemEndLong() {
|
|
return systemEndLong;
|
|
}
|
|
|
|
public void setSystemEndLong(long systemEndLong) {
|
|
this.systemEndLong = systemEndLong;
|
|
}
|
|
|
|
public long getSeasonOpenLong() {
|
|
return seasonOpenLong;
|
|
}
|
|
|
|
public void setSeasonOpenLong(long seasonOpenLong) {
|
|
this.seasonOpenLong = seasonOpenLong;
|
|
}
|
|
|
|
public long getSeasonEndLong() {
|
|
return seasonEndLong;
|
|
}
|
|
|
|
public void setSeasonEndLong(long seasonEndLong) {
|
|
this.seasonEndLong = seasonEndLong;
|
|
}
|
|
|
|
public int getIsOpen() {
|
|
return isOpen;
|
|
}
|
|
|
|
public int getType() {
|
|
return type;
|
|
}
|
|
|
|
public int[][] getOpenGifts() {
|
|
return openGifts;
|
|
}
|
|
|
|
public int getIsIDdSame() {
|
|
return isIDdSame;
|
|
}
|
|
} |