74 lines
1.7 KiB
Java
74 lines
1.7 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 ="ThemeActivityTaskConfig")
|
||
|
|
public class SThemeActivityTaskConfig implements BaseConfig {
|
||
|
|
|
||
|
|
private int id;
|
||
|
|
|
||
|
|
private int activityId;
|
||
|
|
|
||
|
|
private int type;
|
||
|
|
|
||
|
|
private int taskType;
|
||
|
|
|
||
|
|
private int[][] taskValue;
|
||
|
|
|
||
|
|
private int[][] integral;
|
||
|
|
|
||
|
|
private int weight;
|
||
|
|
|
||
|
|
public static Map<Integer, SThemeActivityTaskConfig> idTaskConfig;
|
||
|
|
|
||
|
|
public static Map<Integer, List<Integer>> taskTypeMap;
|
||
|
|
|
||
|
|
public static Map<Integer,List<SThemeActivityTaskConfig>> sThemeTaskConfigListByTypeMapTmp;
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public void init() throws Exception {
|
||
|
|
idTaskConfig = STableManager.getConfig(SThemeActivityTaskConfig.class);
|
||
|
|
taskTypeMap = new HashMap<>();
|
||
|
|
sThemeTaskConfigListByTypeMapTmp = new HashMap<>();
|
||
|
|
for(Map.Entry<Integer, SThemeActivityTaskConfig> entry:idTaskConfig.entrySet()){
|
||
|
|
SThemeActivityTaskConfig entryValue = entry.getValue();
|
||
|
|
taskTypeMap.computeIfAbsent(entryValue.getType(),v->new ArrayList<>()).add(entry.getKey());
|
||
|
|
sThemeTaskConfigListByTypeMapTmp.computeIfAbsent(entryValue.getTaskType(),v->new ArrayList<>()).add(entryValue);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
public int getId() {
|
||
|
|
return id;
|
||
|
|
}
|
||
|
|
|
||
|
|
public int getActivityId() {
|
||
|
|
return activityId;
|
||
|
|
}
|
||
|
|
|
||
|
|
public int getType() {
|
||
|
|
return type;
|
||
|
|
}
|
||
|
|
|
||
|
|
public int getTaskType() {
|
||
|
|
return taskType;
|
||
|
|
}
|
||
|
|
|
||
|
|
public int[][] getTaskValue() {
|
||
|
|
return taskValue;
|
||
|
|
}
|
||
|
|
|
||
|
|
public int[][] getIntegral() {
|
||
|
|
return integral;
|
||
|
|
}
|
||
|
|
|
||
|
|
public int getWeight() {
|
||
|
|
return weight;
|
||
|
|
}
|
||
|
|
}
|