51 lines
1.0 KiB
Java
51 lines
1.0 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
|
|
@Table(name ="UniversalWelfareConfig")
|
|
public class SUniversalWelfareConfig implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private int peolple;
|
|
|
|
private int[][] type;
|
|
|
|
private int rechargeCom;
|
|
|
|
private static Set<Integer> goods = new HashSet<>();
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
Map<Integer, SUniversalWelfareConfig> config = STableManager.getConfig(SUniversalWelfareConfig.class);
|
|
Set<Integer> set = config.values().stream().map(SUniversalWelfareConfig::getRechargeCom).collect(Collectors.toSet());
|
|
goods.clear();
|
|
goods = set;
|
|
}
|
|
|
|
public static Set<Integer> getGoods() {
|
|
return goods;
|
|
}
|
|
|
|
public int getid() {
|
|
return id;
|
|
}
|
|
|
|
public int getPeolple() {
|
|
return peolple;
|
|
}
|
|
|
|
public int[][] getType() {
|
|
return type;
|
|
}
|
|
|
|
public int getRechargeCom() {
|
|
return rechargeCom;
|
|
}
|
|
|
|
|
|
} |