Commit 783e0f17885bf4edb5a6c245631bc4f8705f07f7

Authored by liquanyu
1 parent fc5420329d

儿童营养报告

Showing 3 changed files with 9 additions and 28 deletions

platform-common/src/main/java/com/lyms/platform/common/utils/HttpClientUtil.java View file @ 783e0f1
... ... @@ -226,12 +226,12 @@
226 226 public static void main(String[] args) throws Exception {
227 227  
228 228 Map<String,String> map = new HashMap<String, String>();
229   - map.put("categoryId","1");
230   - map.put("page","1");
231   - map.put("limit","1000");
  229 +// map.put("categoryId","1");
  230 +// map.put("page","1");
  231 +// map.put("limit","1000");
232 232 // map.put("nutritionId",nutritionId);
233 233 // map.put("title", title);
234   - String s = HttpClientUtil.doGet("http://ams.api.stage.healthbaby.com.cn/v1/foods", map, "utf-8", "3d19960bf3e81e7d816c4f26051c49ba");
  234 + String s = HttpClientUtil.doGet("http://ams.api.stage.healthbaby.com.cn/v1/getPlatfromCategoryFoods", map, "utf-8", "3d19960bf3e81e7d816c4f26051c49ba");
235 235 System.out.println(s );
236 236 }
237 237 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyNutritionController.java View file @ 783e0f1
... ... @@ -68,26 +68,12 @@
68 68  
69 69 /**
70 70 * 从ams获取儿童营养食谱
71   - * @param categoryId 食物类别
72   - * @param nutritionId 营养元素
73   - * @param title 食物名称
74   - * @param id 食物名称
75 71 * @return
76 72 */
77 73 @RequestMapping(value = "/queryBabyNutritionFood", method = RequestMethod.GET)
78   - @ResponseBody
79   - @TokenRequired
80   - public BaseObjectResponse queryBabyNutritionFood(@RequestParam(required = false)String categoryId,
81   - @RequestParam(required = false)String nutritionId,
82   - @RequestParam(required = false)String id,
83   - @RequestParam(required = false)String title){
84   - return babyNutritionFacade.queryBabyNutritionFood(categoryId,nutritionId,title,id);
  74 + public String queryBabyNutritionFood(){
  75 + return babyNutritionFacade.queryBabyNutritionFood();
85 76 }
86   -
87   -
88   -
89   -
90   -
91 77  
92 78  
93 79 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java View file @ 783e0f1
... ... @@ -132,15 +132,10 @@
132 132 return objectResponse;
133 133 }
134 134  
135   - public BaseObjectResponse queryBabyNutritionFood(String categoryId, String nutritionId, String title,String id) {
136   -
  135 + public String queryBabyNutritionFood() {
137 136 Map<String,String> map = new HashMap<String, String>();
138   - map.put("categoryId",categoryId);
139   - map.put("nutritionId",nutritionId);
140   - map.put("title", title);
141   - map.put("id", id == null ? null : String.valueOf(id));
142   - String s = HttpClientUtil.doGet(amsUrl+"/v1/foods", map, "utf-8", "3d19960bf3e81e7d816c4f26051c49ba");
143   - return null;
  137 + String data = HttpClientUtil.doGet(amsUrl+"/v1/getPlatfromCategoryFoods", map, "utf-8", "3d19960bf3e81e7d816c4f26051c49ba");
  138 + return data;
144 139 }
145 140 }