85 lines
1.6 KiB
Java
85 lines
1.6 KiB
Java
|
package config;
|
||
|
|
||
|
|
||
|
import manager.STableManager;
|
||
|
import manager.Table;
|
||
|
|
||
|
import java.util.HashMap;
|
||
|
import java.util.Map;
|
||
|
|
||
|
@Table(name ="GuildRedPackConfig")
|
||
|
public class SGuildRedPackConfig implements BaseConfig {
|
||
|
|
||
|
private int id;
|
||
|
|
||
|
private int dailyNum;
|
||
|
|
||
|
private int[] totalMoney;
|
||
|
|
||
|
private int num;
|
||
|
|
||
|
private int reward;
|
||
|
|
||
|
private int lastTime;
|
||
|
|
||
|
private int minPercent;
|
||
|
|
||
|
private int maxPercent;
|
||
|
|
||
|
private int tradeId;
|
||
|
|
||
|
public static Map<Integer,SGuildRedPackConfig> sGuildRedPackConfigMap;
|
||
|
|
||
|
public static Map<Integer,SGuildRedPackConfig> sGuildRedPackByGoodsId;
|
||
|
|
||
|
@Override
|
||
|
public void init() throws Exception {
|
||
|
sGuildRedPackConfigMap = STableManager.getConfig(SGuildRedPackConfig.class);
|
||
|
sGuildRedPackByGoodsId = new HashMap<>();
|
||
|
for(Map.Entry<Integer,SGuildRedPackConfig> entry:sGuildRedPackConfigMap.entrySet()){
|
||
|
int tradeId = entry.getValue().getTradeId();
|
||
|
if(!sGuildRedPackConfigMap.containsKey(tradeId)){
|
||
|
sGuildRedPackByGoodsId.put(tradeId,entry.getValue());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
public int getId() {
|
||
|
return id;
|
||
|
}
|
||
|
|
||
|
public int getDailyNum() {
|
||
|
return dailyNum;
|
||
|
}
|
||
|
|
||
|
public int[] getTotalMoney() {
|
||
|
return totalMoney;
|
||
|
}
|
||
|
|
||
|
public int getNum() {
|
||
|
return num;
|
||
|
}
|
||
|
|
||
|
public int getReward() {
|
||
|
return reward;
|
||
|
}
|
||
|
|
||
|
public int getLastTime() {
|
||
|
return lastTime;
|
||
|
}
|
||
|
|
||
|
public int getMinPercent() {
|
||
|
return minPercent;
|
||
|
}
|
||
|
|
||
|
public int getMaxPercent() {
|
||
|
return maxPercent;
|
||
|
}
|
||
|
|
||
|
public int getTradeId() {
|
||
|
return tradeId;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|