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
8456dabd
Commit
8456dabd
authored
May 11, 2017
by
fsn
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
c5ac0d1c
6bffce16
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
91 additions
and
67 deletions
+91
-67
README.md
+2
-1
sql/guns.sql
+32
-18
src/main/java/com/stylefeng/guns/common/constant/state/ManagerStatus.java
+1
-1
src/main/java/com/stylefeng/guns/common/node/MenuNode.java
+5
-6
src/main/java/com/stylefeng/guns/modular/system/controller/NoticeController.java
+11
-1
src/main/java/com/stylefeng/guns/modular/system/dao/mapping/MenuDao.xml
+1
-1
src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserMgrDao.xml
+3
-2
src/main/java/com/stylefeng/guns/modular/system/warpper/LogWarpper.java
+4
-0
src/main/webapp/WEB-INF/view/blackboard.html
+0
-17
src/main/webapp/WEB-INF/view/common/_tab.html
+25
-15
src/main/webapp/WEB-INF/view/system/menu/menu_add.html
+2
-1
src/main/webapp/WEB-INF/view/system/menu/menu_edit.html
+2
-1
src/main/webapp/static/modular/system/log/log.js
+1
-1
src/main/webapp/static/modular/system/log/login_log.js
+1
-1
src/main/webapp/static/modular/system/menu/menu_info.js
+1
-1
No files found.
README.md
View file @
8456dabd
...
@@ -14,7 +14,8 @@
...
@@ -14,7 +14,8 @@
4.
日志管理
4.
日志管理
5.
监控管理
5.
监控管理
6.
字典管理
6.
字典管理
7.
代码生成
7.
通知管理
8.
代码生成
##使用说明
##使用说明
1.
导入sql/guns.sql文件到数据库
1.
导入sql/guns.sql文件到数据库
...
...
sql/guns.sql
View file @
8456dabd
...
@@ -10,7 +10,7 @@ Target Server Type : MYSQL
...
@@ -10,7 +10,7 @@ Target Server Type : MYSQL
Target Server Version : 50621
Target Server Version : 50621
File Encoding : 65001
File Encoding : 65001
Date: 2017-05-
09 23:54:49
Date: 2017-05-
10 22:48:15
*/
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
SET
FOREIGN_KEY_CHECKS
=
0
;
...
@@ -49,22 +49,21 @@ CREATE TABLE `_dict` (
...
@@ -49,22 +49,21 @@ CREATE TABLE `_dict` (
`name`
varchar
(
255
)
DEFAULT
NULL
,
`name`
varchar
(
255
)
DEFAULT
NULL
,
`tips`
varchar
(
255
)
DEFAULT
NULL
,
`tips`
varchar
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
19
DEFAULT
CHARSET
=
utf8
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
26
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- ----------------------------
-- Records of _dict
-- Records of _dict
-- ----------------------------
-- ----------------------------
INSERT
INTO
`_dict`
VALUES
(
'5'
,
'0'
,
'0'
,
'账号状态'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'6'
,
'1'
,
'5'
,
'启用'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'7'
,
'2'
,
'5'
,
'冻结'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'8'
,
'3'
,
'5'
,
'待审核'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'9'
,
'4'
,
'5'
,
'审核拒绝'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'10'
,
'5'
,
'5'
,
'已删除'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'14'
,
'0'
,
'0'
,
'性别'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'15'
,
'1'
,
'14'
,
'男'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'16'
,
'0'
,
'0'
,
'状态'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'16'
,
'0'
,
'0'
,
'状态'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'17'
,
'1'
,
'16'
,
'启用'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'17'
,
'1'
,
'16'
,
'启用'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'18'
,
'2'
,
'16'
,
'禁用'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'18'
,
'2'
,
'16'
,
'禁用'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'19'
,
'0'
,
'0'
,
'性别'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'20'
,
'1'
,
'19'
,
'男'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'21'
,
'2'
,
'19'
,
'女'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'22'
,
'0'
,
'0'
,
'账号状态'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'23'
,
'1'
,
'22'
,
'启用'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'24'
,
'2'
,
'22'
,
'冻结'
,
null
);
INSERT
INTO
`_dict`
VALUES
(
'25'
,
'3'
,
'22'
,
'已删除'
,
null
);
-- ----------------------------
-- ----------------------------
-- Table structure for _generate
-- Table structure for _generate
...
@@ -100,11 +99,14 @@ CREATE TABLE `_login_log` (
...
@@ -100,11 +99,14 @@ CREATE TABLE `_login_log` (
`message`
text
,
`message`
text
,
`ip`
varchar
(
255
)
DEFAULT
NULL
,
`ip`
varchar
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
10
2
DEFAULT
CHARSET
=
utf8
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
10
5
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- ----------------------------
-- Records of _login_log
-- Records of _login_log
-- ----------------------------
-- ----------------------------
INSERT
INTO
`_login_log`
VALUES
(
'102'
,
'登录日志'
,
'1'
,
'2017-05-10 21:31:48'
,
'成功'
,
null
,
'127.0.0.1'
);
INSERT
INTO
`_login_log`
VALUES
(
'103'
,
'退出日志'
,
'1'
,
'2017-05-10 22:41:37'
,
'成功'
,
null
,
'127.0.0.1'
);
INSERT
INTO
`_login_log`
VALUES
(
'104'
,
'登录日志'
,
'1'
,
'2017-05-10 22:42:32'
,
'成功'
,
null
,
'127.0.0.1'
);
-- ----------------------------
-- ----------------------------
-- Table structure for _menu
-- Table structure for _menu
...
@@ -123,13 +125,13 @@ CREATE TABLE `_menu` (
...
@@ -123,13 +125,13 @@ CREATE TABLE `_menu` (
`status`
int
(
65
)
DEFAULT
NULL
COMMENT
'菜单状态 : 1:启用 0:不启用'
,
`status`
int
(
65
)
DEFAULT
NULL
COMMENT
'菜单状态 : 1:启用 0:不启用'
,
`isopen`
int
(
11
)
DEFAULT
NULL
COMMENT
'是否打开: 1:打开 0:不打开'
,
`isopen`
int
(
11
)
DEFAULT
NULL
COMMENT
'是否打开: 1:打开 0:不打开'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
14
6
DEFAULT
CHARSET
=
utf8
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
14
7
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- ----------------------------
-- Records of _menu
-- Records of _menu
-- ----------------------------
-- ----------------------------
INSERT
INTO
`_menu`
VALUES
(
'105'
,
'system'
,
'0'
,
'系统管理'
,
'fa-user'
,
''
,
'
1
'
,
'1'
,
null
,
'1'
,
'1'
);
INSERT
INTO
`_menu`
VALUES
(
'105'
,
'system'
,
'0'
,
'系统管理'
,
'fa-user'
,
''
,
'
2
'
,
'1'
,
null
,
'1'
,
'1'
);
INSERT
INTO
`_menu`
VALUES
(
'106'
,
'mgr'
,
'system'
,
'用户管理'
,
null
,
'/mgr'
,
'1'
,
'2'
,
null
,
'1'
,
'0'
);
INSERT
INTO
`_menu`
VALUES
(
'106'
,
'mgr'
,
'system'
,
'用户管理'
,
''
,
'/mgr'
,
'1'
,
'2'
,
null
,
'1'
,
'0'
);
INSERT
INTO
`_menu`
VALUES
(
'107'
,
'mgr_add'
,
'mgr'
,
'添加用户'
,
null
,
'/mgr/add'
,
'1'
,
'3'
,
null
,
'1'
,
'0'
);
INSERT
INTO
`_menu`
VALUES
(
'107'
,
'mgr_add'
,
'mgr'
,
'添加用户'
,
null
,
'/mgr/add'
,
'1'
,
'3'
,
null
,
'1'
,
'0'
);
INSERT
INTO
`_menu`
VALUES
(
'108'
,
'mgr_edit'
,
'mgr'
,
'修改用户'
,
null
,
'/mgr/edit'
,
'2'
,
'3'
,
null
,
'1'
,
'0'
);
INSERT
INTO
`_menu`
VALUES
(
'108'
,
'mgr_edit'
,
'mgr'
,
'修改用户'
,
null
,
'/mgr/edit'
,
'2'
,
'3'
,
null
,
'1'
,
'0'
);
INSERT
INTO
`_menu`
VALUES
(
'109'
,
'mgr_delete'
,
'mgr'
,
'删除用户'
,
null
,
'/mgr/delete'
,
'3'
,
'3'
,
null
,
'1'
,
'0'
);
INSERT
INTO
`_menu`
VALUES
(
'109'
,
'mgr_delete'
,
'mgr'
,
'删除用户'
,
null
,
'/mgr/delete'
,
'3'
,
'3'
,
null
,
'1'
,
'0'
);
...
@@ -162,7 +164,7 @@ INSERT INTO `_menu` VALUES ('141', 'notice', 'system', '通知管理', null, '/n
...
@@ -162,7 +164,7 @@ INSERT INTO `_menu` VALUES ('141', 'notice', 'system', '通知管理', null, '/n
INSERT
INTO
`_menu`
VALUES
(
'142'
,
'notice_add'
,
'notice'
,
'添加通知'
,
null
,
'/notice/add'
,
'1'
,
'3'
,
null
,
'1'
,
null
);
INSERT
INTO
`_menu`
VALUES
(
'142'
,
'notice_add'
,
'notice'
,
'添加通知'
,
null
,
'/notice/add'
,
'1'
,
'3'
,
null
,
'1'
,
null
);
INSERT
INTO
`_menu`
VALUES
(
'143'
,
'notice_update'
,
'notice'
,
'修改通知'
,
null
,
'/notice/update'
,
'2'
,
'3'
,
null
,
'1'
,
null
);
INSERT
INTO
`_menu`
VALUES
(
'143'
,
'notice_update'
,
'notice'
,
'修改通知'
,
null
,
'/notice/update'
,
'2'
,
'3'
,
null
,
'1'
,
null
);
INSERT
INTO
`_menu`
VALUES
(
'144'
,
'notice_delete'
,
'notice'
,
'删除通知'
,
null
,
'/notice/delete'
,
'3'
,
'3'
,
null
,
'1'
,
null
);
INSERT
INTO
`_menu`
VALUES
(
'144'
,
'notice_delete'
,
'notice'
,
'删除通知'
,
null
,
'/notice/delete'
,
'3'
,
'3'
,
null
,
'1'
,
null
);
INSERT
INTO
`_menu`
VALUES
(
'145'
,
'hello'
,
'0'
,
'通知'
,
null
,
'
/hello'
,
'1'
,
'1'
,
null
,
'1'
,
null
);
INSERT
INTO
`_menu`
VALUES
(
'145'
,
'hello'
,
'0'
,
'通知'
,
'fa-rocket'
,
'/notice
/hello'
,
'1'
,
'1'
,
null
,
'1'
,
null
);
-- ----------------------------
-- ----------------------------
-- Table structure for _notice
-- Table structure for _notice
...
@@ -176,12 +178,13 @@ CREATE TABLE `_notice` (
...
@@ -176,12 +178,13 @@ CREATE TABLE `_notice` (
`createtime`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`createtime`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`creater`
int
(
11
)
DEFAULT
NULL
COMMENT
'创建人'
,
`creater`
int
(
11
)
DEFAULT
NULL
COMMENT
'创建人'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
8
DEFAULT
CHARSET
=
utf8
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
10
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- ----------------------------
-- Records of _notice
-- Records of _notice
-- ----------------------------
-- ----------------------------
INSERT
INTO
`_notice`
VALUES
(
'6'
,
'你好'
,
'10'
,
'欢迎使用Guns管理系统!'
,
'2017-01-11 08:53:20'
,
'1'
);
INSERT
INTO
`_notice`
VALUES
(
'6'
,
'你好'
,
'10'
,
'欢迎使用Guns管理系统!'
,
'2017-01-11 08:53:20'
,
'1'
);
INSERT
INTO
`_notice`
VALUES
(
'8'
,
'你好2'
,
null
,
'欢迎使用Guns管护系统'
,
'2017-05-10 19:28:57'
,
'1'
);
-- ----------------------------
-- ----------------------------
-- Table structure for _operation_log
-- Table structure for _operation_log
...
@@ -198,12 +201,23 @@ CREATE TABLE `_operation_log` (
...
@@ -198,12 +201,23 @@ CREATE TABLE `_operation_log` (
`succeed`
varchar
(
255
)
DEFAULT
NULL
,
`succeed`
varchar
(
255
)
DEFAULT
NULL
,
`message`
text
,
`message`
text
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
62
DEFAULT
CHARSET
=
utf8
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
73
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- ----------------------------
-- Records of _operation_log
-- Records of _operation_log
-- ----------------------------
-- ----------------------------
INSERT
INTO
`_operation_log`
VALUES
(
'361'
,
'业务日志'
,
'清空业务日志'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.LogController'
,
'delLog'
,
'2017-05-09 23:54:30'
,
'成功'
,
'无'
);
INSERT
INTO
`_operation_log`
VALUES
(
'361'
,
'业务日志'
,
'清空业务日志'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.LogController'
,
'delLog'
,
'2017-05-09 23:54:30'
,
'成功'
,
'无'
);
INSERT
INTO
`_operation_log`
VALUES
(
'362'
,
'业务日志'
,
'修改菜单'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.MenuController'
,
'edit'
,
'2017-05-10 22:06:02'
,
'成功'
,
'菜单id=105;;;字段名称:菜单排序号,旧值:1,新值:2'
);
INSERT
INTO
`_operation_log`
VALUES
(
'363'
,
'业务日志'
,
'修改菜单'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.MenuController'
,
'edit'
,
'2017-05-10 22:15:31'
,
'成功'
,
'菜单id=145;;;字段名称:url地址,旧值:/hello,新值:/notice/hello'
);
INSERT
INTO
`_operation_log`
VALUES
(
'364'
,
'业务日志'
,
'修改菜单'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.MenuController'
,
'edit'
,
'2017-05-10 22:38:01'
,
'成功'
,
'菜单id=106;;;'
);
INSERT
INTO
`_operation_log`
VALUES
(
'365'
,
'业务日志'
,
'修改菜单'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.MenuController'
,
'edit'
,
'2017-05-10 22:38:16'
,
'成功'
,
'菜单id=106;;;字段名称:菜单图标,旧值:fa-user,新值:'
);
INSERT
INTO
`_operation_log`
VALUES
(
'366'
,
'业务日志'
,
'菜单新增'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.MenuController'
,
'add'
,
'2017-05-10 22:38:27'
,
'成功'
,
'菜单名称:test'
);
INSERT
INTO
`_operation_log`
VALUES
(
'367'
,
'业务日志'
,
'删除菜单'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.MenuController'
,
'remove'
,
'2017-05-10 22:38:37'
,
'成功'
,
'菜单id:146'
);
INSERT
INTO
`_operation_log`
VALUES
(
'368'
,
'业务日志'
,
'重置管理员密码'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.UserMgrController'
,
'reset'
,
'2017-05-10 22:40:42'
,
'成功'
,
'用户id:1'
);
INSERT
INTO
`_operation_log`
VALUES
(
'369'
,
'业务日志'
,
'删除管理员'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.UserMgrController'
,
'delete'
,
'2017-05-10 22:40:43'
,
'成功'
,
'用户id:1'
);
INSERT
INTO
`_operation_log`
VALUES
(
'370'
,
'业务日志'
,
'修改字典'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.DictController'
,
'update'
,
'2017-05-10 22:42:59'
,
'成功'
,
'字典名称=性别;;;'
);
INSERT
INTO
`_operation_log`
VALUES
(
'371'
,
'业务日志'
,
'修改字典'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.DictController'
,
'update'
,
'2017-05-10 22:44:12'
,
'成功'
,
'字典名称=账号状态;;;'
);
INSERT
INTO
`_operation_log`
VALUES
(
'372'
,
'业务日志'
,
'删除管理员'
,
'1'
,
'com.stylefeng.guns.modular.system.controller.UserMgrController'
,
'delete'
,
'2017-05-10 22:45:27'
,
'成功'
,
'用户id:1'
);
-- ----------------------------
-- ----------------------------
-- Table structure for _parameter
-- Table structure for _parameter
...
@@ -338,7 +352,7 @@ CREATE TABLE `_user` (
...
@@ -338,7 +352,7 @@ CREATE TABLE `_user` (
-- ----------------------------
-- ----------------------------
-- Records of _user
-- Records of _user
-- ----------------------------
-- ----------------------------
INSERT
INTO
`_user`
VALUES
(
'1'
,
'admin'
,
'
bfb6b46de0ad31442adbed56bb2adc4e'
,
'elv4a'
,
'张三'
,
'2017-05-05 00:00:00'
,
'1'
,
'sn93@qq.com'
,
'18200000000'
,
'1'
,
'24'
,
'1
'
,
'2016-01-29 08:49:53'
,
'25'
);
INSERT
INTO
`_user`
VALUES
(
'1'
,
'admin'
,
'
ecfadcde9305f8891bcfe5a1e28c253e'
,
'8pgby'
,
'张三'
,
'2017-05-05 00:00:00'
,
'1'
,
'sn93@qq.com'
,
'18200000000'
,
'1'
,
'24'
,
'3
'
,
'2016-01-29 08:49:53'
,
'25'
);
INSERT
INTO
`_user`
VALUES
(
'40'
,
'test1'
,
'ec813b86e5e47ecbb61d2902dbb956b5'
,
'74jpt'
,
'test1'
,
'2017-04-21 00:00:00'
,
'2'
,
'sn93@qq.com'
,
'11122233344'
,
null
,
'14'
,
'5'
,
'2017-04-18 12:30:08'
,
null
);
INSERT
INTO
`_user`
VALUES
(
'40'
,
'test1'
,
'ec813b86e5e47ecbb61d2902dbb956b5'
,
'74jpt'
,
'test1'
,
'2017-04-21 00:00:00'
,
'2'
,
'sn93@qq.com'
,
'11122233344'
,
null
,
'14'
,
'5'
,
'2017-04-18 12:30:08'
,
null
);
INSERT
INTO
`_user`
VALUES
(
'41'
,
'test'
,
'd716ce8bc61e286598f110441c6486f3'
,
'hb04u'
,
'testtest'
,
'2017-04-29 00:00:00'
,
'1'
,
'sn93@qq.com'
,
'18201309300'
,
null
,
'2'
,
'5'
,
'2017-04-18 12:36:57'
,
null
);
INSERT
INTO
`_user`
VALUES
(
'41'
,
'test'
,
'd716ce8bc61e286598f110441c6486f3'
,
'hb04u'
,
'testtest'
,
'2017-04-29 00:00:00'
,
'1'
,
'sn93@qq.com'
,
'18201309300'
,
null
,
'2'
,
'5'
,
'2017-04-18 12:36:57'
,
null
);
INSERT
INTO
`_user`
VALUES
(
'42'
,
'test'
,
'769021b0bfc90c120d96aa45159d4f45'
,
'syw87'
,
'test'
,
'2017-05-02 00:00:00'
,
'1'
,
''
,
''
,
'3'
,
'26'
,
'5'
,
'2017-05-04 12:47:21'
,
null
);
INSERT
INTO
`_user`
VALUES
(
'42'
,
'test'
,
'769021b0bfc90c120d96aa45159d4f45'
,
'syw87'
,
'test'
,
'2017-05-02 00:00:00'
,
'1'
,
''
,
''
,
'3'
,
'26'
,
'5'
,
'2017-05-04 12:47:21'
,
null
);
...
...
src/main/java/com/stylefeng/guns/common/constant/state/ManagerStatus.java
View file @
8456dabd
...
@@ -8,7 +8,7 @@ package com.stylefeng.guns.common.constant.state;
...
@@ -8,7 +8,7 @@ package com.stylefeng.guns.common.constant.state;
*/
*/
public
enum
ManagerStatus
{
public
enum
ManagerStatus
{
OK
(
1
,
"启用"
),
FREEZED
(
2
,
"冻结"
),
WAIT
(
3
,
"待审核"
),
FORBID
(
4
,
"审核被拒绝"
),
DELETED
(
5
,
"被删除"
);
OK
(
1
,
"启用"
),
FREEZED
(
2
,
"冻结"
),
DELETED
(
3
,
"被删除"
);
int
code
;
int
code
;
String
message
;
String
message
;
...
...
src/main/java/com/stylefeng/guns/common/node/MenuNode.java
View file @
8456dabd
package
com
.
stylefeng
.
guns
.
common
.
node
;
package
com
.
stylefeng
.
guns
.
common
.
node
;
import
com.stylefeng.guns.core.util.ToolUtil
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Iterator
;
import
java.util.Iterator
;
...
@@ -250,14 +248,15 @@ public class MenuNode implements Comparable {
...
@@ -250,14 +248,15 @@ public class MenuNode implements Comparable {
}
}
/**
/**
* 清除
不包含子节点的节点
* 清除
所有二级菜单
*
*
* @date 2017年2月19日 下午11:18:19
* @date 2017年2月19日 下午11:18:19
*/
*/
public
static
List
<
MenuNode
>
clear
NoChild
(
List
<
MenuNode
>
nodes
)
{
public
static
List
<
MenuNode
>
clear
LevelTwo
(
List
<
MenuNode
>
nodes
)
{
ArrayList
<
MenuNode
>
results
=
new
ArrayList
<
MenuNode
>();
ArrayList
<
MenuNode
>
results
=
new
ArrayList
<
MenuNode
>();
for
(
MenuNode
node
:
nodes
)
{
for
(
MenuNode
node
:
nodes
)
{
if
(
ToolUtil
.
isNotEmpty
(
node
.
getChildren
()))
{
Integer
levels
=
node
.
getLevels
();
if
(
levels
.
equals
(
1
))
{
results
.
add
(
node
);
results
.
add
(
node
);
}
}
}
}
...
@@ -272,7 +271,7 @@ public class MenuNode implements Comparable {
...
@@ -272,7 +271,7 @@ public class MenuNode implements Comparable {
public
static
List
<
MenuNode
>
buildTitle
(
List
<
MenuNode
>
nodes
)
{
public
static
List
<
MenuNode
>
buildTitle
(
List
<
MenuNode
>
nodes
)
{
List
<
MenuNode
>
clearBtn
=
clearBtn
(
nodes
);
List
<
MenuNode
>
clearBtn
=
clearBtn
(
nodes
);
new
MenuNode
().
buildNodeTree
(
clearBtn
);
new
MenuNode
().
buildNodeTree
(
clearBtn
);
List
<
MenuNode
>
menuNodes
=
clear
NoChild
(
clearBtn
);
List
<
MenuNode
>
menuNodes
=
clear
LevelTwo
(
clearBtn
);
//对菜单排序
//对菜单排序
Collections
.
sort
(
menuNodes
);
Collections
.
sort
(
menuNodes
);
...
...
src/main/java/com/stylefeng/guns/modular/system/controller/NoticeController.java
View file @
8456dabd
...
@@ -40,7 +40,7 @@ public class NoticeController extends BaseController {
...
@@ -40,7 +40,7 @@ public class NoticeController extends BaseController {
private
NoticeDao
noticeDao
;
private
NoticeDao
noticeDao
;
/**
/**
* 跳转到通知首页
* 跳转到通知
列表
首页
*/
*/
@RequestMapping
(
""
)
@RequestMapping
(
""
)
public
String
index
()
{
public
String
index
()
{
...
@@ -66,6 +66,16 @@ public class NoticeController extends BaseController {
...
@@ -66,6 +66,16 @@ public class NoticeController extends BaseController {
}
}
/**
/**
* 跳转到首页通知
*/
@RequestMapping
(
"/hello"
)
public
String
hello
()
{
List
<
Map
<
String
,
Object
>>
notices
=
noticeDao
.
list
(
null
);
super
.
setAttr
(
"noticeList"
,
notices
);
return
"blackboard.html"
;
}
/**
* 获取通知列表
* 获取通知列表
*/
*/
@RequestMapping
(
value
=
"/list"
)
@RequestMapping
(
value
=
"/list"
)
...
...
src/main/java/com/stylefeng/guns/modular/system/dao/mapping/MenuDao.xml
View file @
8456dabd
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
</foreach>
</foreach>
))
))
) m3 ON m1.id = m3.id
) m3 ON m1.id = m3.id
order by
id
asc
order by
levels,num
asc
</select>
</select>
...
...
src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserMgrDao.xml
View file @
8456dabd
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from _user
from _user
where status !=
5
where status !=
3
<if
test=
"name != null and name != ''"
>
<if
test=
"name != null and name != ''"
>
and (phone like CONCAT('%',#{name},'%')
and (phone like CONCAT('%',#{name},'%')
or account like CONCAT('%',#{name},'%')
or account like CONCAT('%',#{name},'%')
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
<select
id=
"getByAccount"
resultType=
"user"
>
<select
id=
"getByAccount"
resultType=
"user"
>
select
select
<include
refid=
"Base_Column_List_With_Pwd"
/>
<include
refid=
"Base_Column_List_With_Pwd"
/>
from _user where account = #{account} and status !=
5
from _user where account = #{account} and status !=
3
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/java/com/stylefeng/guns/modular/system/warpper/LogWarpper.java
View file @
8456dabd
package
com
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
package
com
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
import
com.stylefeng.guns.common.constant.factory.ConstantFactory
;
import
com.stylefeng.guns.common.warpper.BaseControllerWarpper
;
import
com.stylefeng.guns.common.warpper.BaseControllerWarpper
;
import
com.stylefeng.guns.core.util.Contrast
;
import
com.stylefeng.guns.core.util.Contrast
;
import
com.stylefeng.guns.core.util.ToolUtil
;
import
com.stylefeng.guns.core.util.ToolUtil
;
...
@@ -22,6 +23,9 @@ public class LogWarpper extends BaseControllerWarpper {
...
@@ -22,6 +23,9 @@ public class LogWarpper extends BaseControllerWarpper {
public
void
warpTheMap
(
Map
<
String
,
Object
>
map
)
{
public
void
warpTheMap
(
Map
<
String
,
Object
>
map
)
{
String
message
=
(
String
)
map
.
get
(
"message"
);
String
message
=
(
String
)
map
.
get
(
"message"
);
Integer
userid
=
(
Integer
)
map
.
get
(
"userid"
);
map
.
put
(
"userName"
,
ConstantFactory
.
me
().
getUserNameById
(
userid
));
//如果信息过长,则只截取前100位字符串
//如果信息过长,则只截取前100位字符串
if
(
ToolUtil
.
isNotEmpty
(
message
)
&&
message
.
length
()
>=
100
)
{
if
(
ToolUtil
.
isNotEmpty
(
message
)
&&
message
.
length
()
>=
100
)
{
String
subMessage
=
message
.
substring
(
0
,
100
)
+
"..."
;
String
subMessage
=
message
.
substring
(
0
,
100
)
+
"..."
;
...
...
src/main/webapp/WEB-INF/view/blackboard.html
View file @
8456dabd
...
@@ -10,22 +10,5 @@
...
@@ -10,22 +10,5 @@
@}
@}
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-3"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<span
class=
"label label-success pull-right"
>
日
</span>
<h5>
用户
</h5>
</div>
<div
class=
"ibox-content"
>
<h1
class=
"no-margins"
>
${userCount!0}
</h1>
<div
class=
"stat-percent font-bold text-success"
>
<i
class=
"fa fa-user"
></i>
</div>
<small>
总用户
</small>
</div>
</div>
</div>
</div>
</div>
</div>
@}
@}
src/main/webapp/WEB-INF/view/common/_tab.html
View file @
8456dabd
...
@@ -25,22 +25,31 @@
...
@@ -25,22 +25,31 @@
</li>
</li>
@for(title in titles){
@for(title in titles){
<li>
@if(tool.isEmpty(title.children)){
<a
href=
"#"
>
<li>
<i
class=
"fa ${title.icon}"
></i>
<a
class=
"J_menuItem"
href=
"${ctxPath}${title.url}"
>
<span
class=
"nav-label"
>
${title.name}
</span>
<i
class=
"fa ${title.icon}"
></i>
<span
class=
"fa arrow"
></span>
<span
class=
"nav-label"
>
${title.name}
</span>
</a>
</a>
<ul
class=
"nav nav-second-level"
>
</li>
@for(subTitle in title.children){
@}else{
<li>
<li>
<a
class=
"J_menuItem"
href=
"${ctxPath}${subTitle.url}"
>
${subTitle.name}
</a>
<a
href=
"#"
>
</li>
<i
class=
"fa ${title.icon}"
></i>
@}
<span
class=
"nav-label"
>
${title.name}
</span>
</ul>
<span
class=
"fa arrow"
></span>
</li>
</a>
<ul
class=
"nav nav-second-level"
>
@for(subTitle in title.children){
<li>
<a
class=
"J_menuItem"
href=
"${ctxPath}${subTitle.url}"
>
${subTitle.name}
</a>
</li>
@}
</ul>
</li>
@}
@}
@}
</ul>
</ul>
</div>
</div>
</nav>
</nav>
\ No newline at end of file
src/main/webapp/WEB-INF/view/system/menu/menu_add.html
View file @
8456dabd
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
<div
class=
"col-sm-6 b-r"
>
<div
class=
"col-sm-6 b-r"
>
<
#
input
id=
"name"
name=
"名称"
underline=
"true"
/>
<
#
input
id=
"name"
name=
"名称"
underline=
"true"
/>
<
#
input
id=
"code"
name=
"菜单编号"
underline=
"true"
/>
<
#
input
id=
"code"
name=
"菜单编号"
underline=
"true"
/>
<
#
input
id=
"pcode"
name=
"父级编号"
underline=
"false"
/>
<
#
input
id=
"pcode"
name=
"父级编号"
underline=
"true"
/>
<
#
input
id=
"icon"
name=
"图标"
underline=
"false"
/>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<
#
input
id=
"url"
name=
"请求地址"
underline=
"true"
/>
<
#
input
id=
"url"
name=
"请求地址"
underline=
"true"
/>
...
...
src/main/webapp/WEB-INF/view/system/menu/menu_edit.html
View file @
8456dabd
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
<div
class=
"col-sm-6 b-r"
>
<div
class=
"col-sm-6 b-r"
>
<
#
input
id=
"name"
name=
"名称"
value=
"${menu.name}"
underline=
"true"
/>
<
#
input
id=
"name"
name=
"名称"
value=
"${menu.name}"
underline=
"true"
/>
<
#
input
id=
"code"
name=
"菜单编号"
value=
"${menu.code}"
underline=
"true"
/>
<
#
input
id=
"code"
name=
"菜单编号"
value=
"${menu.code}"
underline=
"true"
/>
<
#
input
id=
"pcode"
name=
"父级编号"
value=
"${menu.pcode}"
underline=
"false"
/>
<
#
input
id=
"pcode"
name=
"父级编号"
value=
"${menu.pcode}"
underline=
"true"
/>
<
#
input
id=
"icon"
name=
"图标"
underline=
"false"
value=
"${menu.icon}"
/>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<
#
input
id=
"url"
name=
"请求地址"
value=
"${menu.url}"
underline=
"true"
/>
<
#
input
id=
"url"
name=
"请求地址"
value=
"${menu.url}"
underline=
"true"
/>
...
...
src/main/webapp/static/modular/system/log/log.js
View file @
8456dabd
...
@@ -17,7 +17,7 @@ OptLog.initColumn = function () {
...
@@ -17,7 +17,7 @@ OptLog.initColumn = function () {
{
title
:
'id'
,
field
:
'id'
,
visible
:
false
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'id'
,
field
:
'id'
,
visible
:
false
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'日志类型'
,
field
:
'logtype'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'日志类型'
,
field
:
'logtype'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'日志名称'
,
field
:
'logname'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'日志名称'
,
field
:
'logname'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'用户
id'
,
field
:
'userid
'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'用户
名称'
,
field
:
'userName
'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'类名'
,
field
:
'classname'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'类名'
,
field
:
'classname'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'方法名'
,
field
:
'method'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'方法名'
,
field
:
'method'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'时间'
,
field
:
'createtime'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'时间'
,
field
:
'createtime'
,
align
:
'center'
,
valign
:
'middle'
},
...
...
src/main/webapp/static/modular/system/log/login_log.js
View file @
8456dabd
...
@@ -16,7 +16,7 @@ LoginLog.initColumn = function () {
...
@@ -16,7 +16,7 @@ LoginLog.initColumn = function () {
{
field
:
'selectItem'
,
radio
:
true
},
{
field
:
'selectItem'
,
radio
:
true
},
{
title
:
'id'
,
field
:
'id'
,
visible
:
false
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'id'
,
field
:
'id'
,
visible
:
false
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'日志名称'
,
field
:
'logname'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'日志名称'
,
field
:
'logname'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'用户
id'
,
field
:
'userid
'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'用户
名称'
,
field
:
'userName
'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'时间'
,
field
:
'createtime'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'时间'
,
field
:
'createtime'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'具体消息'
,
field
:
'message'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'具体消息'
,
field
:
'message'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'ip'
,
field
:
'ip'
,
align
:
'center'
,
valign
:
'middle'
}];
{
title
:
'ip'
,
field
:
'ip'
,
align
:
'center'
,
valign
:
'middle'
}];
...
...
src/main/webapp/static/modular/system/menu/menu_info.js
View file @
8456dabd
...
@@ -44,7 +44,7 @@ MenuInfoDlg.close = function() {
...
@@ -44,7 +44,7 @@ MenuInfoDlg.close = function() {
* 收集数据
* 收集数据
*/
*/
MenuInfoDlg
.
collectData
=
function
()
{
MenuInfoDlg
.
collectData
=
function
()
{
this
.
set
(
'id'
).
set
(
'name'
).
set
(
'code'
).
set
(
'pcode'
).
set
(
'url'
).
set
(
'num'
).
set
(
'levels'
);
this
.
set
(
'id'
).
set
(
'name'
).
set
(
'code'
).
set
(
'pcode'
).
set
(
'url'
).
set
(
'num'
).
set
(
'levels'
)
.
set
(
'icon'
)
;
}
}
/**
/**
...
...
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