1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| model.addAttribute("notices", notices);
return "index"; }
@SystemControllerLog(description = "搜索") @RequestMapping(value = { "/search-list.html" }) public String searchAll(Map<String, Object> map, Model model,String keywords) { System.out.println("search-list..." +keywords); List<PickThings> searchPickThingsList = pickThingsService.queryAllByKeywords(keywords, 1, Constants.PAGE_SIZE_15, true); List<LostThings> searchLostThingsList = lostThingsService.queryAllByKeywords(keywords, 1, Constants.PAGE_SIZE_15, true); int totalPick = (int) pickThingsService.queryAllByKeywordsCount(keywords); int totalLost = (int) lostThingsService.queryAllByKeywordsCount(keywords); model.addAttribute("keywords", keywords); this.initPickPage(map, 1, Constants.PAGE_SIZE_15, totalPick); this.initLostPage(map, 1, Constants.PAGE_SIZE_15, totalLost); super.initResult(model, "searchPickThingsList", searchPickThingsList, map); super.initResult(model, "searchLostThingsList", searchLostThingsList, map);
return "search-list"; }
@RequestMapping(value = { "/search-list.html/{pageNo}/{pageSize}/{page}"}) public String searchAllList(@PathVariable String pageNo, @PathVariable String pageSize, @PathVariable String page, String keywords, Map<String, Object> map, Model model) { System.out.println("search-list...AllList" +keywords + pageNo + " " + pageSize + " "+ page); List<PickThings> searchPickThingsList = pickThingsService.queryAllByKeywords(keywords, 1, Constants.PAGE_SIZE_15, true); List<LostThings> searchLostThingsList = lostThingsService.queryAllByKeywords(keywords, 1, Constants.PAGE_SIZE_15, true); int totalPick = (int) pickThingsService.queryAllByKeywordsCount(keywords); int totalLost = (int) lostThingsService.queryAllByKeywordsCount(keywords); int currentPage = 1; int pSize = Constants.PAGE_SIZE_15;
|