Commit ffc7fd68 authored by tianbo's avatar tianbo

fix:大屏人员统计排除人员类型为字符串null报错

parent 04d22516
......@@ -577,8 +577,10 @@ public class ZLDPStatisticsServiceImpl {
Map<String, Integer> dataMap = new HashMap<>();
for (Map<String, String> map : list) {
JSONArray jsonArray = JSONArray.parseArray(map.get("new_post"));
for(int j = 0; j < jsonArray.size(); j++){
dataMap.put(jsonArray.getString(j), dataMap.getOrDefault(jsonArray.getString(j), 0) + 1);
if (!ValidationUtil.isEmpty(jsonArray)) {
for(int j = 0; j < jsonArray.size(); j++){
dataMap.put(jsonArray.getString(j), dataMap.getOrDefault(jsonArray.getString(j), 0) + 1);
}
}
}
Map<String, Object> returnMap = new HashMap<>();
......
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