Commit 2ea8e34e authored by Quxl's avatar Quxl

x

parent c2c8a965
...@@ -90,34 +90,34 @@ public class WebApiController { ...@@ -90,34 +90,34 @@ public class WebApiController {
Map<String, Object> extMap = playactorMM.get(String.valueOf(id)); Map<String, Object> extMap = playactorMM.get(String.valueOf(id));
{ {
List<Map<String, Object>> directorList = new ArrayList<Map<String, Object>>();
String director_cn = (String)extMap.get("director_cn"); String director_cn = (String)extMap.get("director_cn");
String director_en = (String)extMap.get("director_en"); String director_en = (String)extMap.get("director_en");
if(StringUtil.isNotBlank(director_cn)) { if(StringUtil.isNotBlank(director_cn)) {
String[] directorCnArray = director_cn.split(","); String[] directorCnArray = director_cn.split(",");
String[] directorEnArray = (director_en == null ? "" : director_en).split(",", directorCnArray.length); String[] directorEnArray = (director_en == null ? "" : director_en).split(",", directorCnArray.length);
List<Map<String, Object>> directorList = new ArrayList<Map<String, Object>>();
for(int i = 0; i < directorCnArray.length; i++) { for(int i = 0; i < directorCnArray.length; i++) {
Map<String, Object> directorMap = new HashMap<String,Object>(); Map<String, Object> directorMap = new HashMap<String,Object>();
directorMap.put("en_name", directorEnArray[i]); directorMap.put("en_name", directorEnArray[i]);
directorMap.put("cn_name", directorCnArray[i]); directorMap.put("cn_name", directorCnArray[i]);
directorList.add(directorMap); directorList.add(directorMap);
} }
map.put("directorList", directorList);
} }
map.put("directorList", directorList);
} { } {
List<Map<String, Object>> producerList = new ArrayList<Map<String, Object>>();
String producer_en = (String)extMap.get("producer_en"); String producer_en = (String)extMap.get("producer_en");
String production_en = (String)extMap.get("production_en"); String production_en = (String)extMap.get("production_en");
if(StringUtil.isNotBlank(producer_en)) { if(StringUtil.isNotBlank(producer_en)) {
String[] producerArray = producer_en.split(","); String[] producerArray = producer_en.split(",");
List<Map<String, Object>> producerList = new ArrayList<Map<String, Object>>();
for(int i = 0; i < producerArray.length; i++) { for(int i = 0; i < producerArray.length; i++) {
Map<String, Object> producerMap = new HashMap<String,Object>(); Map<String, Object> producerMap = new HashMap<String,Object>();
producerMap.put("producer_name", producerArray[i]); producerMap.put("producer_name", producerArray[i]);
producerMap.put("production_name", production_en); producerMap.put("production_name", production_en);
producerList.add(producerMap); producerList.add(producerMap);
} }
map.put("producerList", producerList);
} }
map.put("producerList", producerList);
} }
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