Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cneeds-server
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangzr
cneeds-server
Commits
9c2372bb
Commit
9c2372bb
authored
Mar 16, 2020
by
zzrdark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.用户模块
parent
7d1b62ad
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
812 additions
and
89 deletions
+812
-89
workspace.xml
.idea/workspace.xml
+74
-64
cneeds_server.sql
cneeds-common-data/db/cneeds_server.sql
+27
-0
SysRoleDao.java
...ta/src/main/java/com/mx/cneeds/server/dao/SysRoleDao.java
+5
-1
SysUserDeptDao.java
...rc/main/java/com/mx/cneeds/server/dao/SysUserDeptDao.java
+20
-0
SysUserFuncDao.java
...rc/main/java/com/mx/cneeds/server/dao/SysUserFuncDao.java
+20
-0
SysUserDeptEntity.java
...n/java/com/mx/cneeds/server/entity/SysUserDeptEntity.java
+36
-0
SysUserFuncEntity.java
...n/java/com/mx/cneeds/server/entity/SysUserFuncEntity.java
+36
-0
SysRoleDao.xml
cneeds-common-data/src/main/resources/mapper/SysRoleDao.xml
+9
-0
SysUserDeptDao.xml
...-common-data/src/main/resources/mapper/SysUserDeptDao.xml
+23
-0
SysUserFuncDao.xml
...-common-data/src/main/resources/mapper/SysUserFuncDao.xml
+20
-0
UserDto.java
...-pojo/src/main/java/com/mx/cneeds/common/dto/UserDto.java
+8
-0
SystemController.java
...x/cneeds/server/datashow/web/system/SystemController.java
+56
-2
SysRoleService.java
...ava/com/mx/cneeds/server/user/service/SysRoleService.java
+7
-0
SysUserDeptService.java
...com/mx/cneeds/server/user/service/SysUserDeptService.java
+26
-0
SysUserFuncService.java
...com/mx/cneeds/server/user/service/SysUserFuncService.java
+26
-0
SysUserRoleService.java
...com/mx/cneeds/server/user/service/SysUserRoleService.java
+2
-0
SysUserService.java
...ava/com/mx/cneeds/server/user/service/SysUserService.java
+8
-0
SysRoleServiceImpl.java
...x/cneeds/server/user/service/impl/SysRoleServiceImpl.java
+19
-0
SysUserDeptServiceImpl.java
...eeds/server/user/service/impl/SysUserDeptServiceImpl.java
+58
-0
SysUserFuncServiceImpl.java
...eeds/server/user/service/impl/SysUserFuncServiceImpl.java
+59
-0
SysUserRoleServiceImpl.java
...eeds/server/user/service/impl/SysUserRoleServiceImpl.java
+16
-0
SysUserServiceImpl.java
...x/cneeds/server/user/service/impl/SysUserServiceImpl.java
+60
-1
SysRoleController.java
...java/com/mx/cneeds/server/user/web/SysRoleController.java
+18
-4
SysUserController.java
...java/com/mx/cneeds/server/user/web/SysUserController.java
+12
-17
SysUserDeptController.java
.../com/mx/cneeds/server/user/web/SysUserDeptController.java
+83
-0
SysUserFuncController.java
.../com/mx/cneeds/server/user/web/SysUserFuncController.java
+84
-0
No files found.
.idea/workspace.xml
View file @
9c2372bb
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"58efcb75-622d-40c1-b8e0-10cd2fb456b4"
name=
"Default Changelist"
comment=
"1.部门模块 2.角色模块部分"
>
<list
default=
"true"
id=
"58efcb75-622d-40c1-b8e0-10cd2fb456b4"
name=
"Default Changelist"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/vo/RoleVo.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysUserDeptDao.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysUserFuncDao.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/entity/SysUserDeptEntity.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/entity/SysUserFuncEntity.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/resources/mapper/SysUserDeptDao.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/resources/mapper/SysUserFuncDao.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserDeptService.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserFuncService.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserDeptServiceImpl.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserFuncServiceImpl.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysUserDeptController.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysUserFuncController.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/db/cneeds_server.sql"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/db/cneeds_server.sql"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/db/cneeds_server.sql"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/db/cneeds_server.sql"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysRoleDeptDao.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysRoleDeptDao.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysRoleDao.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysRoleDao.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysRoleFuncDao.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysRoleFuncDao.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/src/main/resources/mapper/SysRoleDao.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/resources/mapper/SysRoleDao.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysUserRoleDao.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysUserRoleDao.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/UserDto.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/UserDto.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/entity/SysRoleEntity.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/entity/SysRoleEntity.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/src/main/resources/mapper/SysRoleDeptDao.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/resources/mapper/SysRoleDeptDao.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/src/main/resources/mapper/SysRoleFuncDao.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/resources/mapper/SysRoleFuncDao.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-data/src/main/resources/mapper/SysUserRoleDao.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-data/src/main/resources/mapper/SysUserRoleDao.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/RoleDto.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/RoleDto.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/client/UserClient.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/client/UserClient.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/system/SystemController.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/system/SystemController.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/system/SystemController.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/system/SystemController.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysDeptService.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysDeptService.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysRoleDeptService.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysRoleDeptService.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysRoleFuncService.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysRoleFuncService.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysRoleService.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysRoleService.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysRoleService.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysRoleService.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserRoleService.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserRoleService.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserRoleService.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserRoleService.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysDeptServiceImpl.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysDeptServiceImpl.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserService.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserService.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysRoleDeptServiceImpl.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysRoleDeptServiceImpl.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysRoleFuncServiceImpl.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysRoleFuncServiceImpl.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysRoleServiceImpl.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysRoleServiceImpl.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysRoleServiceImpl.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysRoleServiceImpl.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserRoleServiceImpl.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserRoleServiceImpl.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserRoleServiceImpl.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserRoleServiceImpl.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserServiceImpl.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserServiceImpl.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysRoleController.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysRoleController.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysRoleController.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysRoleController.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/
resources/application-dev.yml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/resources/application-dev.yml
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/cneeds-server-user/src/main/
java/com/mx/cneeds/server/user/web/SysUserController.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysUserController.java
"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
@@ -100,7 +101,7 @@
...
@@ -100,7 +101,7 @@
<property
name=
"SHARE_PROJECT_CONFIGURATION_FILES"
value=
"true"
/>
<property
name=
"SHARE_PROJECT_CONFIGURATION_FILES"
value=
"true"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"aspect.path.notification.shown"
value=
"true"
/>
<property
name=
"aspect.path.notification.shown"
value=
"true"
/>
<property
name=
"last_opened_file_path"
value=
"
E:/project/IdeaProjects/segmentfault-lessons
"
/>
<property
name=
"last_opened_file_path"
value=
"
$PROJECT_DIR$/cneeds-common-data/src/main/java/com/mx/cneeds/server/entity
"
/>
<property
name=
"nodejs_interpreter_path.stuck_in_default_project"
value=
"undefined stuck path"
/>
<property
name=
"nodejs_interpreter_path.stuck_in_default_project"
value=
"undefined stuck path"
/>
<property
name=
"nodejs_npm_path_reset_for_default_project"
value=
"true"
/>
<property
name=
"nodejs_npm_path_reset_for_default_project"
value=
"true"
/>
<property
name=
"project.structure.last.edited"
value=
"Modules"
/>
<property
name=
"project.structure.last.edited"
value=
"Modules"
/>
...
@@ -111,11 +112,12 @@
...
@@ -111,11 +112,12 @@
<property
name=
"settings.editor.splitter.proportion"
value=
"0.20898877"
/>
<property
name=
"settings.editor.splitter.proportion"
value=
"0.20898877"
/>
</component>
</component>
<component
name=
"RecentsManager"
>
<component
name=
"RecentsManager"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
<key
name=
"CopyFile.RECENT_KEYS"
>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-server-datashow\src\main\java\com\mx\cneeds"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-common-data\src\main\java\com\mx\cneeds\server\entity"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-server-datashow\src\main\resources"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-common-data\src\main\resources\mapper"
/>
<recent
name=
"E:\mx_project\cneeds-server"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-common-data\src\main\java\com\mx\cneeds\server\dao"
/>
<recent
name=
"E:\mx_project\cneeds-server\src"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-server-user\src\main\java\com\mx\cneeds\server\user\service\impl"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-server-user\src\main\java\com\mx\cneeds\server\user\service"
/>
</key>
</key>
<key
name=
"CopyClassDialog.RECENTS_KEY"
>
<key
name=
"CopyClassDialog.RECENTS_KEY"
>
<recent
name=
"com.mx.cneeds.common.vo"
/>
<recent
name=
"com.mx.cneeds.common.vo"
/>
...
@@ -124,12 +126,11 @@
...
@@ -124,12 +126,11 @@
<recent
name=
"com.mx.cneeds.server.datashow.web.system"
/>
<recent
name=
"com.mx.cneeds.server.datashow.web.system"
/>
<recent
name=
"com.mx.cneeds.common.dto"
/>
<recent
name=
"com.mx.cneeds.common.dto"
/>
</key>
</key>
<key
name=
"CopyFile.RECENT_KEYS"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-server-datashow\src\main\java\com\mx\cneeds\server\datashow"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-server-datashow\src\main\java\com\mx\cneeds"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-server-user\src\main\java\com\mx\cneeds\server\user\service"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-server-datashow\src\main\resources"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-server-device\src\main\java\com\mx\cneeds\server\device\service"
/>
<recent
name=
"E:\mx_project\cneeds-server"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-common-pojo\src\main\java"
/>
<recent
name=
"E:\mx_project\cneeds-server\src"
/>
<recent
name=
"E:\mx_project\cneeds-server\cneeds-server-datashow"
/>
</key>
</key>
</component>
</component>
<component
name=
"RunManager"
selected=
"Spring Boot.DatashowApplication"
>
<component
name=
"RunManager"
selected=
"Spring Boot.DatashowApplication"
>
...
@@ -293,7 +294,8 @@
...
@@ -293,7 +294,8 @@
<workItem
from=
"1583807454250"
duration=
"27147000"
/>
<workItem
from=
"1583807454250"
duration=
"27147000"
/>
<workItem
from=
"1583893504296"
duration=
"26375000"
/>
<workItem
from=
"1583893504296"
duration=
"26375000"
/>
<workItem
from=
"1583980091332"
duration=
"17880000"
/>
<workItem
from=
"1583980091332"
duration=
"17880000"
/>
<workItem
from=
"1584066161394"
duration=
"18177000"
/>
<workItem
from=
"1584066161394"
duration=
"18287000"
/>
<workItem
from=
"1584325001929"
duration=
"17951000"
/>
</task>
</task>
<task
id=
"LOCAL-00001"
summary=
"1.修改不需要web服务 2.增加一个logupload"
>
<task
id=
"LOCAL-00001"
summary=
"1.修改不需要web服务 2.增加一个logupload"
>
<created>
1578451117064
</created>
<created>
1578451117064
</created>
...
@@ -372,7 +374,14 @@
...
@@ -372,7 +374,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1584011537931
</updated>
<updated>
1584011537931
</updated>
</task>
</task>
<option
name=
"localTasksCounter"
value=
"12"
/>
<task
id=
"LOCAL-00012"
summary=
"2.角色模块增删改查"
>
<created>
1584096669506
</created>
<option
name=
"number"
value=
"00012"
/>
<option
name=
"presentableId"
value=
"LOCAL-00012"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1584096669506
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"13"
/>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
@@ -404,7 +413,8 @@
...
@@ -404,7 +413,8 @@
<MESSAGE
value=
"1.增加dto 2.系统管理4个模块的查询 3.系统模块add功能 4.增加mysql注释"
/>
<MESSAGE
value=
"1.增加dto 2.系统管理4个模块的查询 3.系统模块add功能 4.增加mysql注释"
/>
<MESSAGE
value=
"1.增加登陆,等"
/>
<MESSAGE
value=
"1.增加登陆,等"
/>
<MESSAGE
value=
"1.部门模块 2.角色模块部分"
/>
<MESSAGE
value=
"1.部门模块 2.角色模块部分"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"1.部门模块 2.角色模块部分"
/>
<MESSAGE
value=
"2.角色模块增删改查"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"2.角色模块增删改查"
/>
</component>
</component>
<component
name=
"WindowStateProjectService"
>
<component
name=
"WindowStateProjectService"
>
<state
x=
"552"
y=
"178"
key=
"#Project_Structure"
timestamp=
"1583920392109"
>
<state
x=
"552"
y=
"178"
key=
"#Project_Structure"
timestamp=
"1583920392109"
>
...
@@ -435,62 +445,62 @@
...
@@ -435,62 +445,62 @@
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
x=
"703"
y=
"356"
key=
"ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1583822701848"
/>
<state
x=
"703"
y=
"356"
key=
"ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1583822701848"
/>
<state
x=
"463"
y=
"112"
key=
"CommitChangelistDialog2"
timestamp=
"15840
69254530
"
>
<state
x=
"463"
y=
"112"
key=
"CommitChangelistDialog2"
timestamp=
"15840
96665796
"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
x=
"463"
y=
"112"
key=
"CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040"
timestamp=
"15840
69254530
"
/>
<state
x=
"463"
y=
"112"
key=
"CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040"
timestamp=
"15840
96665796
"
/>
<state
x=
"740"
y=
"275"
key=
"FileChooserDialogImpl"
timestamp=
"1583991202144"
>
<state
x=
"740"
y=
"275"
key=
"FileChooserDialogImpl"
timestamp=
"1583991202144"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
x=
"740"
y=
"275"
key=
"FileChooserDialogImpl/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1583991202144"
/>
<state
x=
"740"
y=
"275"
key=
"FileChooserDialogImpl/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1583991202144"
/>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1584096
62683
0"
>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1584096
72069
0"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096
62683
0"
/>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096
72069
0"
/>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.center"
timestamp=
"1584096
62683
0"
>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.center"
timestamp=
"1584096
72069
0"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096
62683
0"
/>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096
72069
0"
/>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.left"
timestamp=
"1584096
62683
0"
>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.left"
timestamp=
"1584096
72069
0"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096
62683
0"
/>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096
72069
0"
/>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.right"
timestamp=
"1584096
62683
0"
>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.right"
timestamp=
"1584096
72069
0"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096
62683
0"
/>
<state
width=
"1877"
height=
"327"
key=
"GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096
72069
0"
/>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.1.bottom"
timestamp=
"1584096619672
"
>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.1.bottom"
timestamp=
"1584096720686
"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096619672
"
/>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096720686
"
/>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.1.center"
timestamp=
"1584096619672
"
>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.1.center"
timestamp=
"1584096720686
"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096619672
"
/>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096720686
"
/>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.1.left"
timestamp=
"1584096619672
"
>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.1.left"
timestamp=
"1584096720686
"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096619672
"
/>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096720686
"
/>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.1.right"
timestamp=
"1584096619672
"
>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.1.right"
timestamp=
"1584096720686
"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096619672
"
/>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096720686
"
/>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.2.bottom"
timestamp=
"1584096619672
"
>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.2.bottom"
timestamp=
"1584096720686
"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.2.bottom/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096619672
"
/>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.2.bottom/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096720686
"
/>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.2.center"
timestamp=
"1584096619672
"
>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.2.center"
timestamp=
"1584096720686
"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.2.center/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096619672
"
/>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.2.center/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096720686
"
/>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.2.left"
timestamp=
"1584096619672
"
>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.2.left"
timestamp=
"1584096720686
"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.2.left/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096619672
"
/>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.2.left/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096720686
"
/>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.2.right"
timestamp=
"1584096619672
"
>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.2.right"
timestamp=
"1584096720686
"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
width=
"1877"
height=
"
216"
key=
"GridCell.Tab.2.right/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096619672
"
/>
<state
width=
"1877"
height=
"
471"
key=
"GridCell.Tab.2.right/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584096720686
"
/>
<state
x=
"490"
y=
"175"
key=
"Maven.ArtifactSearchDialog"
timestamp=
"1583320014926"
>
<state
x=
"490"
y=
"175"
key=
"Maven.ArtifactSearchDialog"
timestamp=
"1583320014926"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
...
@@ -503,10 +513,10 @@
...
@@ -503,10 +513,10 @@
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
x=
"438"
y=
"166"
width=
"1352"
height=
"708"
key=
"SettingsEditor/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1583725437328"
/>
<state
x=
"438"
y=
"166"
width=
"1352"
height=
"708"
key=
"SettingsEditor/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1583725437328"
/>
<state
x=
"552"
y=
"253"
key=
"Vcs.Push.Dialog.v2"
timestamp=
"15840
1153952
3"
>
<state
x=
"552"
y=
"253"
key=
"Vcs.Push.Dialog.v2"
timestamp=
"15840
9667144
3"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
x=
"552"
y=
"253"
key=
"Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040"
timestamp=
"15840
1153952
3"
/>
<state
x=
"552"
y=
"253"
key=
"Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040"
timestamp=
"15840
9667144
3"
/>
<state
x=
"752"
y=
"437"
key=
"com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2"
timestamp=
"1583724603426"
>
<state
x=
"752"
y=
"437"
key=
"com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2"
timestamp=
"1583724603426"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
...
@@ -523,10 +533,10 @@
...
@@ -523,10 +533,10 @@
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
x=
"511"
y=
"210"
key=
"new project wizard/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1583318693876"
/>
<state
x=
"511"
y=
"210"
key=
"new project wizard/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1583318693876"
/>
<state
x=
"616"
y=
"173"
width=
"672"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"1584
085955206
"
>
<state
x=
"616"
y=
"173"
width=
"672"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"1584
354253442
"
>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
<screen
x=
"0"
y=
"0"
width=
"1920"
height=
"1040"
/>
</state>
</state>
<state
x=
"616"
y=
"173"
width=
"672"
height=
"676"
key=
"search.everywhere.popup/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584
085955206
"
/>
<state
x=
"616"
y=
"173"
width=
"672"
height=
"676"
key=
"search.everywhere.popup/0.0.1920.1040@0.0.1920.1040"
timestamp=
"1584
354253442
"
/>
</component>
</component>
<component
name=
"XDebuggerManager"
>
<component
name=
"XDebuggerManager"
>
<breakpoint-manager>
<breakpoint-manager>
...
@@ -543,7 +553,7 @@
...
@@ -543,7 +553,7 @@
</line-breakpoint>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
type=
"java-line"
>
<line-breakpoint
enabled=
"true"
type=
"java-line"
>
<url>
file://$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/system/SystemController.java
</url>
<url>
file://$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/system/SystemController.java
</url>
<line>
2
37
</line>
<line>
2
93
</line>
<option
name=
"timeStamp"
value=
"27"
/>
<option
name=
"timeStamp"
value=
"27"
/>
</line-breakpoint>
</line-breakpoint>
</breakpoints>
</breakpoints>
...
...
cneeds-common-data/db/cneeds_server.sql
View file @
9c2372bb
...
@@ -245,3 +245,30 @@ CREATE TABLE `sys_user_role` (
...
@@ -245,3 +245,30 @@ CREATE TABLE `sys_user_role` (
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'角色用户映射表'
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'角色用户映射表'
ROW_FORMAT
=
Dynamic
;
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
-- ----------------------------
-- Table structure for sys_user_dept
-- 系统 - 用户部门关系表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`sys_user_dept`
;
CREATE
TABLE
`sys_user_dept`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`user_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'用户id'
,
`dept_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'部门id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
466
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'部门与角色映射表'
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Table structure for sys_user_func
-- 系统 - 用户功能关系表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`sys_user_func`
;
CREATE
TABLE
`sys_user_func`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`user_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'用户Id'
,
`func_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'功能Id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
489
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'功能与角色映射表'
ROW_FORMAT
=
Dynamic
;
cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysRoleDao.java
View file @
9c2372bb
...
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.mx.cneeds.server.entity.SysRoleEntity
;
import
com.mx.cneeds.server.entity.SysRoleEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 角色表
* 角色表
*
*
...
@@ -13,5 +16,6 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -13,5 +16,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
SysRoleDao
extends
BaseMapper
<
SysRoleEntity
>
{
public
interface
SysRoleDao
extends
BaseMapper
<
SysRoleEntity
>
{
List
<
SysRoleEntity
>
queryList
(
Map
<
String
,
Object
>
params
);
}
}
cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysUserDeptDao.java
0 → 100644
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.mx.cneeds.server.entity.SysUserDeptEntity
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 部门与角色映射表
*
* @author Mark
* @email sunlightcs@gmail.com
* @date 2020-03-16 11:22:10
*/
@Mapper
public
interface
SysUserDeptDao
extends
BaseMapper
<
SysUserDeptEntity
>
{
/**
* 根据角色ID数组,批量删除
*/
int
deleteBatch
(
Long
[]
roleIds
);
}
cneeds-common-data/src/main/java/com/mx/cneeds/server/dao/SysUserFuncDao.java
0 → 100644
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.mx.cneeds.server.entity.SysUserFuncEntity
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 功能与角色映射表
*
* @author Mark
* @email sunlightcs@gmail.com
* @date 2020-03-16 11:22:10
*/
@Mapper
public
interface
SysUserFuncDao
extends
BaseMapper
<
SysUserFuncEntity
>
{
/**
* 根据角色ID数组,批量删除
*/
int
deleteBatch
(
Long
[]
roleIds
);
}
cneeds-common-data/src/main/java/com/mx/cneeds/server/entity/SysUserDeptEntity.java
0 → 100644
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 部门与角色映射表
*
* @author Mark
* @email sunlightcs@gmail.com
* @date 2020-03-16 11:22:10
*/
@Data
@TableName
(
"sys_user_dept"
)
public
class
SysUserDeptEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
private
Long
id
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 部门id
*/
private
Long
deptId
;
}
cneeds-common-data/src/main/java/com/mx/cneeds/server/entity/SysUserFuncEntity.java
0 → 100644
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 功能与角色映射表
*
* @author Mark
* @email sunlightcs@gmail.com
* @date 2020-03-16 11:22:10
*/
@Data
@TableName
(
"sys_user_func"
)
public
class
SysUserFuncEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
private
Long
id
;
/**
* 用户Id
*/
private
Long
userId
;
/**
* 功能Id
*/
private
Long
funcId
;
}
cneeds-common-data/src/main/resources/mapper/SysRoleDao.xml
View file @
9c2372bb
...
@@ -13,4 +13,12 @@
...
@@ -13,4 +13,12 @@
</resultMap>
</resultMap>
<select
id=
"queryList"
resultType=
"com.mx.cneeds.server.entity.SysRoleEntity"
>
select t1.* from sys_role t1 where
1 = 1
<if
test=
"sql_filter != null"
>
and ${sql_filter}
</if>
</select>
</mapper>
</mapper>
\ No newline at end of file
cneeds-common-data/src/main/resources/mapper/SysUserDeptDao.xml
0 → 100644
View file @
9c2372bb
<?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=
"com.mx.cneeds.server.dao.SysUserDeptDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"com.mx.cneeds.server.entity.SysUserDeptEntity"
id=
"sysUserDeptMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
</resultMap>
<delete
id=
"deleteBatch"
>
delete from sys_user_dept where user_id in
<foreach
item=
"userId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{userId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
cneeds-common-data/src/main/resources/mapper/SysUserFuncDao.xml
0 → 100644
View file @
9c2372bb
<?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=
"com.mx.cneeds.server.dao.SysUserFuncDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"com.mx.cneeds.server.entity.SysUserFuncEntity"
id=
"sysUserFuncMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"funcId"
column=
"func_id"
/>
</resultMap>
<delete
id=
"deleteBatch"
>
delete from sys_user_func where user_id in
<foreach
item=
"userId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{userId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/UserDto.java
View file @
9c2372bb
...
@@ -4,6 +4,7 @@ import lombok.Data;
...
@@ -4,6 +4,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @ClassName UserDto
* @ClassName UserDto
...
@@ -45,4 +46,11 @@ public class UserDto implements Serializable {
...
@@ -45,4 +46,11 @@ public class UserDto implements Serializable {
* 部门id
* 部门id
*/
*/
private
Long
deptId
;
private
Long
deptId
;
private
List
<
Long
>
funcIdList
;
private
List
<
Long
>
deptIdList
;
private
Long
roleId
;
}
}
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/system/SystemController.java
View file @
9c2372bb
...
@@ -65,6 +65,10 @@ public class SystemController {
...
@@ -65,6 +65,10 @@ public class SystemController {
return
new
R
().
put
(
"data"
,
pageDto
);
return
new
R
().
put
(
"data"
,
pageDto
);
}
}
/**
* 查询出角色关联的模块
* @return
*/
@PostMapping
(
"/func/listAll"
)
@PostMapping
(
"/func/listAll"
)
public
R
selectTreeFunc
(){
public
R
selectTreeFunc
(){
List
<
FuncDto
>
dtos
=
userClient
.
funcListAll
();
List
<
FuncDto
>
dtos
=
userClient
.
funcListAll
();
...
@@ -86,6 +90,32 @@ public class SystemController {
...
@@ -86,6 +90,32 @@ public class SystemController {
return
new
R
().
put
(
"data"
,
result
);
return
new
R
().
put
(
"data"
,
result
);
}
}
/**
* 查询出用户关联的模块
* @return
*/
@PostMapping
(
"/func/user/listAll"
)
public
R
selectTreeFuncUser
(){
List
<
FuncDto
>
dtos
=
userClient
.
funcListAll
();
List
<
TreeVo
>
rootList
=
new
ArrayList
<>();
List
<
TreeVo
>
bodyList
=
new
ArrayList
<>();
dtos
.
forEach
(
dto
->
{
TreeVo
vo
=
new
TreeVo
(
dto
.
getFuncId
(),
dto
.
getName
(),
dto
.
getParentId
());
if
(
dto
.
getParentId
()
==
0L
){
rootList
.
add
(
vo
);
}
else
{
bodyList
.
add
(
vo
);
}
});
TreeToolUtils
utils
=
new
TreeToolUtils
(
rootList
,
bodyList
);
List
<
TreeVo
>
result
=
utils
.
getTree
();
return
new
R
().
put
(
"data"
,
result
);
}
@PostMapping
(
"/dept/list"
)
@PostMapping
(
"/dept/list"
)
public
R
deptList
(
@RequestParam
(
required
=
false
)
Integer
page
,
public
R
deptList
(
@RequestParam
(
required
=
false
)
Integer
page
,
@RequestParam
(
required
=
false
)
Integer
pageSize
,
@RequestParam
(
required
=
false
)
Integer
pageSize
,
...
@@ -199,6 +229,32 @@ public class SystemController {
...
@@ -199,6 +229,32 @@ public class SystemController {
return
new
R
().
put
(
"data"
,
result
);
return
new
R
().
put
(
"data"
,
result
);
}
}
@PostMapping
(
"/dept/user/listAllTree"
)
public
R
selectTreeDeptUserParent
(){
UserDto
userDto
=
userClient
.
userInfo
(
UserUtils
.
getUserName
());
List
<
DepartmentDto
>
dtos
=
userClient
.
deptListAll
();
List
<
TreeVo
>
rootList
=
new
ArrayList
<>();
List
<
TreeVo
>
bodyList
=
new
ArrayList
<>();
dtos
.
forEach
(
dto
->
{
TreeVo
vo
=
new
TreeVo
(
dto
.
getDeptId
(),
dto
.
getName
(),
dto
.
getParentId
());
if
(
dto
.
getParentId
()==
null
){
rootList
.
add
(
vo
);
}
else
if
(
rootList
.
size
()
==
0
&&
dto
.
getParentId
().
equals
(
userDto
.
getDeptId
())){
rootList
.
add
(
vo
);
}
else
{
bodyList
.
add
(
vo
);
}
});
TreeToolUtils
utils
=
new
TreeToolUtils
(
rootList
,
bodyList
);
List
<
TreeVo
>
result
=
utils
.
getTree
();
return
new
R
().
put
(
"data"
,
result
);
}
@PostMapping
(
"/role/list"
)
@PostMapping
(
"/role/list"
)
public
R
roleList
(
@RequestParam
(
required
=
false
)
Integer
page
,
public
R
roleList
(
@RequestParam
(
required
=
false
)
Integer
page
,
@RequestParam
(
required
=
false
)
Integer
pageSize
,
@RequestParam
(
required
=
false
)
Integer
pageSize
,
...
@@ -253,7 +309,6 @@ public class SystemController {
...
@@ -253,7 +309,6 @@ public class SystemController {
BeanUtils
.
copyProperties
(
vo
,
dto
);
BeanUtils
.
copyProperties
(
vo
,
dto
);
userClient
.
updateRole
(
dto
);
userClient
.
updateRole
(
dto
);
return
R
.
ok
();
return
R
.
ok
();
}
}
@PostMapping
(
"/role/delete"
)
@PostMapping
(
"/role/delete"
)
...
@@ -288,7 +343,6 @@ public class SystemController {
...
@@ -288,7 +343,6 @@ public class SystemController {
orderField
=
RequestParamterConverter
.
toLine
(
orderField
);
orderField
=
RequestParamterConverter
.
toLine
(
orderField
);
}
}
PageDto
pageDto
=
userClient
.
userList
(
page
,
pageSize
,
orderField
,
order
);
PageDto
pageDto
=
userClient
.
userList
(
page
,
pageSize
,
orderField
,
order
);
return
new
R
().
put
(
"data"
,
pageDto
);
return
new
R
().
put
(
"data"
,
pageDto
);
...
...
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysRoleService.java
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
user
.
service
;
package
com
.
mx
.
cneeds
.
server
.
user
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.mx.cneeds.common.annotation.DataFilter
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.server.entity.SysRoleEntity
;
import
com.mx.cneeds.server.entity.SysRoleEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -19,8 +20,14 @@ public interface SysRoleService extends IService<SysRoleEntity> {
...
@@ -19,8 +20,14 @@ public interface SysRoleService extends IService<SysRoleEntity> {
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
@DataFilter
(
subDept
=
true
,
user
=
false
,
tableAlias
=
"t1"
)
List
<
SysRoleEntity
>
queryList
(
Map
<
String
,
Object
>
params
);
void
saveRole
(
SysRoleEntity
role
,
List
<
Long
>
funcIdList
,
List
<
Long
>
deptIdList
);
void
saveRole
(
SysRoleEntity
role
,
List
<
Long
>
funcIdList
,
List
<
Long
>
deptIdList
);
@Transactional
(
rollbackFor
=
Exception
.
class
)
void
update
(
SysRoleEntity
role
,
List
<
Long
>
funcIdList
,
List
<
Long
>
deptIdList
);
void
deleteBatch
(
Long
[]
roleIds
);
void
deleteBatch
(
Long
[]
roleIds
);
}
}
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserDeptService.java
0 → 100644
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
user
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.server.entity.SysUserDeptEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Map
;
/**
* 部门与角色映射表
*
* @author Mark
* @email sunlightcs@gmail.com
* @date 2020-03-16 11:22:10
*/
public
interface
SysUserDeptService
extends
IService
<
SysUserDeptEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
int
deleteBatch
(
Long
[]
userIds
);
void
saveOrUpdate
(
Long
userId
,
List
<
Long
>
deptIdList
);
}
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserFuncService.java
0 → 100644
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
user
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.server.entity.SysUserFuncEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Map
;
/**
* 功能与角色映射表
*
* @author Mark
* @email sunlightcs@gmail.com
* @date 2020-03-16 11:22:10
*/
public
interface
SysUserFuncService
extends
IService
<
SysUserFuncEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
int
deleteBatch
(
Long
[]
userIds
);
void
saveOrUpdate
(
Long
userId
,
List
<
Long
>
menuIdList
);
}
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserRoleService.java
View file @
9c2372bb
...
@@ -25,5 +25,7 @@ public interface SysUserRoleService extends IService<SysUserRoleEntity> {
...
@@ -25,5 +25,7 @@ public interface SysUserRoleService extends IService<SysUserRoleEntity> {
List
<
Long
>
queryRoleIdList
(
Long
userId
);
List
<
Long
>
queryRoleIdList
(
Long
userId
);
int
deleteBatch
(
Long
[]
roleIds
);
int
deleteBatch
(
Long
[]
roleIds
);
void
saveOrUpdate
(
Long
userId
,
Long
roleId
);
}
}
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/SysUserService.java
View file @
9c2372bb
...
@@ -3,7 +3,9 @@ package com.mx.cneeds.server.user.service;
...
@@ -3,7 +3,9 @@ package com.mx.cneeds.server.user.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.server.entity.SysUserEntity
;
import
com.mx.cneeds.server.entity.SysUserEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -18,5 +20,11 @@ public interface SysUserService extends IService<SysUserEntity> {
...
@@ -18,5 +20,11 @@ public interface SysUserService extends IService<SysUserEntity> {
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
SysUserEntity
queryUserByUsername
(
String
username
);
SysUserEntity
queryUserByUsername
(
String
username
);
void
deleteBatch
(
Long
[]
userIds
);
void
saveUser
(
SysUserEntity
user
,
List
<
Long
>
funcIdList
,
List
<
Long
>
deptIdList
,
Long
roleId
);
void
update
(
SysUserEntity
user
,
List
<
Long
>
funcIdList
,
List
<
Long
>
deptIdList
);
}
}
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysRoleServiceImpl.java
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
user
.
service
.
impl
;
package
com
.
mx
.
cneeds
.
server
.
user
.
service
.
impl
;
import
com.mx.cneeds.common.annotation.DataFilter
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.pager.Query
;
import
com.mx.cneeds.common.pager.Query
;
import
com.mx.cneeds.server.dao.SysRoleDao
;
import
com.mx.cneeds.server.dao.SysRoleDao
;
...
@@ -38,6 +39,12 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
...
@@ -38,6 +39,12 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
return
new
PageUtils
(
page
);
return
new
PageUtils
(
page
);
}
}
@Override
@DataFilter
(
subDept
=
true
,
user
=
false
,
tableAlias
=
"t1"
)
public
List
<
SysRoleEntity
>
queryList
(
Map
<
String
,
Object
>
params
)
{
return
baseMapper
.
queryList
(
params
);
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -54,6 +61,18 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
...
@@ -54,6 +61,18 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
update
(
SysRoleEntity
role
,
List
<
Long
>
funcIdList
,
List
<
Long
>
deptIdList
)
{
this
.
updateById
(
role
);
//更新角色与菜单关系
sysRoleFuncService
.
saveOrUpdate
(
role
.
getRoleId
(),
funcIdList
);
//保存角色与部门关系
sysRoleDeptService
.
saveOrUpdate
(
role
.
getRoleId
(),
deptIdList
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteBatch
(
Long
[]
roleIds
)
{
public
void
deleteBatch
(
Long
[]
roleIds
)
{
//删除角色
//删除角色
this
.
removeByIds
(
Arrays
.
asList
(
roleIds
));
this
.
removeByIds
(
Arrays
.
asList
(
roleIds
));
...
...
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserDeptServiceImpl.java
0 → 100644
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
user
.
service
.
impl
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.pager.Query
;
import
com.mx.cneeds.server.dao.SysUserDeptDao
;
import
com.mx.cneeds.server.entity.SysRoleDeptEntity
;
import
com.mx.cneeds.server.entity.SysUserDeptEntity
;
import
com.mx.cneeds.server.user.service.SysUserDeptService
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.transaction.annotation.Transactional
;
@Service
(
"sysUserDeptService"
)
public
class
SysUserDeptServiceImpl
extends
ServiceImpl
<
SysUserDeptDao
,
SysUserDeptEntity
>
implements
SysUserDeptService
{
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
SysUserDeptEntity
>
page
=
this
.
page
(
new
Query
<
SysUserDeptEntity
>().
getPage
(
params
),
new
QueryWrapper
<
SysUserDeptEntity
>()
);
return
new
PageUtils
(
page
);
}
@Override
public
int
deleteBatch
(
Long
[]
userIds
){
return
baseMapper
.
deleteBatch
(
userIds
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveOrUpdate
(
Long
userId
,
List
<
Long
>
deptIdList
)
{
//先删除用户与部门关系
deleteBatch
(
new
Long
[]{
userId
});
if
(
deptIdList
.
size
()
==
0
){
return
;
}
//保存用户与菜单关系
for
(
Long
deptId
:
deptIdList
){
SysUserDeptEntity
sysUserDeptEntity
=
new
SysUserDeptEntity
();
sysUserDeptEntity
.
setDeptId
(
deptId
);
sysUserDeptEntity
.
setUserId
(
userId
);
this
.
save
(
sysUserDeptEntity
);
}
}
}
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserFuncServiceImpl.java
0 → 100644
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
user
.
service
.
impl
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.pager.Query
;
import
com.mx.cneeds.server.dao.SysUserFuncDao
;
import
com.mx.cneeds.server.entity.SysRoleFuncEntity
;
import
com.mx.cneeds.server.entity.SysUserFuncEntity
;
import
com.mx.cneeds.server.user.service.SysUserFuncService
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.transaction.annotation.Transactional
;
@Service
(
"sysUserFuncService"
)
public
class
SysUserFuncServiceImpl
extends
ServiceImpl
<
SysUserFuncDao
,
SysUserFuncEntity
>
implements
SysUserFuncService
{
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
SysUserFuncEntity
>
page
=
this
.
page
(
new
Query
<
SysUserFuncEntity
>().
getPage
(
params
),
new
QueryWrapper
<
SysUserFuncEntity
>()
);
return
new
PageUtils
(
page
);
}
@Override
public
int
deleteBatch
(
Long
[]
userIds
){
return
baseMapper
.
deleteBatch
(
userIds
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveOrUpdate
(
Long
userId
,
List
<
Long
>
menuIdList
)
{
//先删除角色与菜单关系
deleteBatch
(
new
Long
[]{
userId
});
if
(
menuIdList
.
size
()
==
0
){
return
;
}
//保存用户与菜单关系
for
(
Long
funcId
:
menuIdList
){
SysUserFuncEntity
sysUserFuncEntity
=
new
SysUserFuncEntity
();
sysUserFuncEntity
.
setFuncId
(
funcId
);
sysUserFuncEntity
.
setUserId
(
userId
);
this
.
save
(
sysUserFuncEntity
);
}
}
}
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserRoleServiceImpl.java
View file @
9c2372bb
...
@@ -36,4 +36,20 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleDao, SysUserR
...
@@ -36,4 +36,20 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleDao, SysUserR
public
int
deleteBatch
(
Long
[]
roleIds
){
public
int
deleteBatch
(
Long
[]
roleIds
){
return
baseMapper
.
deleteBatch
(
roleIds
);
return
baseMapper
.
deleteBatch
(
roleIds
);
}
}
@Override
public
void
saveOrUpdate
(
Long
userId
,
Long
roleId
)
{
//先删除用户与角色关系
this
.
remove
(
new
QueryWrapper
<
SysUserRoleEntity
>().
eq
(
"user_id"
,
userId
));
//保存用户与角色关系
SysUserRoleEntity
sysUserRoleEntity
=
new
SysUserRoleEntity
();
sysUserRoleEntity
.
setUserId
(
userId
);
sysUserRoleEntity
.
setRoleId
(
roleId
);
this
.
save
(
sysUserRoleEntity
);
}
}
}
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/service/impl/SysUserServiceImpl.java
View file @
9c2372bb
...
@@ -4,17 +4,32 @@ import com.mx.cneeds.common.pager.PageUtils;
...
@@ -4,17 +4,32 @@ import com.mx.cneeds.common.pager.PageUtils;
import
com.mx.cneeds.common.pager.Query
;
import
com.mx.cneeds.common.pager.Query
;
import
com.mx.cneeds.server.dao.SysUserDao
;
import
com.mx.cneeds.server.dao.SysUserDao
;
import
com.mx.cneeds.server.entity.SysUserEntity
;
import
com.mx.cneeds.server.entity.SysUserEntity
;
import
com.mx.cneeds.server.user.service.SysUserService
;
import
com.mx.cneeds.server.user.service.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.transaction.annotation.Transactional
;
@Service
(
"sysUserService"
)
@Service
(
"sysUserService"
)
public
class
SysUserServiceImpl
extends
ServiceImpl
<
SysUserDao
,
SysUserEntity
>
implements
SysUserService
{
public
class
SysUserServiceImpl
extends
ServiceImpl
<
SysUserDao
,
SysUserEntity
>
implements
SysUserService
{
@Autowired
private
SysUserFuncService
sysUserFuncService
;
@Autowired
private
SysUserDeptService
sysUserDeptService
;
@Autowired
private
SysUserRoleService
sysUserRoleService
;
@Override
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
SysUserEntity
>
page
=
this
.
page
(
IPage
<
SysUserEntity
>
page
=
this
.
page
(
...
@@ -32,4 +47,48 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
...
@@ -32,4 +47,48 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
.
eq
(
"username"
,
username
));
.
eq
(
"username"
,
username
));
}
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteBatch
(
Long
[]
userIds
)
{
//删除角色
this
.
removeByIds
(
Arrays
.
asList
(
userIds
));
//删除用户与菜单关联
sysUserFuncService
.
deleteBatch
(
userIds
);
//删除用户与部门关联
sysUserDeptService
.
deleteBatch
(
userIds
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveUser
(
SysUserEntity
user
,
List
<
Long
>
funcIdList
,
List
<
Long
>
deptIdList
,
Long
roleId
)
{
user
.
setCreateTime
(
new
Date
());
this
.
save
(
user
);
//保存用户与角色关系
sysUserRoleService
.
saveOrUpdate
(
user
.
getUserId
(),
roleId
);
//保存角色与菜单关系
sysUserFuncService
.
saveOrUpdate
(
user
.
getUserId
(),
funcIdList
);
//保存角色与部门关系
sysUserDeptService
.
saveOrUpdate
(
user
.
getUserId
(),
deptIdList
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
update
(
SysUserEntity
user
,
List
<
Long
>
funcIdList
,
List
<
Long
>
deptIdList
)
{
this
.
updateById
(
user
);
//更新用户与菜单关系
sysUserFuncService
.
saveOrUpdate
(
user
.
getUserId
(),
funcIdList
);
//保存用户与部门关系
sysUserDeptService
.
saveOrUpdate
(
user
.
getUserId
(),
deptIdList
);
}
}
}
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysRoleController.java
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
user
.
web
;
package
com
.
mx
.
cneeds
.
server
.
user
.
web
;
import
com.mx.cneeds.common.dto.DepartmentDto
;
import
com.mx.cneeds.common.dto.RoleDto
;
import
com.mx.cneeds.common.dto.RoleDto
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.result.R
;
import
com.mx.cneeds.common.result.R
;
...
@@ -73,6 +74,18 @@ public class SysRoleController {
...
@@ -73,6 +74,18 @@ public class SysRoleController {
return
page
;
return
page
;
}
}
@RequestMapping
(
"/listAll"
)
public
List
<
RoleDto
>
listAll
(
@RequestParam
Map
<
String
,
Object
>
params
){
List
<
SysRoleEntity
>
sysRoleEntityList
=
sysRoleService
.
queryList
(
params
);
List
<
RoleDto
>
roleDtoList
=
new
ArrayList
<>();
sysRoleEntityList
.
forEach
(
sysRoleEntity
->
{
RoleDto
roleDto
=
new
RoleDto
();
BeanUtils
.
copyProperties
(
sysRoleEntity
,
roleDto
);
roleDtoList
.
add
(
roleDto
);
});
return
roleDtoList
;
}
/**
/**
* 信息
* 信息
...
@@ -113,10 +126,11 @@ public class SysRoleController {
...
@@ -113,10 +126,11 @@ public class SysRoleController {
* 修改
* 修改
*/
*/
@RequestMapping
(
"/update"
)
@RequestMapping
(
"/update"
)
public
R
update
(
@RequestBody
SysRoleEntity
sysRole
){
public
R
update
(
@RequestBody
RoleDto
dto
){
ValidatorUtils
.
validateEntity
(
sysRole
);
ValidatorUtils
.
validateEntity
(
dto
);
sysRoleService
.
updateById
(
sysRole
);
SysRoleEntity
sysRole
=
new
SysRoleEntity
();
BeanUtils
.
copyProperties
(
dto
,
sysRole
);
sysRoleService
.
update
(
sysRole
,
dto
.
getFuncIdList
(),
dto
.
getDeptIdList
());
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysUserController.java
View file @
9c2372bb
...
@@ -31,18 +31,10 @@ public class SysUserController {
...
@@ -31,18 +31,10 @@ public class SysUserController {
private
SysUserService
sysUserService
;
private
SysUserService
sysUserService
;
public
R
Login
(
UserVo
userVo
){
return
new
R
().
put
(
"user"
,
""
);
}
/**
/**
* 列表
* 列表
*/
*/
@RequestMapping
(
"/list"
)
@RequestMapping
(
"/list"
)
// @RequiresPermissions("sys:sysuser:list")
public
PageUtils
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
public
PageUtils
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
sysUserService
.
queryPage
(
params
);
PageUtils
page
=
sysUserService
.
queryPage
(
params
);
return
page
;
return
page
;
...
@@ -53,7 +45,6 @@ public class SysUserController {
...
@@ -53,7 +45,6 @@ public class SysUserController {
* 信息
* 信息
*/
*/
// @RequestMapping("/info/{userId}")
// @RequestMapping("/info/{userId}")
// @RequiresPermissions("sys:sysuser:info")
public
R
info
(
@PathVariable
(
"userId"
)
Long
userId
){
public
R
info
(
@PathVariable
(
"userId"
)
Long
userId
){
SysUserEntity
sysUser
=
sysUserService
.
getById
(
userId
);
SysUserEntity
sysUser
=
sysUserService
.
getById
(
userId
);
...
@@ -72,10 +63,13 @@ public class SysUserController {
...
@@ -72,10 +63,13 @@ public class SysUserController {
* 保存
* 保存
*/
*/
@RequestMapping
(
"/save"
)
@RequestMapping
(
"/save"
)
// @RequiresPermissions("sys:sysuser:save")
public
R
save
(
@RequestBody
UserDto
dto
){
public
R
save
(
@RequestBody
SysUserEntity
sysUser
){
sysUserService
.
save
(
sysUser
);
SysUserEntity
sysUser
=
new
SysUserEntity
(
);
BeanUtils
.
copyProperties
(
dto
,
sysUser
);
sysUserService
.
saveUser
(
sysUser
,
dto
.
getFuncIdList
(),
dto
.
getDeptIdList
(),
dto
.
getRoleId
());
return
R
.
ok
();
return
R
.
ok
();
}
}
...
@@ -83,10 +77,12 @@ public class SysUserController {
...
@@ -83,10 +77,12 @@ public class SysUserController {
* 修改
* 修改
*/
*/
@RequestMapping
(
"/update"
)
@RequestMapping
(
"/update"
)
// @RequiresPermissions("sys:sysuser:update")
public
R
update
(
@RequestBody
UserDto
dto
){
public
R
update
(
@RequestBody
SysUserEntity
sysUser
){
SysUserEntity
sysUser
=
new
SysUserEntity
();
BeanUtils
.
copyProperties
(
dto
,
sysUser
);
ValidatorUtils
.
validateEntity
(
sysUser
);
ValidatorUtils
.
validateEntity
(
sysUser
);
sysUserService
.
update
ById
(
sysUser
);
sysUserService
.
update
(
sysUser
,
dto
.
getFuncIdList
(),
dto
.
getDeptIdList
()
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
@@ -95,9 +91,8 @@ public class SysUserController {
...
@@ -95,9 +91,8 @@ public class SysUserController {
* 删除
* 删除
*/
*/
@RequestMapping
(
"/delete"
)
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("sys:sysuser:delete")
public
R
delete
(
@RequestBody
Long
[]
userIds
){
public
R
delete
(
@RequestBody
Long
[]
userIds
){
sysUserService
.
removeByIds
(
Arrays
.
asList
(
userIds
)
);
sysUserService
.
deleteBatch
(
userIds
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysUserDeptController.java
0 → 100644
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
user
.
web
;
import
java.util.Arrays
;
import
java.util.Map
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.result.R
;
import
com.mx.cneeds.common.validator.ValidatorUtils
;
import
com.mx.cneeds.server.entity.SysUserDeptEntity
;
import
com.mx.cneeds.server.user.service.SysUserDeptService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 部门与角色映射表
*
* @author Mark
* @email sunlightcs@gmail.com
* @date 2020-03-16 11:22:10
*/
@RestController
@RequestMapping
(
"sys/userdept"
)
public
class
SysUserDeptController
{
@Autowired
private
SysUserDeptService
sysUserDeptService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
sysUserDeptService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
public
R
info
(
@PathVariable
(
"id"
)
Long
id
){
SysUserDeptEntity
sysUserDept
=
sysUserDeptService
.
getById
(
id
);
return
R
.
ok
().
put
(
"sysUserDept"
,
sysUserDept
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
public
R
save
(
@RequestBody
SysUserDeptEntity
sysUserDept
){
sysUserDeptService
.
save
(
sysUserDept
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
public
R
update
(
@RequestBody
SysUserDeptEntity
sysUserDept
){
ValidatorUtils
.
validateEntity
(
sysUserDept
);
sysUserDeptService
.
updateById
(
sysUserDept
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
public
R
delete
(
@RequestBody
Long
[]
ids
){
sysUserDeptService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
}
cneeds-server-user/src/main/java/com/mx/cneeds/server/user/web/SysUserFuncController.java
0 → 100644
View file @
9c2372bb
package
com
.
mx
.
cneeds
.
server
.
user
.
web
;
import
java.util.Arrays
;
import
java.util.Map
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.result.R
;
import
com.mx.cneeds.common.validator.ValidatorUtils
;
import
com.mx.cneeds.server.entity.SysUserFuncEntity
;
import
com.mx.cneeds.server.user.service.SysUserFuncService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 功能与角色映射表
*
* @author Mark
* @email sunlightcs@gmail.com
* @date 2020-03-16 11:22:10
*/
@RestController
@RequestMapping
(
"sys/userfunc"
)
public
class
SysUserFuncController
{
@Autowired
private
SysUserFuncService
sysUserFuncService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
sysUserFuncService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
public
R
info
(
@PathVariable
(
"id"
)
Long
id
){
SysUserFuncEntity
sysUserFunc
=
sysUserFuncService
.
getById
(
id
);
return
R
.
ok
().
put
(
"sysUserFunc"
,
sysUserFunc
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
public
R
save
(
@RequestBody
SysUserFuncEntity
sysUserFunc
){
sysUserFuncService
.
save
(
sysUserFunc
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
public
R
update
(
@RequestBody
SysUserFuncEntity
sysUserFunc
){
ValidatorUtils
.
validateEntity
(
sysUserFunc
);
sysUserFuncService
.
updateById
(
sysUserFunc
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
public
R
delete
(
@RequestBody
Long
[]
ids
){
sysUserFuncService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
}
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