Showing
1 changed file
with
6 additions
and
4 deletions
@@ -17,7 +17,7 @@ import java.util.HashMap; | @@ -17,7 +17,7 @@ import java.util.HashMap; | ||
17 | * Created by zhaoqi on 2016/8/29 0029. | 17 | * Created by zhaoqi on 2016/8/29 0029. |
18 | */ | 18 | */ |
19 | @Controller | 19 | @Controller |
20 | -@RequestMapping("degrade") | 20 | +@RequestMapping(" ") |
21 | public class DegradeInfoCtrl { | 21 | public class DegradeInfoCtrl { |
22 | 22 | ||
23 | @Autowired | 23 | @Autowired |
@@ -26,9 +26,11 @@ public class DegradeInfoCtrl { | @@ -26,9 +26,11 @@ public class DegradeInfoCtrl { | ||
26 | @RequestMapping("/info") | 26 | @RequestMapping("/info") |
27 | public ModelAndView toDegradeList(Model model) { | 27 | public ModelAndView toDegradeList(Model model) { |
28 | BaseResponse degradeFunction = httpClient.defaultPost(HttpUriContants.GET_DEGRADE_FUNCTION,null,BaseResponse.class); | 28 | BaseResponse degradeFunction = httpClient.defaultPost(HttpUriContants.GET_DEGRADE_FUNCTION,null,BaseResponse.class); |
29 | - model.addAttribute("functionPoints",((HashMap)degradeFunction.getData()).get("function")); | ||
30 | - model.addAttribute("level1Pages",((HashMap)degradeFunction.getData()).get("level1")); | ||
31 | - model.addAttribute("level2Pages",((HashMap)degradeFunction.getData()).get("level2")); | 29 | + if (degradeFunction.getData() != null){ |
30 | + model.addAttribute("functionPoints",((HashMap)degradeFunction.getData()).get("function")); | ||
31 | + model.addAttribute("level1Pages",((HashMap)degradeFunction.getData()).get("level1")); | ||
32 | + model.addAttribute("level2Pages",((HashMap)degradeFunction.getData()).get("level2")); | ||
33 | + } | ||
32 | return new ModelAndView("degrade/degradeList"); | 34 | return new ModelAndView("degrade/degradeList"); |
33 | } | 35 | } |
34 | 36 |
-
Please register or login to post a comment