@Test public void getAllGroup() throws Exception { Paging<DasGroup> paging = new Paging<>(); paging.setData(new DasGroup()); String requestJson = JSONObject.toJSONString(paging); mockMvc.perform(MockMvcRequestBuilders.post("/group/list") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(requestJson) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); }
@RequestMapping(value = "/list", method = RequestMethod.POST) public ServiceResult<ListResult<DalGroupView>> getAllGroup(@RequestBody Paging<DasGroup> paging) throws SQLException { return ServiceResult.success(groupService.findGroupPageList(paging)); }
GroupController { @RequestMapping(value = "/list", method = RequestMethod.POST) public ServiceResult<ListResult<DalGroupView>> getAllGroup(@RequestBody Paging<DasGroup> paging) throws SQLException { return ServiceResult.success(groupService.findGroupPageList(paging)); } }
GroupController { @RequestMapping(value = "/list", method = RequestMethod.POST) public ServiceResult<ListResult<DalGroupView>> getAllGroup(@RequestBody Paging<DasGroup> paging) throws SQLException { return ServiceResult.success(groupService.findGroupPageList(paging)); }  }
GroupController { @RequestMapping(value = "/list", method = RequestMethod.POST) public ServiceResult<ListResult<DalGroupView>> getAllGroup(@RequestBody Paging<DasGroup> paging) throws SQLException { return ServiceResult.success(groupService.findGroupPageList(paging)); }  @RequestMapping(value = "/tree") ServiceResult<List<DasGroup>> getGroups(@RequestParam(value = "appid", defaultValue = "0") String appid, @CurrentUser LoginUser loginUser); @RequestMapping(value = "/member/tree") ServiceResult<List<DasGroup>> getMemberGroups(@CurrentUser LoginUser loginUser); @RequestMapping(value = "/userGroups") ServiceResult<UserGroup> getUserGroups(@CurrentUser LoginUser user); @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<DalGroupView>> getAllGroup(@RequestBody Paging<DasGroup> paging); @RequestMapping(value = {"", "/", "/add"}, method = RequestMethod.POST) ServiceResult<String> add(@Validated(AddDalGroup.class) @RequestBody DasGroup group, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = {"", "/", "/update"}, method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateDalGroup.class) @RequestBody DasGroup group, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = {"", "/", "/delete"}, method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteGroup.class) @RequestBody DasGroup group, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/sync") ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user); }
GroupController { @RequestMapping(value = "/list", method = RequestMethod.POST) public ServiceResult<ListResult<DalGroupView>> getAllGroup(@RequestBody Paging<DasGroup> paging) throws SQLException { return ServiceResult.success(groupService.findGroupPageList(paging)); }  @RequestMapping(value = "/tree") ServiceResult<List<DasGroup>> getGroups(@RequestParam(value = "appid", defaultValue = "0") String appid, @CurrentUser LoginUser loginUser); @RequestMapping(value = "/member/tree") ServiceResult<List<DasGroup>> getMemberGroups(@CurrentUser LoginUser loginUser); @RequestMapping(value = "/userGroups") ServiceResult<UserGroup> getUserGroups(@CurrentUser LoginUser user); @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<DalGroupView>> getAllGroup(@RequestBody Paging<DasGroup> paging); @RequestMapping(value = {"", "/", "/add"}, method = RequestMethod.POST) ServiceResult<String> add(@Validated(AddDalGroup.class) @RequestBody DasGroup group, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = {"", "/", "/update"}, method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateDalGroup.class) @RequestBody DasGroup group, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = {"", "/", "/delete"}, method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteGroup.class) @RequestBody DasGroup group, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/sync") ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user);  }