Commit a8521dfd by fsn

增加首页的通知栏

parent f7f76eb7
package com.stylefeng.guns.modular.system.controller;
import com.stylefeng.guns.common.controller.BaseController;
import com.stylefeng.guns.modular.system.dao.NoticeDao;
import com.stylefeng.guns.persistence.dao.NoticeMapper;
import com.stylefeng.guns.persistence.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
......@@ -9,6 +11,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.stylefeng.guns.persistence.model.User;
import java.util.List;
import java.util.Map;
/**
* 总览信息
*
......@@ -22,11 +27,19 @@ public class BlackboardController extends BaseController {
@Autowired
UserMapper userMapper;
@Autowired
NoticeMapper noticeMapper;
@Autowired
NoticeDao noticeDao;
/**
* 跳转到黑板
*/
@RequestMapping("")
public String blackboard() {
List<Map<String, Object>> notices = noticeDao.list(null);
super.setAttr("noticeList",notices);
super.setAttr("userCount", userMapper.selectCount(new EntityWrapper<User>().notLike("status", "5")));
super.setAttr("systemCount", super.getSystemInvokCount());
return "/blackboard.html";
......
@layout("/common/_container.html"){
<div class="container-fluid" style="padding: 0 !important;">
<div class="row">
<div class="col-sm-12">
@for(notice in noticeList){
<div class="alert alert-success alert-dismissable">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
${notice.content}
</div>
@}
</div>
</div>
<div class="row">
<div class="col-sm-3">
<div class="ibox float-e-margins">
<div class="ibox-title">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment