/** 默认情况下的查询,只根据供求类型进行查询 */ @RequestMapping("/getInfosByType") public String getByType(String type, Model model) { try { List<DemandSupplyInfo> infos = demandSupplyInfoService.getAllByType(type); List<DemandSupplyVO> vos = new ArrayList<DemandSupplyVO>(); for (DemandSupplyInfo info : infos) { vos.add(convertVO(info)); } model.addAttribute("vos", vos); } catch (Exception e) { logger.error(e.getMessage()); e.printStackTrace(); } return "/goods/infos"; }