Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
saysky committed Oct 19, 2019
1 parent 985a0cf commit 4e4e43f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public class FrontIndexController extends BaseController {
@Autowired
private TagService tagService;

@Autowired
private SlideService slideService;
/**
* 请求首页
*
Expand Down Expand Up @@ -96,7 +98,12 @@ public String index(Model model,
List<Post> notices = postService.findByPostTypeAndStatus(PostTypeEnum.POST_TYPE_NOTICE.getValue(), PostStatusEnum.PUBLISHED.getCode());
model.addAttribute("notices", notices);

//3.侧边栏
//3.幻灯片
List<Slide> slides = slideService.findBySlideType(SlideTypeEnum.INDEX_SLIDE.getCode());
model.addAttribute("slides", slides);


//4.侧边栏
model.addAttribute("sidebarType", SidebarTypeEnum.INDEX.getValue());
//统计
model.addAttribute("allCount", postService.getAllCount());
Expand Down

0 comments on commit 4e4e43f

Please sign in to comment.