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
2536a57c
Commit
2536a57c
authored
Jun 28, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'enter'
parents
29b418b0
445c0771
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
1946 additions
and
194 deletions
+1946
-194
_sqls/guns_mysql.sql
+194
-141
guns-sys/src/main/java/cn/stylefeng/guns/sys/core/constant/factory/ConstantFactory.java
+22
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/core/constant/factory/IConstantFactory.java
+5
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/controller/PositionController.java
+185
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/entity/Position.java
+177
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/entity/UserPos.java
+73
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/mapper/PositionMapper.java
+55
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/mapper/UserPosMapper.java
+56
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/mapper/mapping/PositionMapper.xml
+79
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/mapper/mapping/UserPosMapper.xml
+42
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/model/UserDto.java
+2
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/model/params/PositionParam.java
+78
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/model/params/UserPosParam.java
+42
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/model/result/PositionResult.java
+72
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/model/result/UserPosResult.java
+36
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/service/PositionService.java
+77
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/service/UserPosService.java
+69
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/service/UserService.java
+45
-3
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/service/impl/PositionServiceImpl.java
+125
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/service/impl/UserPosServiceImpl.java
+84
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/warpper/UserWrapper.java
+1
-0
guns-sys/src/main/webapp/assets/modular/system/dept/dept_add.js
+0
-3
guns-sys/src/main/webapp/assets/modular/system/dept/dept_edit.js
+0
-3
guns-sys/src/main/webapp/assets/modular/system/menu/menu.js
+0
-9
guns-sys/src/main/webapp/assets/modular/system/menu/menu_add.js
+0
-3
guns-sys/src/main/webapp/assets/modular/system/menu/menu_edit.js
+0
-3
guns-sys/src/main/webapp/assets/modular/system/notice/notice_add.js
+0
-3
guns-sys/src/main/webapp/assets/modular/system/notice/notice_edit.js
+0
-3
guns-sys/src/main/webapp/assets/modular/system/position/position.js
+150
-0
guns-sys/src/main/webapp/assets/modular/system/position/position_add.js
+47
-0
guns-sys/src/main/webapp/assets/modular/system/position/position_edit.js
+52
-0
guns-sys/src/main/webapp/assets/modular/system/role/role_add.js
+0
-3
guns-sys/src/main/webapp/assets/modular/system/role/role_edit.js
+0
-3
guns-sys/src/main/webapp/assets/modular/system/user/user.js
+1
-3
guns-sys/src/main/webapp/assets/modular/system/user/user_add.js
+10
-4
guns-sys/src/main/webapp/assets/modular/system/user/user_edit.js
+10
-4
guns-sys/src/main/webapp/pages/modular/system/position/position.html
+40
-0
guns-sys/src/main/webapp/pages/modular/system/position/position_add.html
+48
-0
guns-sys/src/main/webapp/pages/modular/system/position/position_edit.html
+48
-0
guns-sys/src/main/webapp/pages/modular/system/user/user_add.html
+12
-4
guns-sys/src/main/webapp/pages/modular/system/user/user_edit.html
+9
-2
No files found.
_sqls/guns_mysql.sql
View file @
2536a57c
...
...
@@ -16,7 +16,7 @@ USE guns;
Target Server Version : 50724
File Encoding : 65001
Date: 2
5/06/2019 18:51:22
Date: 2
8/06/2019 14:39:13
*/
SET
NAMES
utf8mb4
;
...
...
@@ -36,7 +36,7 @@ CREATE TABLE `database_info` (
`remarks`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注,摘要'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`db_id`
)
USING
BTREE
,
UNIQUE
KEY
`NAME_UNIQUE`
(
`db_name`
)
USING
HASH
UNIQUE
KEY
`NAME_UNIQUE`
(
`db_name`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'数据库信息表'
;
-- ----------------------------
...
...
@@ -87,8 +87,8 @@ CREATE TABLE `sys_config` (
`create_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建人'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
`update_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'更新人'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'参数配置'
;
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'参数配置'
;
-- ----------------------------
-- Records of sys_config
...
...
@@ -112,10 +112,10 @@ DROP TABLE IF EXISTS `sys_dept`;
CREATE
TABLE
`sys_dept`
(
`dept_id`
bigint
(
20
)
NOT
NULL
COMMENT
'主键id'
,
`pid`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'父部门id'
,
`pids`
varchar
(
512
)
COLLATE
utf8_bin
DEFAULT
''
COMMENT
'父级ids'
,
`simple_name`
varchar
(
45
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'简称'
,
`full_name`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'全称'
,
`description`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'描述'
,
`pids`
varchar
(
512
)
DEFAULT
''
COMMENT
'父级ids'
,
`simple_name`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'简称'
,
`full_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'全称'
,
`description`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'描述'
,
`version`
int
(
11
)
DEFAULT
NULL
COMMENT
'版本(乐观锁保留字段)'
,
`sort`
int
(
11
)
DEFAULT
NULL
COMMENT
'排序'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
...
...
@@ -123,7 +123,7 @@ CREATE TABLE `sys_dept` (
`create_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建人'
,
`update_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'修改人'
,
PRIMARY
KEY
(
`dept_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'部门表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'部门表'
;
-- ----------------------------
-- Records of sys_dept
...
...
@@ -142,19 +142,19 @@ DROP TABLE IF EXISTS `sys_dict`;
CREATE
TABLE
`sys_dict`
(
`dict_id`
bigint
(
20
)
NOT
NULL
COMMENT
'字典id'
,
`dict_type_id`
bigint
(
20
)
NOT
NULL
COMMENT
'所属字典类型的id'
,
`code`
varchar
(
50
)
COLLATE
utf8_bin
NOT
NULL
COMMENT
'字典编码'
,
`name`
varchar
(
255
)
COLLATE
utf8_bin
NOT
NULL
COMMENT
'字典名称'
,
`code`
varchar
(
50
)
NOT
NULL
COMMENT
'字典编码'
,
`name`
varchar
(
255
)
NOT
NULL
COMMENT
'字典名称'
,
`parent_id`
bigint
(
20
)
NOT
NULL
COMMENT
'上级代码id'
,
`parent_ids`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'所有上级id'
,
`status`
varchar
(
10
)
COLLATE
utf8_bin
NOT
NULL
DEFAULT
'ENABLE'
COMMENT
'状态(字典)'
,
`parent_ids`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'所有上级id'
,
`status`
varchar
(
10
)
NOT
NULL
DEFAULT
'ENABLE'
COMMENT
'状态(字典)'
,
`sort`
int
(
11
)
DEFAULT
NULL
COMMENT
'排序'
,
`description`
varchar
(
1000
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'字典的描述'
,
`description`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'字典的描述'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
`create_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建人'
,
`update_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'修改人'
,
PRIMARY
KEY
(
`dict_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'基础字典'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'基础字典'
;
-- ----------------------------
-- Records of sys_dict
...
...
@@ -177,18 +177,18 @@ COMMIT;
DROP
TABLE
IF
EXISTS
`sys_dict_type`
;
CREATE
TABLE
`sys_dict_type`
(
`dict_type_id`
bigint
(
20
)
NOT
NULL
COMMENT
'字典类型id'
,
`code`
varchar
(
255
)
COLLATE
utf8_bin
NOT
NULL
COMMENT
'字典类型编码'
,
`name`
varchar
(
255
)
COLLATE
utf8_bin
NOT
NULL
COMMENT
'字典类型名称'
,
`description`
varchar
(
1000
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'字典描述'
,
`system_flag`
char
(
1
)
COLLATE
utf8_bin
NOT
NULL
COMMENT
'是否是系统字典,Y-是,N-否'
,
`status`
varchar
(
10
)
COLLATE
utf8_bin
NOT
NULL
DEFAULT
'ENABLE'
COMMENT
'状态(字典)'
,
`code`
varchar
(
255
)
NOT
NULL
COMMENT
'字典类型编码'
,
`name`
varchar
(
255
)
NOT
NULL
COMMENT
'字典类型名称'
,
`description`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'字典描述'
,
`system_flag`
char
(
1
)
C
HARACTER
SET
utf8
C
OLLATE
utf8_bin
NOT
NULL
COMMENT
'是否是系统字典,Y-是,N-否'
,
`status`
varchar
(
10
)
NOT
NULL
DEFAULT
'ENABLE'
COMMENT
'状态(字典)'
,
`sort`
int
(
11
)
DEFAULT
NULL
COMMENT
'排序'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'添加时间'
,
`create_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建人'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'修改时间'
,
`update_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'修改人'
,
PRIMARY
KEY
(
`dict_type_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'字典类型表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'字典类型表'
;
-- ----------------------------
-- Records of sys_dict_type
...
...
@@ -205,19 +205,19 @@ COMMIT;
-- ----------------------------
DROP
TABLE
IF
EXISTS
`sys_file_info`
;
CREATE
TABLE
`sys_file_info`
(
`file_id`
varchar
(
50
)
COLLATE
utf8_bin
NOT
NULL
COMMENT
'主键id'
,
`file_bucket`
varchar
(
100
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'文件仓库(oss仓库)'
,
`file_name`
varchar
(
100
)
COLLATE
utf8_bin
NOT
NULL
COMMENT
'文件名称'
,
`file_suffix`
varchar
(
50
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'文件后缀'
,
`file_id`
varchar
(
50
)
NOT
NULL
COMMENT
'主键id'
,
`file_bucket`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'文件仓库(oss仓库)'
,
`file_name`
varchar
(
100
)
NOT
NULL
COMMENT
'文件名称'
,
`file_suffix`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'文件后缀'
,
`file_size_kb`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'文件大小kb'
,
`final_name`
varchar
(
100
)
COLLATE
utf8_bin
NOT
NULL
COMMENT
'文件唯一标识id'
,
`file_path`
varchar
(
1000
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'存储路径'
,
`final_name`
varchar
(
100
)
NOT
NULL
COMMENT
'文件唯一标识id'
,
`file_path`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'存储路径'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'修改时间'
,
`create_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建用户'
,
`update_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'修改用户'
,
PRIMARY
KEY
(
`file_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'文件信息表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'文件信息表'
;
-- ----------------------------
-- Table structure for sys_login_log
...
...
@@ -225,14 +225,14 @@ CREATE TABLE `sys_file_info` (
DROP
TABLE
IF
EXISTS
`sys_login_log`
;
CREATE
TABLE
`sys_login_log`
(
`login_log_id`
bigint
(
20
)
NOT
NULL
COMMENT
'主键'
,
`log_name`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'日志名称'
,
`log_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'日志名称'
,
`user_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'管理员id'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`succeed`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'是否执行成功'
,
`message`
text
COLLATE
utf8_bin
COMMENT
'具体消息'
,
`ip_address`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'登录ip'
,
`succeed`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'是否执行成功'
,
`message`
text
C
HARACTER
SET
utf8
C
OLLATE
utf8_bin
COMMENT
'具体消息'
,
`ip_address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'登录ip'
,
PRIMARY
KEY
(
`login_log_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'登录记录'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'登录记录'
;
-- ----------------------------
-- Table structure for sys_menu
...
...
@@ -240,25 +240,25 @@ CREATE TABLE `sys_login_log` (
DROP
TABLE
IF
EXISTS
`sys_menu`
;
CREATE
TABLE
`sys_menu`
(
`menu_id`
bigint
(
20
)
NOT
NULL
COMMENT
'主键id'
,
`code`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'菜单编号'
,
`pcode`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'菜单父编号'
,
`pcodes`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'当前菜单的所有父菜单编号'
,
`name`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'菜单名称'
,
`icon`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'菜单图标'
,
`url`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'url地址'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'菜单编号'
,
`pcode`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'菜单父编号'
,
`pcodes`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'当前菜单的所有父菜单编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'菜单名称'
,
`icon`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'菜单图标'
,
`url`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'url地址'
,
`sort`
int
(
65
)
DEFAULT
NULL
COMMENT
'菜单排序号'
,
`levels`
int
(
65
)
DEFAULT
NULL
COMMENT
'菜单层级'
,
`menu_flag`
varchar
(
32
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'是否是菜单(字典)'
,
`description`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'备注'
,
`status`
varchar
(
32
)
COLLATE
utf8_bin
DEFAULT
'ENABLE'
COMMENT
'菜单状态(字典)'
,
`new_page_flag`
varchar
(
32
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'是否打开新页面的标识(字典)'
,
`open_flag`
varchar
(
32
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'是否打开(字典)'
,
`menu_flag`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'是否是菜单(字典)'
,
`description`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`status`
varchar
(
32
)
DEFAULT
'ENABLE'
COMMENT
'菜单状态(字典)'
,
`new_page_flag`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'是否打开新页面的标识(字典)'
,
`open_flag`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'是否打开(字典)'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'修改时间'
,
`create_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建人'
,
`update_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'修改人'
,
PRIMARY
KEY
(
`menu_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'菜单表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'菜单表'
;
-- ----------------------------
-- Records of sys_menu
...
...
@@ -334,6 +334,10 @@ INSERT INTO `sys_menu` VALUES (1142957882422112257, 'SYS_CONFIG', 'meta_data', '
INSERT
INTO
`sys_menu`
VALUES
(
1142957882422112258
,
'SYS_CONFIG_ADD'
,
'SYS_CONFIG'
,
'[0],[dev_tools],[meta_data],[SYS_CONFIG],'
,
'参数配置添加'
,
'fa-star'
,
''
,
999
,
4
,
'N'
,
''
,
'ENABLE'
,
''
,
''
,
'2019-06-24 08:49:28'
,
'2019-06-24 08:57:34'
,
1
,
1
);
INSERT
INTO
`sys_menu`
VALUES
(
1142957882422112259
,
'SYS_CONFIG_EDIT'
,
'SYS_CONFIG'
,
'[0],[dev_tools],[meta_data],[SYS_CONFIG],'
,
'参数配置修改'
,
'fa-star'
,
''
,
999
,
4
,
'N'
,
''
,
'ENABLE'
,
''
,
''
,
'2019-06-24 08:49:28'
,
'2019-06-24 08:57:34'
,
1
,
1
);
INSERT
INTO
`sys_menu`
VALUES
(
1142957882426306562
,
'SYS_CONFIG_DELETE'
,
'SYS_CONFIG'
,
'[0],[dev_tools],[meta_data],[SYS_CONFIG],'
,
'参数配置删除'
,
'fa-star'
,
''
,
999
,
4
,
'N'
,
''
,
'ENABLE'
,
''
,
''
,
'2019-06-24 08:49:28'
,
'2019-06-24 08:57:34'
,
1
,
1
);
INSERT
INTO
`sys_menu`
VALUES
(
1144441072852684801
,
'SYS_POSITION'
,
'system'
,
'[0],[system],'
,
'职位管理'
,
'fa-star'
,
'/position'
,
35
,
2
,
'Y'
,
''
,
'ENABLE'
,
''
,
''
,
'2019-06-28 11:03:09'
,
'2019-06-28 11:06:42'
,
1
,
1
);
INSERT
INTO
`sys_menu`
VALUES
(
1144441072852684802
,
'SYS_POSITION_ADD'
,
'SYS_POSITION'
,
'[0],[system],[SYS_POSITION],'
,
'职位表添加'
,
'fa-star'
,
''
,
999
,
3
,
'N'
,
''
,
'ENABLE'
,
''
,
''
,
'2019-06-28 11:03:09'
,
'2019-06-28 11:06:42'
,
1
,
1
);
INSERT
INTO
`sys_menu`
VALUES
(
1144441072852684803
,
'SYS_POSITION_EDIT'
,
'SYS_POSITION'
,
'[0],[system],[SYS_POSITION],'
,
'职位表修改'
,
'fa-star'
,
''
,
999
,
3
,
'N'
,
''
,
'ENABLE'
,
''
,
''
,
'2019-06-28 11:03:09'
,
'2019-06-28 11:06:42'
,
1
,
1
);
INSERT
INTO
`sys_menu`
VALUES
(
1144441072852684804
,
'SYS_POSITION_DELETE'
,
'SYS_POSITION'
,
'[0],[system],[SYS_POSITION],'
,
'职位表删除'
,
'fa-star'
,
''
,
999
,
3
,
'N'
,
''
,
'ENABLE'
,
''
,
''
,
'2019-06-28 11:03:09'
,
'2019-06-28 11:06:42'
,
1
,
1
);
COMMIT
;
-- ----------------------------
...
...
@@ -342,14 +346,14 @@ COMMIT;
DROP
TABLE
IF
EXISTS
`sys_notice`
;
CREATE
TABLE
`sys_notice`
(
`notice_id`
bigint
(
20
)
NOT
NULL
COMMENT
'主键'
,
`title`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'标题'
,
`content`
text
COLLATE
utf8_bin
COMMENT
'内容'
,
`title`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'标题'
,
`content`
text
C
HARACTER
SET
utf8
C
OLLATE
utf8_bin
COMMENT
'内容'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`create_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建人'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'修改时间'
,
`update_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'修改人'
,
PRIMARY
KEY
(
`notice_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'通知表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'通知表'
;
-- ----------------------------
-- Records of sys_notice
...
...
@@ -365,16 +369,43 @@ COMMIT;
DROP
TABLE
IF
EXISTS
`sys_operation_log`
;
CREATE
TABLE
`sys_operation_log`
(
`operation_log_id`
bigint
(
20
)
NOT
NULL
COMMENT
'主键'
,
`log_type`
varchar
(
32
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'日志类型(字典)'
,
`log_name`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'日志名称'
,
`log_type`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'日志类型(字典)'
,
`log_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'日志名称'
,
`user_id`
bigint
(
65
)
DEFAULT
NULL
COMMENT
'用户id'
,
`class_name`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'类名称'
,
`method`
text
COLLATE
utf8_bin
COMMENT
'方法名称'
,
`class_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'类名称'
,
`method`
text
C
HARACTER
SET
utf8
C
OLLATE
utf8_bin
COMMENT
'方法名称'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`succeed`
varchar
(
32
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'是否成功(字典)'
,
`message`
text
COLLATE
utf8_bin
COMMENT
'备注'
,
`succeed`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'是否成功(字典)'
,
`message`
text
C
HARACTER
SET
utf8
C
OLLATE
utf8_bin
COMMENT
'备注'
,
PRIMARY
KEY
(
`operation_log_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'操作日志'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'操作日志'
;
-- ----------------------------
-- Table structure for sys_position
-- ----------------------------
DROP
TABLE
IF
EXISTS
`sys_position`
;
CREATE
TABLE
`sys_position`
(
`position_id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键id'
,
`name`
varchar
(
50
)
NOT
NULL
COMMENT
'职位名称'
,
`code`
varchar
(
64
)
NOT
NULL
COMMENT
'职位编码'
,
`sort`
int
(
11
)
NOT
NULL
COMMENT
'顺序'
,
`status`
varchar
(
100
)
NOT
NULL
COMMENT
'状态(字典)'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'更新者'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
`create_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建者'
,
PRIMARY
KEY
(
`position_id`
)
USING
BTREE
,
UNIQUE
KEY
`CODE_UNI`
(
`code`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
5
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'职位表'
;
-- ----------------------------
-- Records of sys_position
-- ----------------------------
BEGIN
;
INSERT
INTO
`sys_position`
VALUES
(
1
,
'董事长'
,
'President'
,
1
,
'ENABLE'
,
NULL
,
'2019-06-27 18:14:43'
,
1
,
NULL
,
NULL
);
INSERT
INTO
`sys_position`
VALUES
(
2
,
'总经理'
,
'GM'
,
2
,
'ENABLE'
,
NULL
,
'2019-06-27 18:14:43'
,
1
,
NULL
,
NULL
);
COMMIT
;
-- ----------------------------
-- Table structure for sys_relation
...
...
@@ -385,7 +416,7 @@ CREATE TABLE `sys_relation` (
`menu_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'菜单id'
,
`role_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'角色id'
,
PRIMARY
KEY
(
`relation_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'角色和菜单关联表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'角色和菜单关联表'
;
-- ----------------------------
-- Records of sys_relation
...
...
@@ -410,76 +441,80 @@ INSERT INTO `sys_relation` VALUES (1138325281216442370, 172, 5);
INSERT
INTO
`sys_relation`
VALUES
(
1138325281229025281
,
145
,
5
);
INSERT
INTO
`sys_relation`
VALUES
(
1138325281245802498
,
1111545968697860098
,
5
);
INSERT
INTO
`sys_relation`
VALUES
(
1138325281258385410
,
1111546189892870145
,
5
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067646771201
,
105
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067659354113
,
106
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067676131330
,
107
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067688714241
,
108
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067705491457
,
109
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067718074369
,
110
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067734851585
,
111
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067747434497
,
112
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067764211713
,
113
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067776794626
,
165
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067789377538
,
166
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067806154754
,
167
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067818737665
,
114
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067831320578
,
115
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067848097794
,
116
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067856486402
,
117
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067873263618
,
118
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067885846529
,
162
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067898429441
,
163
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067911012354
,
164
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067923595266
,
119
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067936178177
,
120
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067948761090
,
121
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067957149698
,
122
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067969732610
,
150
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067982315521
,
151
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958067994898433
,
128
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068007481345
,
134
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068020064257
,
158
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068036841473
,
159
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068049424385
,
130
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068062007297
,
131
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068074590210
,
135
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068087173122
,
136
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068099756033
,
137
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068116533250
,
152
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068129116162
,
153
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068141699074
,
154
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068154281985
,
132
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068166864897
,
138
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068183642113
,
139
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068196225025
,
140
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068208807937
,
155
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068221390850
,
156
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068233973761
,
157
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068246556673
,
133
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068259139585
,
160
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068275916802
,
161
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068288499714
,
141
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068301082626
,
142
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068313665537
,
143
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068326248449
,
144
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068343025665
,
171
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068355608578
,
149
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068368191490
,
1110777136265838594
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068376580097
,
1110777366856089602
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068389163009
,
1110777491464667137
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068405940225
,
1110787391943098370
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068418523138
,
1110839216310329346
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068426911745
,
1127085735660421122
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068443688962
,
1139826657964593154
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068456271873
,
1139827152854716418
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068468854786
,
1142957882422112257
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068481437698
,
1142957882422112258
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068494020609
,
1142957882422112259
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068506603521
,
1142957882426306562
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068519186433
,
172
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068531769346
,
145
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068548546562
,
1111545968697860098
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1142958068561129473
,
1111546189892870145
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297607614466
,
105
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297620197378
,
106
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297632780289
,
107
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297641168897
,
108
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297657946113
,
109
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297666334721
,
110
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297678917634
,
111
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297691500546
,
112
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297699889153
,
113
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297712472066
,
165
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297720860673
,
166
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297733443585
,
167
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297741832194
,
114
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297750220802
,
115
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297762803714
,
116
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297771192322
,
117
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297779580930
,
118
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297792163842
,
162
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297800552449
,
163
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297813135362
,
164
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297821523969
,
119
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297829912578
,
120
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297842495490
,
121
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297850884098
,
122
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297867661313
,
150
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297884438529
,
151
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297905410050
,
128
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297926381570
,
134
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297943158785
,
158
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297968324610
,
159
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297989296129
,
130
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298006073346
,
131
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298027044866
,
135
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298048016386
,
136
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298068987905
,
137
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298085765122
,
152
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298106736641
,
153
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298131902465
,
154
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298148679681
,
132
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298169651202
,
138
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298186428418
,
139
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298203205633
,
140
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298219982850
,
155
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298232565761
,
156
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298245148673
,
157
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298257731585
,
133
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298270314497
,
160
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298282897409
,
161
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298295480321
,
141
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298312257537
,
142
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298324840450
,
143
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298337423362
,
144
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298345811970
,
1144441072852684801
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298358394882
,
1144441072852684802
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298370977794
,
1144441072852684803
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298379366402
,
1144441072852684804
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298391949313
,
171
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298400337922
,
149
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298412920834
,
1110777136265838594
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298421309441
,
1110777366856089602
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298433892354
,
1110777491464667137
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298446475265
,
1110787391943098370
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298459058178
,
1110839216310329346
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298467446786
,
1127085735660421122
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298475835394
,
1139826657964593154
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298488418306
,
1139827152854716418
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298501001217
,
1142957882422112257
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298513584130
,
1142957882422112258
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298526167042
,
1142957882422112259
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298538749953
,
1142957882426306562
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298551332865
,
172
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298559721473
,
145
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298572304385
,
1111545968697860098
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298580692994
,
1111546189892870145
,
1
);
COMMIT
;
-- ----------------------------
...
...
@@ -489,8 +524,8 @@ DROP TABLE IF EXISTS `sys_role`;
CREATE
TABLE
`sys_role`
(
`role_id`
bigint
(
20
)
NOT
NULL
COMMENT
'主键id'
,
`pid`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'父角色id'
,
`name`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'角色名称'
,
`description`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'提示'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'角色名称'
,
`description`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'提示'
,
`sort`
int
(
11
)
DEFAULT
NULL
COMMENT
'序号'
,
`version`
int
(
11
)
DEFAULT
NULL
COMMENT
'乐观锁'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
...
...
@@ -498,7 +533,7 @@ CREATE TABLE `sys_role` (
`create_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建用户'
,
`update_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'修改用户'
,
PRIMARY
KEY
(
`role_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'角色表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'角色表'
;
-- ----------------------------
-- Records of sys_role
...
...
@@ -514,31 +549,49 @@ COMMIT;
DROP
TABLE
IF
EXISTS
`sys_user`
;
CREATE
TABLE
`sys_user`
(
`user_id`
bigint
(
20
)
NOT
NULL
COMMENT
'主键id'
,
`avatar`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'头像'
,
`account`
varchar
(
45
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'账号'
,
`password`
varchar
(
45
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'密码'
,
`salt`
varchar
(
45
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'md5密码盐'
,
`name`
varchar
(
45
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'名字'
,
`avatar`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'头像'
,
`account`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'账号'
,
`password`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'密码'
,
`salt`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'md5密码盐'
,
`name`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'名字'
,
`birthday`
datetime
DEFAULT
NULL
COMMENT
'生日'
,
`sex`
varchar
(
32
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'性别(字典)'
,
`email`
varchar
(
45
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'电子邮件'
,
`phone`
varchar
(
45
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'电话'
,
`role_id`
varchar
(
255
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'角色id(多个逗号隔开)'
,
`sex`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'性别(字典)'
,
`email`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'电子邮件'
,
`phone`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'电话'
,
`role_id`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'角色id(多个逗号隔开)'
,
`dept_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'部门id(多个逗号隔开)'
,
`status`
varchar
(
32
)
COLLATE
utf8_bin
DEFAULT
NULL
COMMENT
'状态(字典)'
,
`status`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'状态(字典)'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`create_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建人'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
`update_user`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'更新人'
,
`version`
int
(
11
)
DEFAULT
NULL
COMMENT
'乐观锁'
,
PRIMARY
KEY
(
`user_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'管理员表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'管理员表'
;
-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN
;
INSERT
INTO
`sys_user`
VALUES
(
1
,
'1124606971782160385'
,
'admin'
,
'1d6b1208c7d151d335790276a18e3d99'
,
'q6taw'
,
'stylefeng'
,
'2018-11-16 00:00:00'
,
'M'
,
'sn93@qq.com'
,
'18200000000'
,
'1'
,
27
,
'ENABLE'
,
'2016-01-29 08:49:53'
,
NULL
,
'2019-05-04 17:29:31'
,
24
,
25
);
INSERT
INTO
`sys_user`
VALUES
(
1
,
'1124606971782160385'
,
'admin'
,
'1d6b1208c7d151d335790276a18e3d99'
,
'q6taw'
,
'stylefeng'
,
'2018-11-16 00:00:00'
,
'M'
,
'sn93@qq.com'
,
'18200000000'
,
'1'
,
25
,
'ENABLE'
,
'2016-01-29 08:49:53'
,
NULL
,
'2019-06-28 14:38:19'
,
24
,
25
);
COMMIT
;
-- ----------------------------
-- Table structure for sys_user_pos
-- ----------------------------
DROP
TABLE
IF
EXISTS
`sys_user_pos`
;
CREATE
TABLE
`sys_user_pos`
(
`user_pos_id`
bigint
(
20
)
NOT
NULL
COMMENT
'主键id'
,
`user_id`
bigint
(
20
)
NOT
NULL
COMMENT
'用户id'
,
`pos_id`
bigint
(
20
)
NOT
NULL
COMMENT
'职位id'
,
PRIMARY
KEY
(
`user_pos_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'用户职位关联表'
;
-- ----------------------------
-- Records of sys_user_pos
-- ----------------------------
BEGIN
;
INSERT
INTO
`sys_user_pos`
VALUES
(
1144495219551617025
,
1
,
1
);
COMMIT
;
SET
FOREIGN_KEY_CHECKS
=
1
;
guns-sys/src/main/java/cn/stylefeng/guns/sys/core/constant/factory/ConstantFactory.java
View file @
2536a57c
...
...
@@ -24,6 +24,8 @@ import cn.stylefeng.guns.sys.core.constant.state.MenuStatus;
import
cn.stylefeng.guns.sys.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.sys.modular.system.entity.*
;
import
cn.stylefeng.guns.sys.modular.system.mapper.*
;
import
cn.stylefeng.guns.sys.modular.system.service.PositionService
;
import
cn.stylefeng.guns.sys.modular.system.service.UserPosService
;
import
cn.stylefeng.roses.core.util.SpringContextHolder
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -51,6 +53,8 @@ public class ConstantFactory implements IConstantFactory {
private
UserMapper
userMapper
=
SpringContextHolder
.
getBean
(
UserMapper
.
class
);
private
MenuMapper
menuMapper
=
SpringContextHolder
.
getBean
(
MenuMapper
.
class
);
private
NoticeMapper
noticeMapper
=
SpringContextHolder
.
getBean
(
NoticeMapper
.
class
);
private
UserPosService
userPosService
=
SpringContextHolder
.
getBean
(
UserPosService
.
class
);
private
PositionService
positionService
=
SpringContextHolder
.
getBean
(
PositionService
.
class
);
public
static
IConstantFactory
me
()
{
return
SpringContextHolder
.
getBean
(
"constantFactory"
);
...
...
@@ -329,5 +333,23 @@ public class ConstantFactory implements IConstantFactory {
return
parentDeptIds
;
}
@Override
public
String
getPositionName
(
Long
userId
)
{
StringBuilder
positionNames
=
new
StringBuilder
();
List
<
UserPos
>
userPosList
=
this
.
userPosService
.
list
(
new
QueryWrapper
<
UserPos
>().
eq
(
"user_id"
,
userId
));
if
(
userPosList
!=
null
&&
userPosList
.
size
()
>
0
)
{
for
(
UserPos
userPos
:
userPosList
)
{
Position
position
=
positionService
.
getById
(
userPos
.
getPosId
());
positionNames
.
append
(
","
).
append
(
position
.
getName
());
}
}
return
StrUtil
.
removePrefix
(
positionNames
.
toString
(),
","
);
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/core/constant/factory/IConstantFactory.java
View file @
2536a57c
...
...
@@ -139,4 +139,9 @@ public interface IConstantFactory {
*/
List
<
Long
>
getParentDeptIds
(
Long
deptId
);
/**
* 获取用户的职位名称
*/
String
getPositionName
(
Long
userId
);
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/controller/PositionController.java
0 → 100644
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
controller
;
import
cn.stylefeng.guns.base.enums.CommonStatus
;
import
cn.stylefeng.guns.base.pojo.page.LayuiPageInfo
;
import
cn.stylefeng.guns.sys.modular.system.entity.Position
;
import
cn.stylefeng.guns.sys.modular.system.model.params.PositionParam
;
import
cn.stylefeng.guns.sys.modular.system.service.PositionService
;
import
cn.stylefeng.guns.sys.modular.system.service.UserPosService
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.reqres.response.ResponseData
;
import
cn.stylefeng.roses.core.reqres.response.SuccessResponseData
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.RequestEmptyException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
/**
* 职位表控制器
*
* @author stylefeng
* @Date 2019-06-27 21:33:47
*/
@Controller
@RequestMapping
(
"/position"
)
public
class
PositionController
extends
BaseController
{
private
String
PREFIX
=
"/modular/system/position"
;
@Autowired
private
PositionService
positionService
;
@Autowired
private
UserPosService
userPosService
;
/**
* 跳转到主页面
*
* @author stylefeng
* @Date 2019-06-27
*/
@RequestMapping
(
""
)
public
String
index
()
{
return
PREFIX
+
"/position.html"
;
}
/**
* 新增页面
*
* @author stylefeng
* @Date 2019-06-27
*/
@RequestMapping
(
"/add"
)
public
String
add
()
{
return
PREFIX
+
"/position_add.html"
;
}
/**
* 编辑页面
*
* @author stylefeng
* @Date 2019-06-27
*/
@RequestMapping
(
"/edit"
)
public
String
edit
()
{
return
PREFIX
+
"/position_edit.html"
;
}
/**
* 新增接口
*
* @author stylefeng
* @Date 2019-06-27
*/
@RequestMapping
(
"/addItem"
)
@ResponseBody
public
ResponseData
addItem
(
PositionParam
positionParam
)
{
this
.
positionService
.
add
(
positionParam
);
return
ResponseData
.
success
();
}
/**
* 编辑接口
*
* @author stylefeng
* @Date 2019-06-27
*/
@RequestMapping
(
"/editItem"
)
@ResponseBody
public
ResponseData
editItem
(
PositionParam
positionParam
)
{
this
.
positionService
.
update
(
positionParam
);
return
ResponseData
.
success
();
}
/**
* 删除接口
*
* @author stylefeng
* @Date 2019-06-27
*/
@RequestMapping
(
"/delete"
)
@ResponseBody
public
ResponseData
delete
(
PositionParam
positionParam
)
{
this
.
positionService
.
delete
(
positionParam
);
return
ResponseData
.
success
();
}
/**
* 查看详情接口
*
* @author stylefeng
* @Date 2019-06-27
*/
@RequestMapping
(
"/detail"
)
@ResponseBody
public
ResponseData
detail
(
PositionParam
positionParam
)
{
Position
detail
=
this
.
positionService
.
getById
(
positionParam
.
getPositionId
());
return
ResponseData
.
success
(
detail
);
}
/**
* 查询列表
*
* @author stylefeng
* @Date 2019-06-27
*/
@ResponseBody
@RequestMapping
(
"/list"
)
public
LayuiPageInfo
list
(
@RequestParam
(
value
=
"condition"
,
required
=
false
)
String
condition
)
{
PositionParam
positionParam
=
new
PositionParam
();
if
(
ToolUtil
.
isNotEmpty
(
condition
))
{
positionParam
.
setCode
(
condition
);
positionParam
.
setName
(
condition
);
}
return
this
.
positionService
.
findPageBySpec
(
positionParam
);
}
/**
* 修改状态
*
* @author stylefeng
* @Date 2019-06-27
*/
@ResponseBody
@RequestMapping
(
"/changeStatus"
)
public
ResponseData
changeStatus
(
@RequestParam
(
"positionId"
)
String
positionId
,
@RequestParam
(
"status"
)
Boolean
status
)
{
Position
position
=
this
.
positionService
.
getById
(
positionId
);
if
(
position
==
null
)
{
throw
new
RequestEmptyException
();
}
if
(
status
)
{
position
.
setStatus
(
CommonStatus
.
ENABLE
.
getCode
());
}
else
{
position
.
setStatus
(
CommonStatus
.
DISABLE
.
getCode
());
}
this
.
positionService
.
updateById
(
position
);
return
new
SuccessResponseData
();
}
/**
* 查询所有职位
*
* @author stylefeng
* @Date 2019-03-13
*/
@ResponseBody
@RequestMapping
(
"/listPositions"
)
public
LayuiPageInfo
listlistPositionsTypes
(
@RequestParam
(
value
=
"userId"
,
required
=
false
)
Long
userId
)
{
return
this
.
positionService
.
listPositions
(
userId
);
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/entity/Position.java
0 → 100644
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <p>
* 职位表
* </p>
*
* @author stylefeng
* @since 2019-06-27
*/
@TableName
(
"sys_position"
)
public
class
Position
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
@TableId
(
value
=
"position_id"
,
type
=
IdType
.
ID_WORKER
)
private
Long
positionId
;
/**
* 职位名称
*/
@TableField
(
"name"
)
private
String
name
;
/**
* 职位编码
*/
@TableField
(
"code"
)
private
String
code
;
/**
* 顺序
*/
@TableField
(
"sort"
)
private
Integer
sort
;
/**
* 状态(字典)
*/
@TableField
(
"status"
)
private
String
status
;
/**
* 备注
*/
@TableField
(
"remark"
)
private
String
remark
;
/**
* 创建时间
*/
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
Date
createTime
;
/**
* 更新者
*/
@TableField
(
value
=
"update_user"
,
fill
=
FieldFill
.
UPDATE
)
private
Long
updateUser
;
/**
* 更新时间
*/
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
UPDATE
)
private
Date
updateTime
;
/**
* 创建者
*/
@TableField
(
value
=
"create_user"
,
fill
=
FieldFill
.
INSERT
)
private
Long
createUser
;
public
Long
getPositionId
()
{
return
positionId
;
}
public
void
setPositionId
(
Long
positionId
)
{
this
.
positionId
=
positionId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
Integer
getSort
()
{
return
sort
;
}
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Long
getUpdateUser
()
{
return
updateUser
;
}
public
void
setUpdateUser
(
Long
updateUser
)
{
this
.
updateUser
=
updateUser
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Long
getCreateUser
()
{
return
createUser
;
}
public
void
setCreateUser
(
Long
createUser
)
{
this
.
createUser
=
createUser
;
}
@Override
public
String
toString
()
{
return
"Position{"
+
"positionId="
+
positionId
+
", name="
+
name
+
", code="
+
code
+
", sort="
+
sort
+
", status="
+
status
+
", remark="
+
remark
+
", createTime="
+
createTime
+
", updateUser="
+
updateUser
+
", updateTime="
+
updateTime
+
", createUser="
+
createUser
+
"}"
;
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/entity/UserPos.java
0 → 100755
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
java.io.Serializable
;
/**
* <p>
* 用户职位关联表
* </p>
*
* @author stylefeng
* @since 2019-06-28
*/
@TableName
(
"sys_user_pos"
)
public
class
UserPos
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
@TableId
(
value
=
"user_pos_id"
,
type
=
IdType
.
ID_WORKER
)
private
Long
userPosId
;
/**
* 用户id
*/
@TableField
(
"user_id"
)
private
Long
userId
;
/**
* 职位id
*/
@TableField
(
"pos_id"
)
private
Long
posId
;
public
Long
getUserPosId
()
{
return
userPosId
;
}
public
void
setUserPosId
(
Long
userPosId
)
{
this
.
userPosId
=
userPosId
;
}
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getPosId
()
{
return
posId
;
}
public
void
setPosId
(
Long
posId
)
{
this
.
posId
=
posId
;
}
@Override
public
String
toString
()
{
return
"UserPos{"
+
"userPosId="
+
userPosId
+
", userId="
+
userId
+
", posId="
+
posId
+
"}"
;
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/mapper/PositionMapper.java
0 → 100644
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
mapper
;
import
cn.stylefeng.guns.sys.modular.system.entity.Position
;
import
cn.stylefeng.guns.sys.modular.system.model.params.PositionParam
;
import
cn.stylefeng.guns.sys.modular.system.model.result.PositionResult
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 职位表 Mapper 接口
* </p>
*
* @author stylefeng
* @since 2019-06-27
*/
public
interface
PositionMapper
extends
BaseMapper
<
Position
>
{
/**
* 获取列表
*
* @author stylefeng
* @Date 2019-06-27
*/
List
<
PositionResult
>
customList
(
@Param
(
"paramCondition"
)
PositionParam
paramCondition
);
/**
* 获取map列表
*
* @author stylefeng
* @Date 2019-06-27
*/
List
<
Map
<
String
,
Object
>>
customMapList
(
@Param
(
"paramCondition"
)
PositionParam
paramCondition
);
/**
* 获取分页实体列表
*
* @author stylefeng
* @Date 2019-06-27
*/
Page
<
PositionResult
>
customPageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"paramCondition"
)
PositionParam
paramCondition
);
/**
* 获取分页map列表
*
* @author stylefeng
* @Date 2019-06-27
*/
Page
<
Map
<
String
,
Object
>>
customPageMapList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"paramCondition"
)
PositionParam
paramCondition
);
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/mapper/UserPosMapper.java
0 → 100755
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
mapper
;
import
cn.stylefeng.guns.sys.modular.system.entity.UserPos
;
import
cn.stylefeng.guns.sys.modular.system.model.params.UserPosParam
;
import
cn.stylefeng.guns.sys.modular.system.model.result.UserPosResult
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 用户职位关联表 Mapper 接口
* </p>
*
* @author stylefeng
* @since 2019-06-28
*/
public
interface
UserPosMapper
extends
BaseMapper
<
UserPos
>
{
/**
* 获取列表
*
* @author stylefeng
* @Date 2019-06-28
*/
List
<
UserPosResult
>
customList
(
@Param
(
"paramCondition"
)
UserPosParam
paramCondition
);
/**
* 获取map列表
*
* @author stylefeng
* @Date 2019-06-28
*/
List
<
Map
<
String
,
Object
>>
customMapList
(
@Param
(
"paramCondition"
)
UserPosParam
paramCondition
);
/**
* 获取分页实体列表
*
* @author stylefeng
* @Date 2019-06-28
*/
Page
<
UserPosResult
>
customPageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"paramCondition"
)
UserPosParam
paramCondition
);
/**
* 获取分页map列表
*
* @author stylefeng
* @Date 2019-06-28
*/
Page
<
Map
<
String
,
Object
>>
customPageMapList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"paramCondition"
)
UserPosParam
paramCondition
);
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/mapper/mapping/PositionMapper.xml
0 → 100644
View file @
2536a57c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.stylefeng.guns.sys.modular.system.mapper.PositionMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.stylefeng.guns.sys.modular.system.entity.Position"
>
<id
column=
"position_id"
property=
"positionId"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"code"
property=
"code"
/>
<result
column=
"sort"
property=
"sort"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"remark"
property=
"remark"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_user"
property=
"updateUser"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"create_user"
property=
"createUser"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
position_id AS "positionId", name AS "name", code AS "code", sort AS "sort", status AS "status", remark AS "remark", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime", create_user AS "createUser"
</sql>
<select
id=
"customList"
resultType=
"cn.stylefeng.guns.sys.modular.system.model.result.PositionResult"
parameterType=
"cn.stylefeng.guns.sys.modular.system.model.params.PositionParam"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_position where 1 = 1
<if
test=
"paramCondition.name != null and paramCondition.name != ''"
>
and name like CONCAT('%',#{paramCondition.name},'%')
</if>
<if
test=
"paramCondition.code != null and paramCondition.code != ''"
>
and code like CONCAT('%',#{paramCondition.code},'%')
</if>
order by sort asc
</select>
<select
id=
"customMapList"
resultType=
"map"
parameterType=
"cn.stylefeng.guns.sys.modular.system.model.params.PositionParam"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_position where 1 = 1
<if
test=
"paramCondition.name != null and paramCondition.name != ''"
>
and name like CONCAT('%',#{paramCondition.name},'%')
</if>
<if
test=
"paramCondition.code != null and paramCondition.code != ''"
>
and code like CONCAT('%',#{paramCondition.code},'%')
</if>
order by sort asc
</select>
<select
id=
"customPageList"
resultType=
"cn.stylefeng.guns.sys.modular.system.model.result.PositionResult"
parameterType=
"cn.stylefeng.guns.sys.modular.system.model.params.PositionParam"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_position
<where>
<if
test=
"paramCondition.name != null and paramCondition.name != ''"
>
name like CONCAT('%',#{paramCondition.name},'%')
</if>
<if
test=
"paramCondition.code != null and paramCondition.code != ''"
>
or code like CONCAT('%',#{paramCondition.code},'%')
</if>
</where>
order by sort asc
</select>
<select
id=
"customPageMapList"
resultType=
"map"
parameterType=
"cn.stylefeng.guns.sys.modular.system.model.params.PositionParam"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_position where 1 = 1
<if
test=
"paramCondition.name != null and paramCondition.name != ''"
>
and name like CONCAT('%',#{paramCondition.name},'%')
</if>
<if
test=
"paramCondition.code != null and paramCondition.code != ''"
>
and code like CONCAT('%',#{paramCondition.code},'%')
</if>
order by sort asc
</select>
</mapper>
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/mapper/mapping/UserPosMapper.xml
0 → 100755
View file @
2536a57c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.stylefeng.guns.sys.modular.system.mapper.UserPosMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.stylefeng.guns.sys.modular.system.entity.UserPos"
>
<id
column=
"user_pos_id"
property=
"userPosId"
/>
<result
column=
"user_id"
property=
"userId"
/>
<result
column=
"pos_id"
property=
"posId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
user_pos_id AS "userPosId", user_id AS "userId", pos_id AS "posId"
</sql>
<select
id=
"customList"
resultType=
"cn.stylefeng.guns.sys.modular.system.model.result.UserPosResult"
parameterType=
"cn.stylefeng.guns.sys.modular.system.model.params.UserPosParam"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_user_pos where 1 = 1
</select>
<select
id=
"customMapList"
resultType=
"map"
parameterType=
"cn.stylefeng.guns.sys.modular.system.model.params.UserPosParam"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_user_pos where 1 = 1
</select>
<select
id=
"customPageList"
resultType=
"cn.stylefeng.guns.sys.modular.system.model.result.UserPosResult"
parameterType=
"cn.stylefeng.guns.sys.modular.system.model.params.UserPosParam"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_user_pos where 1 = 1
</select>
<select
id=
"customPageMapList"
resultType=
"map"
parameterType=
"cn.stylefeng.guns.sys.modular.system.model.params.UserPosParam"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_user_pos where 1 = 1
</select>
</mapper>
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/model/UserDto.java
View file @
2536a57c
...
...
@@ -44,4 +44,6 @@ public class UserDto {
private
String
status
;
private
String
avatar
;
private
String
position
;
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/model/params/PositionParam.java
0 → 100644
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
model
.
params
;
import
cn.stylefeng.roses.kernel.model.validator.BaseValidatingParam
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <p>
* 职位表
* </p>
*
* @author stylefeng
* @since 2019-06-27
*/
@Data
public
class
PositionParam
implements
Serializable
,
BaseValidatingParam
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
private
Long
positionId
;
/**
* 职位名称
*/
private
String
name
;
/**
* 职位编码
*/
private
String
code
;
/**
* 顺序
*/
private
Integer
sort
;
/**
* 状态(字典)
*/
private
String
status
;
/**
* 备注
*/
private
String
remark
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新者
*/
private
Long
updateUser
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 创建者
*/
private
Long
createUser
;
@Override
public
String
checkParam
()
{
return
null
;
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/model/params/UserPosParam.java
0 → 100755
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
model
.
params
;
import
cn.stylefeng.roses.kernel.model.validator.BaseValidatingParam
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* <p>
* 用户职位关联表
* </p>
*
* @author stylefeng
* @since 2019-06-28
*/
@Data
public
class
UserPosParam
implements
Serializable
,
BaseValidatingParam
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
private
Long
userPosId
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 职位id
*/
private
Long
posId
;
@Override
public
String
checkParam
()
{
return
null
;
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/model/result/PositionResult.java
0 → 100644
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
model
.
result
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <p>
* 职位表
* </p>
*
* @author stylefeng
* @since 2019-06-27
*/
@Data
public
class
PositionResult
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
private
Long
positionId
;
/**
* 职位名称
*/
private
String
name
;
/**
* 职位编码
*/
private
String
code
;
/**
* 顺序
*/
private
Integer
sort
;
/**
* 状态(字典)
*/
private
String
status
;
/**
* 备注
*/
private
String
remark
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新者
*/
private
Long
updateUser
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 创建者
*/
private
Long
createUser
;
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/model/result/UserPosResult.java
0 → 100755
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
model
.
result
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* <p>
* 用户职位关联表
* </p>
*
* @author stylefeng
* @since 2019-06-28
*/
@Data
public
class
UserPosResult
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
private
Long
userPosId
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 职位id
*/
private
Long
posId
;
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/service/PositionService.java
0 → 100644
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
service
;
import
cn.stylefeng.guns.base.pojo.page.LayuiPageInfo
;
import
cn.stylefeng.guns.sys.modular.system.entity.Position
;
import
cn.stylefeng.guns.sys.modular.system.model.params.PositionParam
;
import
cn.stylefeng.guns.sys.modular.system.model.result.PositionResult
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 职位表 服务类
* </p>
*
* @author stylefeng
* @since 2019-06-27
*/
public
interface
PositionService
extends
IService
<
Position
>
{
/**
* 新增
*
* @author stylefeng
* @Date 2019-06-27
*/
void
add
(
PositionParam
param
);
/**
* 删除
*
* @author stylefeng
* @Date 2019-06-27
*/
void
delete
(
PositionParam
param
);
/**
* 更新
*
* @author stylefeng
* @Date 2019-06-27
*/
void
update
(
PositionParam
param
);
/**
* 查询单条数据,Specification模式
*
* @author stylefeng
* @Date 2019-06-27
*/
PositionResult
findBySpec
(
PositionParam
param
);
/**
* 查询列表,Specification模式
*
* @author stylefeng
* @Date 2019-06-27
*/
List
<
PositionResult
>
findListBySpec
(
PositionParam
param
);
/**
* 查询分页数据,Specification模式
*
* @author stylefeng
* @Date 2019-06-27
*/
LayuiPageInfo
findPageBySpec
(
PositionParam
param
);
/**
* 获取多选框的职位列表
*
* @author stylefeng
* @Date 2019-06-27
*/
LayuiPageInfo
listPositions
(
Long
userId
);
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/service/UserPosService.java
0 → 100755
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
service
;
import
cn.stylefeng.guns.base.pojo.page.LayuiPageInfo
;
import
cn.stylefeng.guns.sys.modular.system.entity.UserPos
;
import
cn.stylefeng.guns.sys.modular.system.model.params.UserPosParam
;
import
cn.stylefeng.guns.sys.modular.system.model.result.UserPosResult
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 用户职位关联表 服务类
* </p>
*
* @author stylefeng
* @since 2019-06-28
*/
public
interface
UserPosService
extends
IService
<
UserPos
>
{
/**
* 新增
*
* @author stylefeng
* @Date 2019-06-28
*/
void
add
(
UserPosParam
param
);
/**
* 删除
*
* @author stylefeng
* @Date 2019-06-28
*/
void
delete
(
UserPosParam
param
);
/**
* 更新
*
* @author stylefeng
* @Date 2019-06-28
*/
void
update
(
UserPosParam
param
);
/**
* 查询单条数据,Specification模式
*
* @author stylefeng
* @Date 2019-06-28
*/
UserPosResult
findBySpec
(
UserPosParam
param
);
/**
* 查询列表,Specification模式
*
* @author stylefeng
* @Date 2019-06-28
*/
List
<
UserPosResult
>
findListBySpec
(
UserPosParam
param
);
/**
* 查询分页数据,Specification模式
*
* @author stylefeng
* @Date 2019-06-28
*/
LayuiPageInfo
findPageBySpec
(
UserPosParam
param
);
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/service/UserService.java
View file @
2536a57c
...
...
@@ -12,11 +12,14 @@ import cn.stylefeng.guns.sys.core.exception.enums.BizExceptionEnum;
import
cn.stylefeng.guns.sys.core.shiro.ShiroKit
;
import
cn.stylefeng.guns.sys.core.shiro.service.UserAuthService
;
import
cn.stylefeng.guns.sys.modular.system.entity.User
;
import
cn.stylefeng.guns.sys.modular.system.entity.UserPos
;
import
cn.stylefeng.guns.sys.modular.system.factory.UserFactory
;
import
cn.stylefeng.guns.sys.modular.system.mapper.UserMapper
;
import
cn.stylefeng.guns.sys.modular.system.model.UserDto
;
import
cn.stylefeng.roses.core.datascope.DataScope
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.toolkit.SqlRunner
;
...
...
@@ -46,12 +49,16 @@ public class UserService extends ServiceImpl<UserMapper, User> {
@Autowired
private
UserAuthService
userAuthService
;
@Autowired
private
UserPosService
userPosService
;
/**
* 添加用戶
*
* @author fengshuonan
* @Date 2018/12/24 22:51
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
addUser
(
UserDto
user
)
{
// 判断账号是否重复
...
...
@@ -64,7 +71,11 @@ public class UserService extends ServiceImpl<UserMapper, User> {
String
salt
=
ShiroKit
.
getRandomSalt
(
5
);
String
password
=
ShiroKit
.
md5
(
user
.
getPassword
(),
salt
);
this
.
save
(
UserFactory
.
createUser
(
user
,
password
,
salt
));
User
newUser
=
UserFactory
.
createUser
(
user
,
password
,
salt
);
this
.
save
(
newUser
);
//添加职位关联
addPosition
(
user
.
getPosition
(),
newUser
.
getUserId
());
}
/**
...
...
@@ -73,6 +84,7 @@ public class UserService extends ServiceImpl<UserMapper, User> {
* @author fengshuonan
* @Date 2018/12/24 22:53
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
editUser
(
UserDto
user
)
{
User
oldUser
=
this
.
getById
(
user
.
getUserId
());
...
...
@@ -87,6 +99,12 @@ public class UserService extends ServiceImpl<UserMapper, User> {
throw
new
ServiceException
(
BizExceptionEnum
.
NO_PERMITION
);
}
}
//删除职位关联
userPosService
.
remove
(
new
QueryWrapper
<
UserPos
>().
eq
(
"user_id"
,
user
.
getUserId
()));
//添加职位关联
addPosition
(
user
.
getPosition
(),
user
.
getUserId
());
}
/**
...
...
@@ -107,6 +125,9 @@ public class UserService extends ServiceImpl<UserMapper, User> {
//删除对应的oauth2绑定表
SqlRunner
.
db
().
delete
(
"delete from oauth_user_info where user_id = {0}"
,
userId
);
//删除职位关联
userPosService
.
remove
(
new
QueryWrapper
<
UserPos
>().
eq
(
"user_id"
,
userId
));
}
/**
...
...
@@ -233,12 +254,33 @@ public class UserService extends ServiceImpl<UserMapper, User> {
User
user
=
this
.
getById
(
userId
);
Map
<
String
,
Object
>
map
=
UserFactory
.
removeUnSafeFields
(
user
);
HashMap
<
Object
,
Object
>
hashMap
=
CollectionUtil
.
newHashMap
();
HashMap
<
String
,
Object
>
hashMap
=
CollectionUtil
.
newHashMap
();
hashMap
.
putAll
(
map
);
hashMap
.
put
(
"roleName"
,
ConstantFactory
.
me
().
getRoleName
(
user
.
getRoleId
()));
hashMap
.
put
(
"deptName"
,
ConstantFactory
.
me
().
getDeptName
(
user
.
getDeptId
()));
return
m
ap
;
return
hashM
ap
;
}
/**
* 添加职位关联
*
* @author fengshuonan
* @Date 2019-06-28 13:35
*/
private
void
addPosition
(
String
positions
,
Long
userId
)
{
if
(
ToolUtil
.
isNotEmpty
(
positions
))
{
String
[]
position
=
positions
.
split
(
","
);
for
(
String
item
:
position
)
{
UserPos
entity
=
new
UserPos
();
entity
.
setUserId
(
userId
);
entity
.
setPosId
(
Long
.
valueOf
(
item
));
userPosService
.
save
(
entity
);
}
}
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/service/impl/PositionServiceImpl.java
0 → 100644
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
service
.
impl
;
import
cn.stylefeng.guns.base.pojo.page.LayuiPageFactory
;
import
cn.stylefeng.guns.base.pojo.page.LayuiPageInfo
;
import
cn.stylefeng.guns.sys.modular.system.entity.Position
;
import
cn.stylefeng.guns.sys.modular.system.entity.UserPos
;
import
cn.stylefeng.guns.sys.modular.system.mapper.PositionMapper
;
import
cn.stylefeng.guns.sys.modular.system.model.params.PositionParam
;
import
cn.stylefeng.guns.sys.modular.system.model.result.PositionResult
;
import
cn.stylefeng.guns.sys.modular.system.service.PositionService
;
import
cn.stylefeng.guns.sys.modular.system.service.UserPosService
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 职位表 服务实现类
* </p>
*
* @author stylefeng
* @since 2019-06-27
*/
@Service
public
class
PositionServiceImpl
extends
ServiceImpl
<
PositionMapper
,
Position
>
implements
PositionService
{
@Autowired
private
UserPosService
userPosService
;
@Override
public
void
add
(
PositionParam
param
)
{
Position
entity
=
getEntity
(
param
);
this
.
save
(
entity
);
}
@Override
public
void
delete
(
PositionParam
param
)
{
this
.
removeById
(
getKey
(
param
));
}
@Override
public
void
update
(
PositionParam
param
)
{
Position
oldEntity
=
getOldEntity
(
param
);
Position
newEntity
=
getEntity
(
param
);
ToolUtil
.
copyProperties
(
newEntity
,
oldEntity
);
this
.
updateById
(
newEntity
);
}
@Override
public
PositionResult
findBySpec
(
PositionParam
param
)
{
return
null
;
}
@Override
public
List
<
PositionResult
>
findListBySpec
(
PositionParam
param
)
{
return
null
;
}
@Override
public
LayuiPageInfo
findPageBySpec
(
PositionParam
param
)
{
Page
pageContext
=
getPageContext
();
IPage
page
=
this
.
baseMapper
.
customPageList
(
pageContext
,
param
);
return
LayuiPageFactory
.
createPageInfo
(
page
);
}
@Override
public
LayuiPageInfo
listPositions
(
Long
userId
)
{
//找出所有职位
QueryWrapper
<
Position
>
objectQueryWrapper
=
new
QueryWrapper
<>();
objectQueryWrapper
.
select
(
"position_id"
,
"name"
);
List
<
Map
<
String
,
Object
>>
list
=
this
.
listMaps
(
objectQueryWrapper
);
//用户id为空,则直接返回
if
(
userId
==
null
)
{
}
else
{
//查询用户的职位id列表
List
<
UserPos
>
userPosList
=
this
.
userPosService
.
list
(
new
QueryWrapper
<
UserPos
>().
eq
(
"user_id"
,
userId
));
if
(
userPosList
!=
null
&&
userPosList
.
size
()
>
0
)
{
for
(
UserPos
userPos
:
userPosList
)
{
for
(
Map
<
String
,
Object
>
positionMap
:
list
)
{
if
(
userPos
.
getPosId
().
equals
(
positionMap
.
get
(
"position_id"
)))
{
positionMap
.
put
(
"selected"
,
true
);
}
}
}
}
}
LayuiPageInfo
layuiPageInfo
=
new
LayuiPageInfo
();
layuiPageInfo
.
setData
(
list
);
return
layuiPageInfo
;
}
private
Serializable
getKey
(
PositionParam
param
)
{
return
param
.
getPositionId
();
}
private
Page
getPageContext
()
{
return
LayuiPageFactory
.
defaultPage
();
}
private
Position
getOldEntity
(
PositionParam
param
)
{
return
this
.
getById
(
getKey
(
param
));
}
private
Position
getEntity
(
PositionParam
param
)
{
Position
entity
=
new
Position
();
ToolUtil
.
copyProperties
(
param
,
entity
);
return
entity
;
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/service/impl/UserPosServiceImpl.java
0 → 100755
View file @
2536a57c
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
service
.
impl
;
import
cn.stylefeng.guns.base.pojo.page.LayuiPageFactory
;
import
cn.stylefeng.guns.base.pojo.page.LayuiPageInfo
;
import
cn.stylefeng.guns.sys.modular.system.entity.UserPos
;
import
cn.stylefeng.guns.sys.modular.system.mapper.UserPosMapper
;
import
cn.stylefeng.guns.sys.modular.system.model.params.UserPosParam
;
import
cn.stylefeng.guns.sys.modular.system.model.result.UserPosResult
;
import
cn.stylefeng.guns.sys.modular.system.service.UserPosService
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* <p>
* 用户职位关联表 服务实现类
* </p>
*
* @author stylefeng
* @since 2019-06-28
*/
@Service
public
class
UserPosServiceImpl
extends
ServiceImpl
<
UserPosMapper
,
UserPos
>
implements
UserPosService
{
@Override
public
void
add
(
UserPosParam
param
){
UserPos
entity
=
getEntity
(
param
);
this
.
save
(
entity
);
}
@Override
public
void
delete
(
UserPosParam
param
){
this
.
removeById
(
getKey
(
param
));
}
@Override
public
void
update
(
UserPosParam
param
){
UserPos
oldEntity
=
getOldEntity
(
param
);
UserPos
newEntity
=
getEntity
(
param
);
ToolUtil
.
copyProperties
(
newEntity
,
oldEntity
);
this
.
updateById
(
newEntity
);
}
@Override
public
UserPosResult
findBySpec
(
UserPosParam
param
){
return
null
;
}
@Override
public
List
<
UserPosResult
>
findListBySpec
(
UserPosParam
param
){
return
null
;
}
@Override
public
LayuiPageInfo
findPageBySpec
(
UserPosParam
param
){
Page
pageContext
=
getPageContext
();
IPage
page
=
this
.
baseMapper
.
customPageList
(
pageContext
,
param
);
return
LayuiPageFactory
.
createPageInfo
(
page
);
}
private
Serializable
getKey
(
UserPosParam
param
){
return
param
.
getUserPosId
();
}
private
Page
getPageContext
()
{
return
LayuiPageFactory
.
defaultPage
();
}
private
UserPos
getOldEntity
(
UserPosParam
param
)
{
return
this
.
getById
(
getKey
(
param
));
}
private
UserPos
getEntity
(
UserPosParam
param
)
{
UserPos
entity
=
new
UserPos
();
ToolUtil
.
copyProperties
(
param
,
entity
);
return
entity
;
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/warpper/UserWrapper.java
View file @
2536a57c
...
...
@@ -54,6 +54,7 @@ public class UserWrapper extends BaseControllerWrapper {
map
.
put
(
"roleName"
,
ConstantFactory
.
me
().
getRoleName
((
String
)
map
.
get
(
"roleId"
)));
map
.
put
(
"deptName"
,
ConstantFactory
.
me
().
getDeptName
(
DecimalUtil
.
getLong
(
map
.
get
(
"deptId"
))));
map
.
put
(
"statusName"
,
ConstantFactory
.
me
().
getStatusName
((
String
)
map
.
get
(
"status"
)));
map
.
put
(
"positionName"
,
ConstantFactory
.
me
().
getPositionName
((
Long
)
map
.
get
(
"userId"
)));
}
}
guns-sys/src/main/webapp/assets/modular/system/dept/dept_add.js
View file @
2536a57c
...
...
@@ -15,9 +15,6 @@ layui.use(['layer', 'form', 'admin', 'ax'], function () {
var
admin
=
layui
.
admin
;
var
layer
=
layui
.
layer
;
// 让当前iframe弹层高度适应
admin
.
iframeAuto
();
// 点击上级角色时
$
(
'#pName'
).
click
(
function
()
{
var
formName
=
encodeURIComponent
(
"parent.DeptInfoDlg.data.pName"
);
...
...
guns-sys/src/main/webapp/assets/modular/system/dept/dept_edit.js
View file @
2536a57c
...
...
@@ -15,9 +15,6 @@ layui.use(['layer', 'form', 'admin', 'ax'], function () {
var
admin
=
layui
.
admin
;
var
layer
=
layui
.
layer
;
// 让当前iframe弹层高度适应
admin
.
iframeAuto
();
//获取部门信息
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/dept/detail/"
+
Feng
.
getUrlParam
(
"deptId"
));
var
result
=
ajax
.
start
();
...
...
guns-sys/src/main/webapp/assets/modular/system/menu/menu.js
View file @
2536a57c
...
...
@@ -181,13 +181,4 @@ layui.use(['layer', 'form', 'ztree', 'laydate', 'admin', 'ax', 'table', 'treetab
}
});
// 修改user状态
form
.
on
(
'switch(status)'
,
function
(
obj
)
{
var
userId
=
obj
.
elem
.
value
;
var
checked
=
obj
.
elem
.
checked
?
true
:
false
;
Menu
.
changeUserStatus
(
userId
,
checked
);
});
});
guns-sys/src/main/webapp/assets/modular/system/menu/menu_add.js
View file @
2536a57c
...
...
@@ -16,9 +16,6 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'ax'], function () {
var
laydate
=
layui
.
laydate
;
var
layer
=
layui
.
layer
;
// 让当前iframe弹层高度适应
admin
.
iframeAuto
();
// 点击父级菜单
$
(
'#pcodeName'
).
click
(
function
()
{
var
formName
=
encodeURIComponent
(
"parent.MenuInfoDlg.data.pcodeName"
);
...
...
guns-sys/src/main/webapp/assets/modular/system/menu/menu_edit.js
View file @
2536a57c
...
...
@@ -16,9 +16,6 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'ax'], function () {
var
laydate
=
layui
.
laydate
;
var
layer
=
layui
.
layer
;
// 让当前iframe弹层高度适应
admin
.
iframeAuto
();
//获取菜单信息
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/menu/getMenuInfo?menuId="
+
Feng
.
getUrlParam
(
"menuId"
));
var
result
=
ajax
.
start
();
...
...
guns-sys/src/main/webapp/assets/modular/system/notice/notice_add.js
View file @
2536a57c
...
...
@@ -5,9 +5,6 @@ layui.use(['layer', 'form', 'admin', 'ax'], function () {
var
admin
=
layui
.
admin
;
var
layer
=
layui
.
layer
;
// 让当前iframe弹层高度适应
admin
.
iframeAuto
();
// 表单提交事件
form
.
on
(
'submit(btnSubmit)'
,
function
(
data
)
{
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/notice/add"
,
function
(
data
)
{
...
...
guns-sys/src/main/webapp/assets/modular/system/notice/notice_edit.js
View file @
2536a57c
...
...
@@ -5,9 +5,6 @@ layui.use(['layer', 'form', 'admin', 'ax'], function () {
var
admin
=
layui
.
admin
;
var
layer
=
layui
.
layer
;
// 让当前iframe弹层高度适应
admin
.
iframeAuto
();
// 表单提交事件
form
.
on
(
'submit(btnSubmit)'
,
function
(
data
)
{
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/notice/update"
,
function
(
data
)
{
...
...
guns-sys/src/main/webapp/assets/modular/system/position/position.js
0 → 100644
View file @
2536a57c
layui
.
use
([
'table'
,
'admin'
,
'ax'
,
'form'
],
function
()
{
var
$
=
layui
.
$
;
var
table
=
layui
.
table
;
var
$ax
=
layui
.
ax
;
var
admin
=
layui
.
admin
;
var
form
=
layui
.
form
;
/**
* 职位表管理
*/
var
Position
=
{
tableId
:
"positionTable"
};
/**
* 初始化表格的列
*/
Position
.
initColumn
=
function
()
{
return
[[
{
type
:
'checkbox'
},
{
field
:
'positionId'
,
hide
:
true
,
title
:
'主键id'
},
{
field
:
'name'
,
sort
:
true
,
title
:
'职位名称'
},
{
field
:
'code'
,
sort
:
true
,
title
:
'职位编码'
},
{
field
:
'remark'
,
sort
:
true
,
title
:
'备注'
},
{
field
:
'createTime'
,
sort
:
true
,
title
:
'创建时间'
},
{
field
:
'updateTime'
,
sort
:
true
,
title
:
'更新时间'
},
{
field
:
'status'
,
sort
:
true
,
templet
:
'#statusTpl'
,
title
:
'状态'
},
{
align
:
'center'
,
toolbar
:
'#tableBar'
,
title
:
'操作'
}
]];
};
/**
* 点击查询按钮
*/
Position
.
search
=
function
()
{
var
queryData
=
{};
queryData
[
'condition'
]
=
$
(
"#condition"
).
val
();
table
.
reload
(
Position
.
tableId
,
{
where
:
queryData
,
page
:
{
curr
:
1
}
});
};
/**
* 弹出添加对话框
*/
Position
.
openAddDlg
=
function
()
{
window
.
location
.
href
=
Feng
.
ctxPath
+
'/position/add'
;
};
/**
* 导出excel按钮
*/
Position
.
exportExcel
=
function
()
{
var
checkRows
=
table
.
checkStatus
(
Position
.
tableId
);
if
(
checkRows
.
data
.
length
===
0
)
{
Feng
.
error
(
"请选择要导出的数据"
);
}
else
{
table
.
exportFile
(
tableResult
.
config
.
id
,
checkRows
.
data
,
'xls'
);
}
};
/**
* 点击编辑
*
* @param data 点击按钮时候的行数据
*/
Position
.
openEditDlg
=
function
(
data
)
{
window
.
location
.
href
=
Feng
.
ctxPath
+
'/position/edit?positionId='
+
data
.
positionId
;
};
/**
* 点击删除
*
* @param data 点击按钮时候的行数据
*/
Position
.
onDeleteItem
=
function
(
data
)
{
var
operation
=
function
()
{
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/position/delete"
,
function
(
data
)
{
Feng
.
success
(
"删除成功!"
);
table
.
reload
(
Position
.
tableId
);
},
function
(
data
)
{
Feng
.
error
(
"删除失败!"
+
data
.
responseJSON
.
message
+
"!"
);
});
ajax
.
set
(
"positionId"
,
data
.
positionId
);
ajax
.
start
();
};
Feng
.
confirm
(
"是否删除?"
,
operation
);
};
/**
* 修改职位状态
*/
Position
.
changeStatus
=
function
(
positionId
,
checked
)
{
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/position/changeStatus"
,
function
(
data
)
{
Feng
.
success
(
"修改成功!"
);
},
function
(
data
)
{
Feng
.
error
(
"修改成功!"
);
table
.
reload
(
Position
.
tableId
);
});
ajax
.
set
(
"positionId"
,
positionId
);
ajax
.
set
(
"status"
,
checked
);
ajax
.
start
();
};
// 渲染表格
var
tableResult
=
table
.
render
({
elem
:
'#'
+
Position
.
tableId
,
url
:
Feng
.
ctxPath
+
'/position/list'
,
page
:
true
,
height
:
"full-158"
,
cellMinWidth
:
100
,
cols
:
Position
.
initColumn
()
});
// 搜索按钮点击事件
$
(
'#btnSearch'
).
click
(
function
()
{
Position
.
search
();
});
// 添加按钮点击事件
$
(
'#btnAdd'
).
click
(
function
()
{
Position
.
openAddDlg
();
});
// 导出excel
$
(
'#btnExp'
).
click
(
function
()
{
Position
.
exportExcel
();
});
// 工具条点击事件
table
.
on
(
'tool('
+
Position
.
tableId
+
')'
,
function
(
obj
)
{
var
data
=
obj
.
data
;
var
layEvent
=
obj
.
event
;
if
(
layEvent
===
'edit'
)
{
Position
.
openEditDlg
(
data
);
}
else
if
(
layEvent
===
'delete'
)
{
Position
.
onDeleteItem
(
data
);
}
});
// 修改user状态
form
.
on
(
'switch(status)'
,
function
(
obj
)
{
var
positionId
=
obj
.
elem
.
value
;
var
checked
=
obj
.
elem
.
checked
?
true
:
false
;
Position
.
changeStatus
(
positionId
,
checked
);
});
});
guns-sys/src/main/webapp/assets/modular/system/position/position_add.js
0 → 100644
View file @
2536a57c
/**
* 添加或者修改页面
*/
var
PositionInfoDlg
=
{
data
:
{
name
:
""
,
code
:
""
,
sort
:
""
,
status
:
""
,
remark
:
""
,
createTime
:
""
,
updateUser
:
""
,
updateTime
:
""
,
createUser
:
""
}
};
layui
.
use
([
'form'
,
'admin'
,
'ax'
],
function
()
{
var
$
=
layui
.
jquery
;
var
$ax
=
layui
.
ax
;
var
form
=
layui
.
form
;
var
admin
=
layui
.
admin
;
//让当前iframe弹层高度适应
admin
.
iframeAuto
();
//表单提交事件
form
.
on
(
'submit(btnSubmit)'
,
function
(
data
)
{
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/position/addItem"
,
function
(
data
)
{
Feng
.
success
(
"添加成功!"
);
window
.
location
.
href
=
Feng
.
ctxPath
+
'/position'
},
function
(
data
)
{
Feng
.
error
(
"添加失败!"
+
data
.
responseJSON
.
message
)
});
ajax
.
set
(
data
.
field
);
ajax
.
start
();
return
false
;
});
//返回按钮
$
(
"#backupPage"
).
click
(
function
()
{
window
.
location
.
href
=
Feng
.
ctxPath
+
'/position'
});
});
\ No newline at end of file
guns-sys/src/main/webapp/assets/modular/system/position/position_edit.js
0 → 100644
View file @
2536a57c
/**
* 详情对话框
*/
var
PositionInfoDlg
=
{
data
:
{
name
:
""
,
code
:
""
,
sort
:
""
,
status
:
""
,
remark
:
""
,
createTime
:
""
,
updateUser
:
""
,
updateTime
:
""
,
createUser
:
""
}
};
layui
.
use
([
'form'
,
'admin'
,
'ax'
],
function
()
{
var
$
=
layui
.
jquery
;
var
$ax
=
layui
.
ax
;
var
form
=
layui
.
form
;
var
admin
=
layui
.
admin
;
//让当前iframe弹层高度适应
admin
.
iframeAuto
();
//获取详情信息,填充表单
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/position/detail?positionId="
+
Feng
.
getUrlParam
(
"positionId"
));
var
result
=
ajax
.
start
();
form
.
val
(
'positionForm'
,
result
.
data
);
//表单提交事件
form
.
on
(
'submit(btnSubmit)'
,
function
(
data
)
{
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/position/editItem"
,
function
(
data
)
{
Feng
.
success
(
"更新成功!"
);
window
.
location
.
href
=
Feng
.
ctxPath
+
'/position'
},
function
(
data
)
{
Feng
.
error
(
"更新失败!"
+
data
.
responseJSON
.
message
)
});
ajax
.
set
(
data
.
field
);
ajax
.
start
();
return
false
;
});
//返回按钮
$
(
"#backupPage"
).
click
(
function
()
{
window
.
location
.
href
=
Feng
.
ctxPath
+
'/position'
});
});
\ No newline at end of file
guns-sys/src/main/webapp/assets/modular/system/role/role_add.js
View file @
2536a57c
...
...
@@ -15,9 +15,6 @@ layui.use(['layer', 'form', 'admin', 'ax'], function () {
var
admin
=
layui
.
admin
;
var
layer
=
layui
.
layer
;
// 让当前iframe弹层高度适应
admin
.
iframeAuto
();
// 点击上级角色时
$
(
'#pName'
).
click
(
function
()
{
var
formName
=
encodeURIComponent
(
"parent.RoleInfoDlg.data.pName"
);
...
...
guns-sys/src/main/webapp/assets/modular/system/role/role_edit.js
View file @
2536a57c
...
...
@@ -15,9 +15,6 @@ layui.use(['layer', 'form', 'admin', 'ax'], function () {
var
admin
=
layui
.
admin
;
var
layer
=
layui
.
layer
;
// 让当前iframe弹层高度适应
admin
.
iframeAuto
();
//初始化角色的详情数据
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/role/view/"
+
Feng
.
getUrlParam
(
"roleId"
));
var
result
=
ajax
.
start
();
...
...
guns-sys/src/main/webapp/assets/modular/system/user/user.js
View file @
2536a57c
...
...
@@ -28,10 +28,8 @@ layui.use(['layer', 'form', 'table', 'ztree', 'laydate', 'admin', 'ax'], functio
{
field
:
'userId'
,
hide
:
true
,
sort
:
true
,
title
:
'用户id'
},
{
field
:
'account'
,
align
:
"center"
,
sort
:
true
,
title
:
'账号'
},
{
field
:
'name'
,
align
:
"center"
,
sort
:
true
,
title
:
'姓名'
},
{
field
:
'sexName'
,
align
:
"center"
,
sort
:
true
,
title
:
'性别'
},
{
field
:
'roleName'
,
align
:
"center"
,
sort
:
true
,
title
:
'角色'
},
{
field
:
'deptName'
,
align
:
"center"
,
sort
:
true
,
title
:
'部门'
},
{
field
:
'
email'
,
align
:
"center"
,
sort
:
true
,
title
:
'邮箱'
,
minWidth
:
122
},
{
field
:
'
positionName'
,
align
:
"center"
,
sort
:
true
,
title
:
'职位'
},
{
field
:
'phone'
,
align
:
"center"
,
sort
:
true
,
title
:
'电话'
,
minWidth
:
117
},
{
field
:
'createTime'
,
align
:
"center"
,
sort
:
true
,
title
:
'创建时间'
,
minWidth
:
160
},
{
field
:
'status'
,
align
:
"center"
,
sort
:
true
,
templet
:
'#statusTpl'
,
title
:
'状态'
},
...
...
guns-sys/src/main/webapp/assets/modular/system/user/user_add.js
View file @
2536a57c
...
...
@@ -8,16 +8,14 @@ var UserInfoDlg = {
}
};
layui
.
use
([
'layer'
,
'form'
,
'admin'
,
'laydate'
,
'ax'
],
function
()
{
layui
.
use
([
'layer'
,
'form'
,
'admin'
,
'laydate'
,
'ax'
,
'formSelects'
],
function
()
{
var
$
=
layui
.
jquery
;
var
$ax
=
layui
.
ax
;
var
form
=
layui
.
form
;
var
admin
=
layui
.
admin
;
var
laydate
=
layui
.
laydate
;
var
layer
=
layui
.
layer
;
// 让当前iframe弹层高度适应
admin
.
iframeAuto
();
var
formSelects
=
layui
.
formSelects
;
// 点击部门时
$
(
'#deptName'
).
click
(
function
()
{
...
...
@@ -73,4 +71,11 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'ax'], function () {
$
(
"#backupPage"
).
click
(
function
()
{
window
.
location
.
href
=
Feng
.
ctxPath
+
"/mgr"
;
});
//初始化所有的职位列表
formSelects
.
config
(
'selPosition'
,
{
searchUrl
:
Feng
.
ctxPath
+
"/position/listPositions"
,
keyName
:
'name'
,
keyVal
:
'position_id'
});
});
\ No newline at end of file
guns-sys/src/main/webapp/assets/modular/system/user/user_edit.js
View file @
2536a57c
...
...
@@ -8,16 +8,14 @@ var UserInfoDlg = {
}
};
layui
.
use
([
'layer'
,
'form'
,
'admin'
,
'laydate'
,
'ax'
],
function
()
{
layui
.
use
([
'layer'
,
'form'
,
'admin'
,
'laydate'
,
'ax'
,
'formSelects'
],
function
()
{
var
$
=
layui
.
jquery
;
var
$ax
=
layui
.
ax
;
var
form
=
layui
.
form
;
var
admin
=
layui
.
admin
;
var
laydate
=
layui
.
laydate
;
var
layer
=
layui
.
layer
;
// 让当前iframe弹层高度适应
admin
.
iframeAuto
();
var
formSelects
=
layui
.
formSelects
;
//获取用户信息
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/mgr/getUserInfo?userId="
+
Feng
.
getUrlParam
(
"userId"
));
...
...
@@ -79,4 +77,11 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'ax'], function () {
$
(
"#backupPage"
).
click
(
function
()
{
window
.
location
.
href
=
Feng
.
ctxPath
+
"/mgr"
;
});
//初始化所有的职位列表
formSelects
.
config
(
'selPosition'
,
{
searchUrl
:
Feng
.
ctxPath
+
"/position/listPositions?userId="
+
$
(
"#userId"
).
val
(),
keyName
:
'name'
,
keyVal
:
'position_id'
});
});
\ No newline at end of file
guns-sys/src/main/webapp/pages/modular/system/position/position.html
0 → 100644
View file @
2536a57c
@layout("/common/_container.html",{js:["/assets/modular/system/position/position.js"]}){
<div
class=
"layui-body-header"
>
<span
class=
"layui-body-header-title"
>
职位表管理
</span>
</div>
<div
class=
"layui-fluid"
>
<div
class=
"layui-row layui-col-space15"
>
<div
class=
"layui-col-sm12 layui-col-md12 layui-col-lg12"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
>
<div
class=
"layui-form toolbar"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<input
id=
"condition"
class=
"layui-input"
type=
"text"
placeholder=
"名称"
/>
</div>
<div
class=
"layui-inline"
>
<button
id=
"btnSearch"
class=
"layui-btn icon-btn"
><i
class=
"layui-icon"
>

</i>
搜索
</button>
<button
id=
"btnAdd"
class=
"layui-btn icon-btn"
><i
class=
"layui-icon"
>

</i>
添加
</button>
<button
id=
"btnExp"
class=
"layui-btn icon-btn"
><i
class=
"layui-icon"
>

</i>
导出
</button>
</div>
</div>
</div>
<table
class=
"layui-table"
id=
"positionTable"
lay-filter=
"positionTable"
></table>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/html"
id=
"tableBar"
>
<
a
class
=
"layui-btn layui-btn-primary layui-btn-xs"
lay
-
event
=
"edit"
>
修改
<
/a
>
<
a
class
=
"layui-btn layui-btn-danger layui-btn-xs"
lay
-
event
=
"delete"
>
删除
<
/a
>
</script>
<script
type=
"text/html"
id=
"statusTpl"
>
<
input
type
=
"checkbox"
lay
-
filter
=
"status"
value
=
"{{d.positionId}}"
lay
-
skin
=
"switch"
lay
-
text
=
"启用|禁用"
{{
d
.
status
==
'ENABLE'
?
'checked'
:
''
}}
/
>
</script>
@}
\ No newline at end of file
guns-sys/src/main/webapp/pages/modular/system/position/position_add.html
0 → 100644
View file @
2536a57c
@layout("/common/_container.html",{js:["/assets/modular/system/position/position_add.js"]}){
<div
class=
"layui-body-header"
>
<span
class=
"layui-body-header-title"
>
添加
</span>
</div>
<div
class=
"layui-fluid "
style=
""
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
>
<form
id=
"positionForm"
lay-filter=
"positionForm"
class=
"layui-form model-form"
style=
"max-width: 700px;margin: 40px auto;"
>
<input
name=
"positionId"
type=
"hidden"
/>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
职位名称
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
id=
"name"
name=
"name"
placeholder=
"请输入职位名称"
type=
"text"
class=
"layui-input"
lay-verify=
"required"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
职位编码
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
id=
"code"
name=
"code"
placeholder=
"请输入职位编码"
type=
"text"
class=
"layui-input"
lay-verify=
"required"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
顺序
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
id=
"sort"
name=
"sort"
placeholder=
"请输入顺序"
type=
"text"
class=
"layui-input"
lay-verify=
"required"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
备注
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
id=
"remark"
name=
"remark"
placeholder=
"请输入备注"
type=
"text"
class=
"layui-input"
lay-verify=
"required"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"layui-btn"
lay-filter=
"btnSubmit"
lay-submit
>
 
提交
 
</button>
<button
class=
"layui-btn layui-btn-primary"
type=
"button"
id=
"backupPage"
>
 
返回
 
</button>
</div>
</div>
</form>
</div>
</div>
</div>
@}
\ No newline at end of file
guns-sys/src/main/webapp/pages/modular/system/position/position_edit.html
0 → 100644
View file @
2536a57c
@layout("/common/_container.html",{js:["/assets/modular/system/position/position_edit.js"]}){
<div
class=
"layui-body-header"
>
<span
class=
"layui-body-header-title"
>
修改
</span>
</div>
<div
class=
"layui-fluid "
style=
""
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
>
<form
id=
"positionForm"
lay-filter=
"positionForm"
class=
"layui-form model-form"
style=
"max-width: 700px;margin: 40px auto;"
>
<input
name=
"positionId"
type=
"hidden"
/>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
职位名称
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
id=
"name"
name=
"name"
placeholder=
"请输入职位名称"
type=
"text"
class=
"layui-input"
lay-verify=
"required"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
职位编码
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
id=
"code"
name=
"code"
placeholder=
"请输入职位编码"
type=
"text"
class=
"layui-input"
lay-verify=
"required"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
顺序
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
id=
"sort"
name=
"sort"
placeholder=
"请输入顺序"
type=
"text"
class=
"layui-input"
lay-verify=
"required"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
备注
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
id=
"remark"
name=
"remark"
placeholder=
"请输入备注"
type=
"text"
class=
"layui-input"
lay-verify=
"required"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"layui-btn"
lay-filter=
"btnSubmit"
lay-submit
>
 
提交
 
</button>
<button
class=
"layui-btn layui-btn-primary"
type=
"button"
id=
"backupPage"
>
 
返回
 
</button>
</div>
</div>
</form>
</div>
</div>
</div>
@}
\ No newline at end of file
guns-sys/src/main/webapp/pages/modular/system/user/user_add.html
View file @
2536a57c
@layout("/common/_container.html",{js:["/assets/modular/system/user/user_add.js"]}){
@layout("/common/_container.html",{js:["/assets/modular/system/user/user_add.js"]
,css:["/assets/common/module/formSelects/formSelects-v4.css"]
}){
<div
class=
"layui-body-header"
>
<span
class=
"layui-body-header-title"
>
用户管理-添加
</span>
</div>
...
...
@@ -29,19 +29,19 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
密码
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
name=
"password"
placeholder=
"请输入密码"
type=
"password"
class=
"layui-input"
lay-verify=
"required|psw"
required
/>
<input
name=
"password"
placeholder=
"请输入密码"
type=
"password"
class=
"layui-input"
lay-verify=
"required|psw"
autocomplete=
"new-password"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
重复密码
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
name=
"rePassword"
placeholder=
"请输入重复密码"
type=
"password"
class=
"layui-input"
lay-verify=
"required|repsw"
required
/>
<input
name=
"rePassword"
placeholder=
"请输入重复密码"
type=
"password"
class=
"layui-input"
autocomplete=
"new-password"
lay-verify=
"required|repsw"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
邮箱
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<input
name=
"email"
placeholder=
"请输入邮箱"
type=
"text"
class=
"layui-input"
lay-verify=
"required|email"
required
/>
<input
name=
"email"
placeholder=
"请输入邮箱"
type=
"text"
class=
"layui-input"
lay-verify=
"required|email"
autocomplete=
"off"
required
/>
</div>
</div>
<div
class=
"layui-form-item"
>
...
...
@@ -59,6 +59,14 @@
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
职位
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<select
name=
"position"
xm-select=
"selPosition"
>
<option
value=
""
>
请选择职位
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
电话
</label>
<div
class=
"layui-input-block"
>
<input
name=
"phone"
placeholder=
"请输入电话"
type=
"text"
class=
"layui-input"
/>
...
...
guns-sys/src/main/webapp/pages/modular/system/user/user_edit.html
View file @
2536a57c
@layout("/common/_container.html",{js:["/assets/modular/system/user/user_edit.js"]}){
@layout("/common/_container.html",{js:["/assets/modular/system/user/user_edit.js"]
,css:["/assets/common/module/formSelects/formSelects-v4.css"]
}){
<div
class=
"layui-body-header"
>
<span
class=
"layui-body-header-title"
>
用户管理-修改
</span>
</div>
...
...
@@ -7,7 +7,7 @@
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
>
<form
id=
"userForm"
lay-filter=
"userForm"
class=
"layui-form model-form"
style=
"max-width: 700px;margin: 40px auto;"
>
<input
name=
"userId"
type=
"hidden"
/>
<input
id=
"userId"
name=
"userId"
type=
"hidden"
/>
<input
name=
"account"
type=
"hidden"
/>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
姓名
<span
style=
"color: red;"
>
*
</span></label>
...
...
@@ -42,6 +42,13 @@
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
职位
<span
style=
"color: red;"
>
*
</span></label>
<div
class=
"layui-input-block"
>
<select
name=
"position"
id=
"position"
xm-select=
"selPosition"
lay-verify=
"required"
required
>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
电话
</label>
<div
class=
"layui-input-block"
>
<input
name=
"phone"
placeholder=
"请输入电话"
type=
"text"
class=
"layui-input"
/>
...
...
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