|
@@ -40,6 +40,8 @@ public class ArticleController extends BaseController {
|
|
|
public String toArticleList(@PathVariable("id") Integer id, @PathVariable("pageNum") Integer pageNum, final Model model) {
|
|
|
List<BaseLink> typeList = articleService.getArticleTypes();
|
|
|
List<BaseLink> data = articleService.getArticleLabels().getData();
|
|
|
+ List<ImageLink> Ads = articleService.getLastestInfoAds().getData();
|
|
|
+ model.addAttribute("ads", Ads);
|
|
|
model.addAttribute("labels",data);
|
|
|
model.addAttribute("articleType", typeList);
|
|
|
model.addAttribute("typeId", id);
|
|
@@ -56,6 +58,8 @@ public class ArticleController extends BaseController {
|
|
|
public String toArticleLabel(@PathVariable("id") Integer id, @PathVariable("pageNum") Integer pageNum, final Model model) {
|
|
|
List<BaseLink> typeList = articleService.getArticleTypes();
|
|
|
List<BaseLink> data = articleService.getArticleLabels().getData();
|
|
|
+ List<ImageLink> Ads = articleService.getLastestInfoAds().getData();
|
|
|
+ model.addAttribute("ads", Ads);
|
|
|
model.addAttribute("labels",data);
|
|
|
model.addAttribute("articleType", typeList);
|
|
|
model.addAttribute("typeId", 0);
|
|
@@ -72,6 +76,8 @@ public class ArticleController extends BaseController {
|
|
|
public String toArticleSearch(@PathVariable("pageNum") Integer pageNum, final Model model) {
|
|
|
List<BaseLink> typeList = articleService.getArticleTypes();
|
|
|
List<BaseLink> data = articleService.getArticleLabels().getData();
|
|
|
+ List<ImageLink> Ads = articleService.getLastestInfoAds().getData();
|
|
|
+ model.addAttribute("ads", Ads);
|
|
|
model.addAttribute("labels",data);
|
|
|
model.addAttribute("articleType", typeList);
|
|
|
model.addAttribute("typeId", 0);
|
|
@@ -91,6 +97,12 @@ public class ArticleController extends BaseController {
|
|
|
if(article == null){
|
|
|
return super.errorPath();
|
|
|
}
|
|
|
+ List<BaseLink> data = articleService.getArticleLabels().getData();
|
|
|
+ List<ImageLink> Ads = articleService.getLastestInfoAds().getData();
|
|
|
+ List<Article> articles=articleService.getInfoById(id);
|
|
|
+ model.addAttribute("articles",articles);
|
|
|
+ model.addAttribute("ads", Ads);
|
|
|
+ model.addAttribute("labels",data);
|
|
|
model.addAttribute("article", article);
|
|
|
model.addAttribute("articleType", typeList);
|
|
|
model.addAttribute("articleId", id);
|