| | |
| | | List<Criteria> list = new ArrayList<Criteria>(); |
| | | list.add(Criteria.where("dynamicType").is(1)); |
| | | list.add(Criteria.where("state").is(1)); |
| | | list.add(Criteria.where("startTime").gt(new Date())); |
| | | list.add(Criteria.where("startTime").lte(date)); |
| | | list.add(Criteria.where("startTime").gt(date)); |
| | | list.add(Criteria.where("startTime").lte(new Date())); |
| | | list.add(new Criteria().orOperator(Criteria.where("type").is("single"), |
| | | new Criteria().andOperator(Criteria.where("type").is("activity")))); |
| | | |
| | |
| | | cas[i] = list.get(i); |
| | | query.addCriteria(new Criteria().andOperator(cas)); |
| | | } |
| | | query.with(new Sort(Sort.Direction.ASC,"startTime")); |
| | | query.with(new Sort(Sort.Direction.DESC,"startTime")); |
| | | |
| | | return mongoTemplate.find(query, GoodsEvaluate.class); |
| | | } |