@Test public void sync() throws Exception { mockMvc.perform(MockMvcRequestBuilders.post("/publicStrategy/sync") .contentType(MediaType.APPLICATION_JSON_UTF8) .param("id", "1") .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); }
@RequestMapping(value = "/sync") public ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user) throws Exception { PublicStrategy publicStrategy = publicStrategyDao.getPublicStrategyById(id); return ServiceResult.success(); }
PublicStrategyController { @RequestMapping(value = "/sync") public ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user) throws Exception { PublicStrategy publicStrategy = publicStrategyDao.getPublicStrategyById(id); return ServiceResult.success(); } }
PublicStrategyController { @RequestMapping(value = "/sync") public ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user) throws Exception { PublicStrategy publicStrategy = publicStrategyDao.getPublicStrategyById(id); return ServiceResult.success(); }  }
PublicStrategyController { @RequestMapping(value = "/sync") public ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user) throws Exception { PublicStrategy publicStrategy = publicStrategyDao.getPublicStrategyById(id); return ServiceResult.success(); }  @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<PublicStrategyView>> list(@RequestBody Paging<PublicStrategy> paging); @RequestMapping(value = "/list") ServiceResult<List<PublicStrategy>> list(); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@Validated(AddPublicStrategy.class) @RequestBody PublicStrategy publicStrategy, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdatePublicStrategy.class) @RequestBody PublicStrategy publicStrategy, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeletePublicStrategy.class) @RequestBody PublicStrategy publicStrategy, @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); }
PublicStrategyController { @RequestMapping(value = "/sync") public ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user) throws Exception { PublicStrategy publicStrategy = publicStrategyDao.getPublicStrategyById(id); return ServiceResult.success(); }  @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<PublicStrategyView>> list(@RequestBody Paging<PublicStrategy> paging); @RequestMapping(value = "/list") ServiceResult<List<PublicStrategy>> list(); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@Validated(AddPublicStrategy.class) @RequestBody PublicStrategy publicStrategy, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdatePublicStrategy.class) @RequestBody PublicStrategy publicStrategy, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeletePublicStrategy.class) @RequestBody PublicStrategy publicStrategy, @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);  }