@Test public void check() throws Exception { mockMvc.perform(MockMvcRequestBuilders.post("/serverGroup/data") .contentType(MediaType.APPLICATION_JSON_UTF8) .param("id", "1") .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); }
@RequestMapping(value = "/check") public ConfigCkeckResult<ConfigCheckItem> check(@RequestParam("id") Long id, @CurrentUser LoginUser user) throws Exception { ServerGroup serverGroup = serverGroupDaoOld.getServerGroupById(id); List<ConfigDataResponse> list = serverGroupService.getCheckData(user, serverGroup); return ConfigCheckBase.checkData(list); }
ServerGroupController { @RequestMapping(value = "/check") public ConfigCkeckResult<ConfigCheckItem> check(@RequestParam("id") Long id, @CurrentUser LoginUser user) throws Exception { ServerGroup serverGroup = serverGroupDaoOld.getServerGroupById(id); List<ConfigDataResponse> list = serverGroupService.getCheckData(user, serverGroup); return ConfigCheckBase.checkData(list); } }
ServerGroupController { @RequestMapping(value = "/check") public ConfigCkeckResult<ConfigCheckItem> check(@RequestParam("id") Long id, @CurrentUser LoginUser user) throws Exception { ServerGroup serverGroup = serverGroupDaoOld.getServerGroupById(id); List<ConfigDataResponse> list = serverGroupService.getCheckData(user, serverGroup); return ConfigCheckBase.checkData(list); }  }
ServerGroupController { @RequestMapping(value = "/check") public ConfigCkeckResult<ConfigCheckItem> check(@RequestParam("id") Long id, @CurrentUser LoginUser user) throws Exception { ServerGroup serverGroup = serverGroupDaoOld.getServerGroupById(id); List<ConfigDataResponse> list = serverGroupService.getCheckData(user, serverGroup); return ConfigCheckBase.checkData(list); }  @RequestMapping(value = "/loadAllServerGroups") ServiceResult<List<ServerGroup>> loadAllServerGroups(); @RequestMapping(value = "/serversNoGroup") ServiceResult<List<Server>> serversNoGroup(@RequestParam(value = "appGroupId", defaultValue = "0") Integer appGroupId); @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<ServerGroupView>> loadPageList(@RequestBody Paging<ServerGroup> paging); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@Validated(AddServerGroup.class) @RequestBody ServerGroup serverGroup, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateServerGroup.class) @RequestBody ServerGroup serverGroup, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteServerGroup.class) @RequestBody ServerGroup serverGroup, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/sync") ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user); @RequestMapping(value = "/check") ConfigCkeckResult<ConfigCheckItem> check(@RequestParam("id") Long id, @CurrentUser LoginUser user); }
ServerGroupController { @RequestMapping(value = "/check") public ConfigCkeckResult<ConfigCheckItem> check(@RequestParam("id") Long id, @CurrentUser LoginUser user) throws Exception { ServerGroup serverGroup = serverGroupDaoOld.getServerGroupById(id); List<ConfigDataResponse> list = serverGroupService.getCheckData(user, serverGroup); return ConfigCheckBase.checkData(list); }  @RequestMapping(value = "/loadAllServerGroups") ServiceResult<List<ServerGroup>> loadAllServerGroups(); @RequestMapping(value = "/serversNoGroup") ServiceResult<List<Server>> serversNoGroup(@RequestParam(value = "appGroupId", defaultValue = "0") Integer appGroupId); @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<ServerGroupView>> loadPageList(@RequestBody Paging<ServerGroup> paging); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@Validated(AddServerGroup.class) @RequestBody ServerGroup serverGroup, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateServerGroup.class) @RequestBody ServerGroup serverGroup, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteServerGroup.class) @RequestBody ServerGroup serverGroup, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/sync") ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user); @RequestMapping(value = "/check") ConfigCkeckResult<ConfigCheckItem> check(@RequestParam("id") Long id, @CurrentUser LoginUser user);  }