1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- package com.caimei.www.controller.unlimited;
- import com.caimei.www.controller.BaseController;
- import org.springframework.stereotype.Controller;
- import org.springframework.ui.Model;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.PathVariable;
- import org.springframework.web.bind.annotation.RequestMapping;
- /**
- * 采美百科
- *
- * @author : yuwenjun1997
- * @date : 2022/12/28
- */
- @Controller
- @RequestMapping("encyclopedia")
- public class EncyclopediaController extends BaseController {
- private static final String ENCYCLOPEDIA_LIST = "encyclopedia/list";
- private static final String ENCYCLOPEDIA_DETAIL = "encyclopedia/detail";
- private static final String ENCYCLOPEDIA_SEARCH = "encyclopedia/search";
- private static final String ENCYCLOPEDIA_ABOUT = "encyclopedia/about";
- /*
- * 百科首页
- * */
- @GetMapping("/list.html")
- public String getEncyclopediaList(final Model model) {
- return ENCYCLOPEDIA_LIST;
- }
- /*
- * 百科详情
- * */
- @GetMapping("/detail-{id}.html")
- public String getEncyclopediaDetail(final Model model, @PathVariable("id") Integer id) {
- return ENCYCLOPEDIA_DETAIL;
- }
- /*
- * 百科搜索页面
- * */
- @GetMapping("/search.html")
- public String getEncyclopediaSearch(final Model model) {
- return ENCYCLOPEDIA_SEARCH;
- }
- /*
- * 关于百科
- * */
- @GetMapping("/about.html")
- public String getEncyclopediaAbout(final Model model) {
- return ENCYCLOPEDIA_ABOUT;
- }
- }
|