优化代码

This commit is contained in:
zlt
2019-08-03 16:39:47 +08:00
parent 85aa8cc8d3
commit d61d0645bf
@@ -186,9 +186,8 @@ public class AggregationServiceImpl implements IAggregationService {
.setSize(0)
.get();
Aggregations aggregations = response.getAggregations();
Map<String, Object> result = null;
Map<String, Object> result = new HashMap<>(9);
if (aggregations != null) {
result = new HashMap<>(9);
setCurrDate(result, aggregations);
setCurrWeek(result, aggregations);
setCurrMonth(result, aggregations);