@RequestMapping("product.html") public String product(ModelMap modelMap, HttpServletRequest request) { modelMap = indexService.getIndexMainPro(modelMap); request.setAttribute("toWhat", 0); modelMap = indexService.getIndexProduct(modelMap, request); return "product"; }
@ResponseBody @RequestMapping(value = "tuanP.json", method = RequestMethod.POST) public JsonVo tuanP(ModelMap modelMap, HttpServletRequest request) { JsonVo<String> json = new JsonVo<String>(); request.setAttribute("toWhat", 1); modelMap = indexService.getIndexProduct(modelMap, request); List list = ((PageVo) modelMap.get("pageVo")).getList(); for (int oo = 0; oo < list.size(); oo++) { DBObject dbObject = (DBObject) list.get(oo); list.set(oo, dbObject.toString()); } json.setObject(list); json.setResult(true); return json; }
@RequestMapping("tao.html") public String tao(ModelMap modelMap, HttpServletRequest request) { request.setAttribute("toWhat", 2); modelMap = indexService.getIndexProduct(modelMap, request); return "tao"; }