| | |
| | | @Repository
|
| | | public class TeamDailyRecordDao extends MongodbBaseDao<TeamDailyRecord> {
|
| | |
|
| | | private static String collectionName = "team_daily_Record";
|
| | | private static String collectionName = "teamDailyRecord";
|
| | |
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | Map<String, Object> map = new HashMap<>();
|
| | | map.put("firstDaRen", 0);
|
| | | map.put("secondDaRen", 0);
|
| | | map.put("firstHighVIP", 0);
|
| | | map.put("secondHighVIP", 0);
|
| | | map.put("firstSuperVIP", 0);
|
| | | map.put("secondDaRen", 0);
|
| | | map.put("secondHighVIP", 0);
|
| | | map.put("secondSuperVIP", 0);
|
| | | BasicDBObject dbObject = new BasicDBObject(map);
|
| | | DBObject result = mongoTemplate.getCollection(collectionName).group(agg, query.getQueryObject(), dbObject, reduce);
|
| | |
| | | BasicDBObject object = mapResult.get(i + "");
|
| | |
|
| | | TeamDailyRecord record = new TeamDailyRecord();
|
| | | record.setFirstDaRen(new BigDecimal(object.get("totalNum").toString()).intValue());
|
| | | record.setFirstHighVIP(new BigDecimal(object.get("totalNum").toString()).intValue());
|
| | | record.setFirstSuperVIP(new BigDecimal(object.get("totalNum").toString()).intValue());
|
| | | record.setSecondDaRen(new BigDecimal(object.get("totalNum").toString()).intValue());
|
| | | record.setSecondHighVIP(new BigDecimal(object.get("totalNum").toString()).intValue());
|
| | | record.setSecondSuperVIP(new BigDecimal(object.get("totalNum").toString()).intValue());
|
| | | record.setFirstDaRen(new BigDecimal(object.get("firstDaRen").toString()).intValue());
|
| | | record.setFirstHighVIP(new BigDecimal(object.get("firstHighVIP").toString()).intValue());
|
| | | record.setFirstSuperVIP(new BigDecimal(object.get("firstSuperVIP").toString()).intValue());
|
| | | record.setSecondDaRen(new BigDecimal(object.get("secondDaRen").toString()).intValue());
|
| | | record.setSecondHighVIP(new BigDecimal(object.get("secondHighVIP").toString()).intValue());
|
| | | record.setSecondSuperVIP(new BigDecimal(object.get("secondSuperVIP").toString()).intValue());
|
| | | listDailyCount.add(record);
|
| | | }
|
| | | }
|