Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
a8521dfd
Commit
a8521dfd
authored
May 09, 2017
by
fsn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加首页的通知栏
parent
f7f76eb7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
src/main/java/com/stylefeng/guns/modular/system/controller/BlackboardController.java
+13
-0
src/main/webapp/WEB-INF/view/blackboard.html
+10
-0
No files found.
src/main/java/com/stylefeng/guns/modular/system/controller/BlackboardController.java
View file @
a8521dfd
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"
;
...
...
src/main/webapp/WEB-INF/view/blackboard.html
View file @
a8521dfd
@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"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment