@Test public void findUserPageList() throws Exception { Paging<LoginUser> paging = new Paging<>(); paging.setData(new LoginUser()); String requestJson = JSONObject.toJSONString(paging); mockMvc.perform(MockMvcRequestBuilders.post("/user/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<LoginUserView>> findUserPageList(@RequestBody Paging<LoginUser> paging) throws Exception { return ServiceResult.success(userService.findUserPageList(paging)); }
UserController { @RequestMapping(value = "/list", method = RequestMethod.POST) public ServiceResult<ListResult<LoginUserView>> findUserPageList(@RequestBody Paging<LoginUser> paging) throws Exception { return ServiceResult.success(userService.findUserPageList(paging)); } }
UserController { @RequestMapping(value = "/list", method = RequestMethod.POST) public ServiceResult<ListResult<LoginUserView>> findUserPageList(@RequestBody Paging<LoginUser> paging) throws Exception { return ServiceResult.success(userService.findUserPageList(paging)); }  }
UserController { @RequestMapping(value = "/list", method = RequestMethod.POST) public ServiceResult<ListResult<LoginUserView>> findUserPageList(@RequestBody Paging<LoginUser> paging) throws Exception { return ServiceResult.success(userService.findUserPageList(paging)); }  @RequestMapping(value = "/group/users") ServiceResult<List<LoginUser>> findGroupUserList(@RequestParam(value = "groupId", defaultValue = "0") Long groupId); @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<LoginUserView>> findUserPageList(@RequestBody Paging<LoginUser> paging); @RequestMapping(value = "/getWorkInfo") ServiceResult<LoginUser> getWorkInfo(@RequestParam(value = "name", defaultValue = "") String name, @CurrentUser LoginUser user); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> addUser(@Validated(AddUser.class) @RequestBody LoginUser user, @CurrentUser LoginUser currentUser, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateUser.class) @RequestBody LoginUser user, @CurrentUser LoginUser currentUser, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteUser.class) @RequestBody LoginUser user, @CurrentUser LoginUser currentUser, Errors errors); @RequestMapping("/buttons") ServiceResult getDataBaseButton(@CurrentUser LoginUser user); }
UserController { @RequestMapping(value = "/list", method = RequestMethod.POST) public ServiceResult<ListResult<LoginUserView>> findUserPageList(@RequestBody Paging<LoginUser> paging) throws Exception { return ServiceResult.success(userService.findUserPageList(paging)); }  @RequestMapping(value = "/group/users") ServiceResult<List<LoginUser>> findGroupUserList(@RequestParam(value = "groupId", defaultValue = "0") Long groupId); @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<LoginUserView>> findUserPageList(@RequestBody Paging<LoginUser> paging); @RequestMapping(value = "/getWorkInfo") ServiceResult<LoginUser> getWorkInfo(@RequestParam(value = "name", defaultValue = "") String name, @CurrentUser LoginUser user); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> addUser(@Validated(AddUser.class) @RequestBody LoginUser user, @CurrentUser LoginUser currentUser, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateUser.class) @RequestBody LoginUser user, @CurrentUser LoginUser currentUser, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteUser.class) @RequestBody LoginUser user, @CurrentUser LoginUser currentUser, Errors errors); @RequestMapping("/buttons") ServiceResult getDataBaseButton(@CurrentUser LoginUser user);  }