Commit fe51244d3b069bc0801c9d93f0accf0809820e93
1 parent
2076e4514f
Exists in
master
and in
6 other branches
血糖
Showing 3 changed files with 17 additions and 1 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BloodSugarController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IBloodSugarService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BloodSugarController.java
View file @
fe51244
| ... | ... | @@ -58,6 +58,13 @@ |
| 58 | 58 | return bloodSugarService.info(parentId, type); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | + | |
| 62 | + @ResponseBody | |
| 63 | + @RequestMapping(value = "/wx/{parentId}/{type}", method = RequestMethod.GET) | |
| 64 | + public BaseResponse wxInfo(@PathVariable String parentId, @PathVariable Integer type) { | |
| 65 | + return bloodSugarService.wxInfo(parentId, type); | |
| 66 | + } | |
| 67 | + | |
| 61 | 68 | @ResponseBody |
| 62 | 69 | @RequestMapping(value = "/app/{parentId}", method = RequestMethod.GET) |
| 63 | 70 | public BaseResponse getAppInfo(@PathVariable String parentId) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IBloodSugarService.java
View file @
fe51244
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
fe51244
| ... | ... | @@ -139,10 +139,12 @@ |
| 139 | 139 | Map<Object, Object> temp = new HashMap<>(); |
| 140 | 140 | for (BloodSugar bloodSugar : bloodSugars) { |
| 141 | 141 | if(day.equals(bloodSugar.getCreatYmdDate())) { |
| 142 | + if(type == bloodSugar.getBloodSugarType()) { | |
| 143 | + bloodSugarAxis.add(0, bloodSugar.getBloodSugar()); | |
| 144 | + } | |
| 142 | 145 | for (BloodSugarEnums sugarEnums : BloodSugarEnums.values()) { |
| 143 | 146 | if(sugarEnums.getId() == (bloodSugar.getBloodSugarType())) { |
| 144 | 147 | temp.put(sugarEnums.getId(), bloodSugar.getBloodSugar()); |
| 145 | - bloodSugarAxis.add(0, bloodSugar.getBloodSugar()); | |
| 146 | 148 | } |
| 147 | 149 | } |
| 148 | 150 | } |
| ... | ... | @@ -218,6 +220,11 @@ |
| 218 | 220 | one.setCreatYmdDate(DateUtil.getyyyy_MM_dd(new Date())); |
| 219 | 221 | bloodSugarService.add(one); |
| 220 | 222 | return RespBuilder.buildSuccess(one.getId()); |
| 223 | + } | |
| 224 | + | |
| 225 | + @Override | |
| 226 | + public BaseResponse wxInfo(String parentId, Integer type) { | |
| 227 | + return null; | |
| 221 | 228 | } |
| 222 | 229 | |
| 223 | 230 | } |