|
@@ -79,7 +79,12 @@ public class EncyclopediaController extends BaseController {
|
|
|
if (baikeProduct == null) {
|
|
|
return super.errorPath();
|
|
|
}
|
|
|
+ // 增加浏览量
|
|
|
+ productService.encyclopediaPv(productId);
|
|
|
model.addAttribute("baikeProduct", baikeProduct);
|
|
|
+ // 搜索热门关键字
|
|
|
+ List<BaikeHotSearch> searchHotWord = baseService.getBaikeSearchHotWord();
|
|
|
+ model.addAttribute("searchHotWord", searchHotWord);
|
|
|
return PRODUCT_DETAIL;
|
|
|
}
|
|
|
|
|
@@ -113,7 +118,12 @@ public class EncyclopediaController extends BaseController {
|
|
|
if (baikeInstrument == null) {
|
|
|
return super.errorPath();
|
|
|
}
|
|
|
+ // 增加浏览量
|
|
|
+ productService.encyclopediaPv(productId);
|
|
|
model.addAttribute("baikeInstrument", baikeInstrument);
|
|
|
+ // 搜索热门关键字
|
|
|
+ List<BaikeHotSearch> searchHotWord = baseService.getBaikeSearchHotWord();
|
|
|
+ model.addAttribute("searchHotWord", searchHotWord);
|
|
|
return INSTRUMENT_DETAIL;
|
|
|
}
|
|
|
|
|
@@ -126,6 +136,9 @@ public class EncyclopediaController extends BaseController {
|
|
|
Map<String, Object> moreData = productService.getBaikeMoreJson(typeId, pageNum, pageSize);
|
|
|
model.addAttribute("typeName", baikeType.getName());
|
|
|
model.addAttribute("moreData", moreData);
|
|
|
+ // 搜索热门关键字
|
|
|
+ List<BaikeHotSearch> searchHotWord = baseService.getBaikeSearchHotWord();
|
|
|
+ model.addAttribute("searchHotWord", searchHotWord);
|
|
|
return MORE_LIST;
|
|
|
}
|
|
|
|
|
@@ -133,7 +146,10 @@ public class EncyclopediaController extends BaseController {
|
|
|
* 搜索列表
|
|
|
*/
|
|
|
@GetMapping("/search.html")
|
|
|
- public String getSearchPage() {
|
|
|
+ public String getSearchPage(final Model model) {
|
|
|
+ // 搜索热门关键字
|
|
|
+ List<BaikeHotSearch> searchHotWord = baseService.getBaikeSearchHotWord();
|
|
|
+ model.addAttribute("searchHotWord", searchHotWord);
|
|
|
return SEARCH_PAGE;
|
|
|
}
|
|
|
|
|
@@ -141,7 +157,10 @@ public class EncyclopediaController extends BaseController {
|
|
|
* 联系我们
|
|
|
*/
|
|
|
@GetMapping("/contact.html")
|
|
|
- public String getContact() {
|
|
|
+ public String getContact(final Model model) {
|
|
|
+ // 搜索热门关键字
|
|
|
+ List<BaikeHotSearch> searchHotWord = baseService.getBaikeSearchHotWord();
|
|
|
+ model.addAttribute("searchHotWord", searchHotWord);
|
|
|
return CONTACT;
|
|
|
}
|
|
|
|
|
@@ -149,7 +168,10 @@ public class EncyclopediaController extends BaseController {
|
|
|
* 关于我们
|
|
|
*/
|
|
|
@GetMapping("/about.html")
|
|
|
- public String getAboutUs() {
|
|
|
+ public String getAboutUs(final Model model) {
|
|
|
+ // 搜索热门关键字
|
|
|
+ List<BaikeHotSearch> searchHotWord = baseService.getBaikeSearchHotWord();
|
|
|
+ model.addAttribute("searchHotWord", searchHotWord);
|
|
|
return ABOUT_US;
|
|
|
}
|
|
|
|
|
@@ -161,13 +183,4 @@ public class EncyclopediaController extends BaseController {
|
|
|
return MAP;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 增加浏览量
|
|
|
- */
|
|
|
- @GetMapping("/pv")
|
|
|
- @ResponseBody
|
|
|
- public JsonModel encyclopediaPv(Integer id) {
|
|
|
- return productService.encyclopediaPv(id);
|
|
|
- }
|
|
|
-
|
|
|
}
|