mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
Merge pull request #566 from lomodays207/master
解决 java.lang.NumberFormatException: For input string: "{"value":0,"relation":"eq"}" 问题
This commit is contained in:
@@ -336,7 +336,10 @@ public class BaseMetricESDAO extends BaseESDAO {
|
||||
if(null == response || null == response.getHits()
|
||||
|| null ==response.getHits().getUnusedMap()){return -1;}
|
||||
|
||||
return Integer.valueOf(response.getHits().getUnusedMap().getOrDefault(TOTAL, 0).toString());
|
||||
// "total" : {"value": 123 , "relation": "XX "}
|
||||
JSONObject jsonObjectTotal = (JSONObject) response.getHits().getUnusedMap().getOrDefault(TOTAL, 0);
|
||||
|
||||
return Integer.valueOf(jsonObjectTotal.get(VALUE).toString());
|
||||
}
|
||||
|
||||
protected <T extends BaseMetricESPO> T filterMetrics(T t, List<String> metricNames){
|
||||
|
||||
Reference in New Issue
Block a user