Commit 74567ff06601d884a87d3ddd543f9a24607a2781
1 parent
6042bc9b2e
Exists in
master
and in
6 other branches
改接口
Showing 1 changed file with 3 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
74567ff
... | ... | @@ -226,7 +226,7 @@ |
226 | 226 | @Override |
227 | 227 | public BaseResponse wxInfo(String parentId, Integer type) { |
228 | 228 | List<Map<String, Object>> restList = new ArrayList<>(); |
229 | - List<BloodSugar> bloodSugars = mongoTemplate.find(Query.query(Criteria.where("parentId").is(parentId)).with(new Sort(Sort.Direction.DESC, "created")), BloodSugar.class); | |
229 | + List<BloodSugar> bloodSugars = mongoTemplate.find(Query.query(Criteria.where("parentId").is(parentId).and("bloodSugarType").is(type)).with(new Sort(Sort.Direction.DESC, "created")), BloodSugar.class); | |
230 | 230 | for (BloodSugar bloodSugar : bloodSugars) { |
231 | 231 | Map<String, Object> temp = new HashMap<>(); |
232 | 232 | temp.put("bloodSugar", bloodSugar.getBloodSugar()); |
... | ... | @@ -234,7 +234,8 @@ |
234 | 234 | temp.put("type", bloodSugar.getBloodSugarType()); |
235 | 235 | restList.add(temp); |
236 | 236 | } |
237 | - return RespBuilder.buildSuccess(restList); | |
237 | + | |
238 | + return RespBuilder.buildSuccess("restList", restList, "count", 11, "dayCount", 1); | |
238 | 239 | } |
239 | 240 | |
240 | 241 | } |