@RequestMapping("/listData") public String listData(PEProductCtrlModel peProductCtrlModel, Model model) throws UnsupportedEncodingException { if (StringUtils.isNotBlank(peProductCtrlModel.getKeyWord())) { String paramsTrans = new String(peProductCtrlModel.getKeyWord().getBytes("ISO-8859-1"), "UTF-8"); peProductCtrlModel.setKeyWord(java.net.URLDecoder.decode(paramsTrans, "UTF-8")); } List<PEProduct> showData = new ArrayList<PEProduct>(); showData = peProductService.getPEProductList(peProductCtrlModel); model.addAttribute("showData", showData); model.addAttribute("ctrlData", peProductCtrlModel); return "admin/pe/peProduct/listData"; }
@RequestMapping("/listDataCount") @ResponseBody public Map<String, Integer> listDataCount(PEProductCtrlModel peProductCtrlModel) throws UnsupportedEncodingException { if (StringUtils.isNotBlank(peProductCtrlModel.getKeyWord())) { String paramsTrans = new String(peProductCtrlModel.getKeyWord().getBytes("ISO-8859-1"), "UTF-8"); peProductCtrlModel.setKeyWord(java.net.URLDecoder.decode(paramsTrans, "UTF-8")); } Map<String, Integer> result = new HashMap<String, Integer>(); Integer total = peProductService.selectListCount(peProductCtrlModel); result.put("total", total); return result; }