Commit ec12e4471caa66f9f17ed0f61f8e8f1c1b80d76a
1 parent
c474491849
Exists in
master
and in
1 other branch
update code
Showing 1 changed file with 1 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
ec12e44
... | ... | @@ -1572,7 +1572,7 @@ |
1572 | 1572 | List<DiabetesRecordResult> list = new ArrayList<>(); |
1573 | 1573 | if (pat != null) |
1574 | 1574 | { |
1575 | - List<DiabetesRecordModel> recordModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(pat.getPid())), DiabetesRecordModel.class); | |
1575 | + List<DiabetesRecordModel> recordModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(pat.getPid())).with(new Sort(Sort.Direction.DESC, "created")), DiabetesRecordModel.class); | |
1576 | 1576 | if (CollectionUtils.isNotEmpty(recordModels)) |
1577 | 1577 | { |
1578 | 1578 | for(DiabetesRecordModel model : recordModels) |