2022-09-07 10:36:57 +08:00
|
|
|
package config;
|
|
|
|
|
|
|
|
import manager.STableManager;
|
|
|
|
import manager.Table;
|
|
|
|
|
2022-09-15 14:43:55 +08:00
|
|
|
import java.util.*;
|
2022-09-07 10:36:57 +08:00
|
|
|
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;
|
|
|
|
|
2022-09-15 14:43:55 +08:00
|
|
|
private static Set<Integer> goods = new HashSet<>();
|
2022-09-07 10:36:57 +08:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void init() throws Exception {
|
|
|
|
Map<Integer, SUniversalWelfareConfig> config = STableManager.getConfig(SUniversalWelfareConfig.class);
|
2022-09-15 14:43:55 +08:00
|
|
|
Set<Integer> set = config.values().stream().map(SUniversalWelfareConfig::getRechargeCom).collect(Collectors.toSet());
|
|
|
|
goods.clear();
|
|
|
|
goods = set;
|
2022-09-07 10:36:57 +08:00
|
|
|
}
|
|
|
|
|
2022-09-15 14:43:55 +08:00
|
|
|
public static Set<Integer> getGoods() {
|
|
|
|
return goods;
|
2022-09-07 10:36:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public int getid() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getPeolple() {
|
|
|
|
return peolple;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int[][] getType() {
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getRechargeCom() {
|
|
|
|
return rechargeCom;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|