package com.caimei.www.controller.unlimited; import com.caimei.www.controller.BaseController; import com.caimei.www.pojo.page.PageContent; import com.caimei.www.service.page.HelpService; import org.springframework.beans.factory.annotation.Autowired; 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.RequestParam; /** * Description * * @author : Charles * @date : 2020/7/31 */ @Controller public class HelpPageController extends BaseController { private static final String HELP_PAGE_PATH = "help/help"; private HelpService helpService; @Autowired public void setHelpService(HelpService helpService) { this.helpService = helpService; } /** * 帮助页 */ @GetMapping("/help/{id}.html") public String help(final Model model, @RequestParam(value="id",defaultValue = "1016") Integer id ) { // 默认平台介绍 PageContent helpPage = helpService.getHelpPageById(id); model.addAttribute("pageInfo", helpPage); return HELP_PAGE_PATH; } }