back_recharge
wangyuan 2019-06-13 20:55:56 +08:00
parent 2348065005
commit 58e38789a9
1 changed files with 0 additions and 59 deletions

View File

@ -1,59 +0,0 @@
package com.ljsd.jieling.config;
import com.ljsd.jieling.logic.STableManager;
import com.ljsd.jieling.logic.Table;
import java.util.HashMap;
import java.util.Map;
@Table(name ="AccomplishmentBox")
public class SAccomplishmentBox implements BaseConfig {
private int id;
private int total;
private int[][] box;
private Map<Integer,Integer> boxMap;
private static Map<Integer, SAccomplishmentBox> sAccomplishmentBoxMap;
@Override
public void init() throws Exception {
Map<Integer, SAccomplishmentBox> config = STableManager.getConfig(SAccomplishmentBox.class);
for(SAccomplishmentBox sAccomplishmentBox : config.values()){
int[][] box = sAccomplishmentBox.getBox();
Map<Integer,Integer> boxMapTmp = new HashMap<>();
for(int [] boxItem : box){
boxMapTmp.put(boxItem[0],boxItem[1]);
}
sAccomplishmentBox.setBoxMap(boxMapTmp);
}
sAccomplishmentBoxMap = config;
}
public static SAccomplishmentBox getsAccomplishmentBoxByMapId( int mapId ) {
return sAccomplishmentBoxMap.get(mapId);
}
public int getid() {
return id;
}
public int getTotal() {
return total;
}
public int[][] getBox() {
return box;
}
public Map<Integer, Integer> getBoxMap() {
return boxMap;
}
public void setBoxMap(Map<Integer, Integer> boxMap) {
this.boxMap = boxMap;
}
}