Commit 568ccfd1 authored by Quxl's avatar Quxl

x

parent 072543e4
...@@ -92,37 +92,43 @@ public class WebApiController { ...@@ -92,37 +92,43 @@ public class WebApiController {
} }
Map<String, Object> extMap = playactorMM.get(String.valueOf(id)); Map<String, Object> extMap = playactorMM.get(String.valueOf(id));
{ if(extMap != null) {
List<Map<String, Object>> directorList = new ArrayList<Map<String, Object>>(); {
String director_cn = (String)extMap.get("director_cn"); List<Map<String, Object>> directorList = new ArrayList<Map<String, Object>>();
String director_en = (String)extMap.get("director_en"); String director_cn = (String)extMap.get("director_cn");
if(StringUtil.isNotBlank(director_cn)) { String director_en = (String)extMap.get("director_en");
String[] directorCnArray = director_cn.split(","); if(StringUtil.isNotBlank(director_cn)) {
String[] directorEnArray = (director_en == null ? "" : director_en).split(",", directorCnArray.length); String[] directorCnArray = director_cn.split(",");
for(int i = 0; i < directorCnArray.length; i++) { String[] directorEnArray = (director_en == null ? "" : director_en).split(",", directorCnArray.length);
Map<String, Object> directorMap = new HashMap<String,Object>(); for(int i = 0; i < directorCnArray.length; i++) {
directorMap.put("en_name", directorEnArray[i]); Map<String, Object> directorMap = new HashMap<String,Object>();
directorMap.put("cn_name", directorCnArray[i]); directorMap.put("en_name", directorEnArray[i]);
directorList.add(directorMap); directorMap.put("cn_name", directorCnArray[i]);
directorList.add(directorMap);
}
} }
map.put("directorList", directorList);
} }
map.put("directorList", directorList);
} { {
List<String> producerList = new ArrayList<String>(); List<String> producerList = new ArrayList<String>();
String producer_en = (String)extMap.get("producer_en"); String producer_en = (String)extMap.get("producer_en");
if(StringUtil.isNotBlank(producer_en)) { if(StringUtil.isNotBlank(producer_en)) {
String[] producerArray = producer_en.split(","); String[] producerArray = producer_en.split(",");
producerList.addAll(Arrays.asList(producerArray)); producerList.addAll(Arrays.asList(producerArray));
}
map.put("producerList", producerList);
} }
map.put("producerList", producerList);
} { {
List<String> productionList = new ArrayList<String>(); List<String> productionList = new ArrayList<String>();
String production_en = (String)extMap.get("production_en"); String production_en = (String)extMap.get("production_en");
if(StringUtil.isNotBlank(production_en)) { if(StringUtil.isNotBlank(production_en)) {
String[] productionArray = production_en.split(","); String[] productionArray = production_en.split(",");
productionList.addAll(Arrays.asList(productionArray)); productionList.addAll(Arrays.asList(productionArray));
}
map.put("productionList", productionList);
} }
map.put("productionList", productionList);
} }
list.add(map); list.add(map);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment