package com.isec.iot.dao.dataanalysis.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.mongodb.core.aggregation.Aggregation;
import org.springframework.data.mongodb.core.aggregation.AggregationResults;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Repository;
import com.isec.iot.dao.dataanalysis.DataMAnalysisDao;
import com.isec.iot.dao.mongodb.MongoDBBaseDao;
import com.isec.iot.entity.CollectionData;
/***
* 数据监控分析dao
* */
@Repository
public class DataMAnalysisDaoImpl extends MongoDBBaseDao<CollectionData> implements DataMAnalysisDao {
/**
* 数据监控的charts查询
* */
@Override
public List<Object> searchCharts(Criteria criteria,String collectionName) {
//Date date1=new Date();
//第一个参数将内嵌的只文档张开,第二个参数查询条件,第3个为需要的字段,第四为按哪些字段排序
Aggregation aggr