| | |
| | | criteriaMongo = criteriaMongo.and("userIdList").in(criteria.getUserIds()); |
| | | } |
| | | if (criteria.getTagList() != null && criteria.getTagList().size() > 0) { |
| | | criteriaMongo = criteriaMongo.and("tagList").all(criteria.getTagList()); |
| | | criteriaMongo = criteriaMongo.and("tagList").in(criteria.getTagList()); |
| | | } |
| | | if(criteria.getUserIds() != null && criteria.getUserIds().size() > 0){ |
| | | criteriaMongo = criteriaMongo.and("containUserList").in(criteria.getUserIds()); |
| | | } |
| | | if(criteria.getPerformanceType() != null) { |
| | | criteriaMongo = criteriaMongo.and("performanceType").is(criteria.getPerformanceType()); |
| | | } |
| | | Query query = new Query(criteriaMongo); |
| | | Long totalCount = mongoTemplate.count(query, TaskMongo.class); |
| | |
| | | |
| | | @Override |
| | | //删除已有的任务缓存 |
| | | @CacheEvict(cacheNames = "ChildrenTask", key = "'userId:' +#p0 + 'projectId:' + #p1.projectId") |
| | | @CacheEvict(cacheNames = "ChildrenTask",allEntries = true) |
| | | public TaskMongo create(Long userId,TaskMongo resources) { |
| | | return mongoTemplate.save(resources); |
| | | } |
| | | |
| | | @Override |
| | | @CacheEvict(cacheNames = "ChildrenTask", key = "'userId:' +#p0 + 'projectId:' + #p1.projectId") |
| | | @CacheEvict(cacheNames = "ChildrenTask",allEntries = true) |
| | | public TaskMongo update(Long userId,TaskMongo resources) { |
| | | |
| | | //如果他不是任务的负责人但是他还可能是任务的参与人员 |
| | |
| | | } |
| | | |
| | | @Override |
| | | @CacheEvict(cacheNames = "ChildrenTask",key = "'userId:' + #p0 + 'projectId:' ",allEntries = true) |
| | | @CacheEvict(cacheNames = "ChildrenTask",allEntries = true) |
| | | public Boolean deleteAll(Long userId,String[] ids) { |
| | | List<TaskMongo> taskMongoList = mongoTemplate.find(Query.query(Criteria.where("id").in(Arrays.asList(ids))), TaskMongo.class); |
| | | return deleteWithChildren(taskMongoList); |