Commit 4f1bc2a6f8fecc41a0ee278dc23a4118312b4795
1 parent
e4996d2e4e
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 3 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/RareBloodGroupServiceImpl.java
View file @
4f1bc2a
... | ... | @@ -116,7 +116,9 @@ |
116 | 116 | List<RareBloodGroupModel> babyDietReportList = null; |
117 | 117 | try { |
118 | 118 | if (rareBloodGroupModel != null && StringUtils.isNotEmpty(rareBloodGroupModel.getParentId())) { |
119 | - babyDietReportList = mongoTemplate.find(Query.query(Criteria.where("parentId").is(rareBloodGroupModel.getParentId()).and("yn").is(YnEnums.YES.getId()).and("source").is("2")), RareBloodGroupModel.class); | |
119 | + Query query = Query.query(Criteria.where("parentId").is(rareBloodGroupModel.getParentId()).and("yn").is(YnEnums.YES.getId()).and("source").is("2")); | |
120 | + query.with(new Sort(Sort.Direction.DESC, "created")); | |
121 | + babyDietReportList = mongoTemplate.find(query, RareBloodGroupModel.class); | |
120 | 122 | if (babyDietReportList != null) { |
121 | 123 | for (int i = 0; i < babyDietReportList.size(); i++) { |
122 | 124 | Map<String, Object> map = new HashMap<>(); |