@ResponseBody @RequestMapping(value = "/pageQuery", method = RequestMethod.POST) public void pageQuery(HttpServletRequest request, HttpServletResponse response) { NewsRealReceiverBo bo = GsonUtils.wrapDataToEntity(request, NewsRealReceiverBo.class); PageVo pageVo = newsRealReceiverService.pageQuery(bo); GsonUtils.printData(response, pageVo); }
@RequestMapping(value = "/update", method = RequestMethod.POST) @ResponseBody public void update(HttpServletRequest request, HttpServletResponse response) { NewsRealReceiver newsRealReceiver = GsonUtils.wrapDataToEntity(request, NewsRealReceiver.class); newsRealReceiverService.update(newsRealReceiver); GsonUtils.printSuccess(response); }
@ResponseBody @RequestMapping( value = "/get", params = {"id"}, method = RequestMethod.GET) public void findById(@RequestParam String id, HttpServletResponse response) { NewsRealReceiverVo vo = newsRealReceiverService.findById(id); GsonUtils.printData(response, vo); }
@ResponseBody @RequestMapping( value = "/delete", params = {"ids"}, method = RequestMethod.DELETE) public void deleteByIds(@RequestParam String ids, HttpServletResponse response) { String[] idArr = ids.split(","); newsRealReceiverService.deleteByIds(idArr); GsonUtils.printSuccess(response); }