@RequestMapping("joinsshow") public void JoinUsshow(Model model, String id, Integer articleid) { List<Article> joinusList = aboutService.getJoinUsList(); model.addAttribute("joinuslist", joinusList); model.addAttribute("classid", id); Article article = aboutService.getArticleById(articleid); model.addAttribute("article", article); }
@RequestMapping("joinus") public void JoinUs(Model model, String id) { List<Article> joinusList = aboutService.getJoinUsList(); model.addAttribute("joinuslist", joinusList); if (StringUtil.isNullOrEmpty(id) && joinusList.size() > 0) { id = String.valueOf(joinusList.get(0).getId()); } model.addAttribute("classid", id); List<Article> joinUsOneContent = aboutService.getJoinUsOneContent(id); model.addAttribute("joinusonecontent", joinUsOneContent); // 附加的文章 List<Article> othersArticle = aboutService.getOthersArticleByType(Constants.JOIN_ARTICLE); model.addAttribute("othersarticle", othersArticle); }