...
|
...
|
@@ -9,6 +9,7 @@ import java.util.Map; |
|
|
import javax.annotation.PostConstruct;
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
import com.yoho.service.model.union.AppTypeModel;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Component;
|
...
|
...
|
@@ -28,6 +29,8 @@ public class LoaderData { |
|
|
|
|
|
@Resource
|
|
|
Map<String, Object> unionTypeMap = null;
|
|
|
@Resource
|
|
|
Map<String, Object> appTypeMap = null;
|
|
|
|
|
|
/**
|
|
|
* 初始化参数
|
...
|
...
|
@@ -35,14 +38,23 @@ public class LoaderData { |
|
|
@PostConstruct
|
|
|
public void init() {
|
|
|
log.info("begin LoaderData");
|
|
|
List<Map<String, Object>> list = (List<Map<String, Object>>) unionTypeMap.get("union_types");
|
|
|
UnionTypeModel unionType = null;
|
|
|
for (Map<String, Object> map : list) {
|
|
|
List<Map<String, Object>> unionTypeList = (List<Map<String, Object>>) unionTypeMap.get("union_types");
|
|
|
UnionTypeModel unionType;
|
|
|
for (Map<String, Object> map : unionTypeList) {
|
|
|
unionType = new UnionTypeModel();
|
|
|
unionType.setValue((int) map.get("value"));
|
|
|
unionType.setName((String) map.get("name"));
|
|
|
UnionConstant.unionTypeMap.put(unionType.getValue(), unionType);
|
|
|
}
|
|
|
|
|
|
List<Map<String, Object>> appTypeList = (List<Map<String, Object>>) appTypeMap.get("app_types");
|
|
|
AppTypeModel appType;
|
|
|
for (Map<String, Object> map : appTypeList) {
|
|
|
appType = new AppTypeModel();
|
|
|
appType.setValue((int) map.get("value"));
|
|
|
appType.setName((String) map.get("name"));
|
|
|
UnionConstant.appTypeMap.put(appType.getValue(), appType);
|
|
|
}
|
|
|
log.info("end LoaderData");
|
|
|
}
|
|
|
} |
...
|
...
|
|