Commit 9c2372bb by zzrdark

1.用户模块

parent 7d1b62ad
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="58efcb75-622d-40c1-b8e0-10cd2fb456b4" name="Default Changelist" comment="1.部门模块&#10;2.角色模块部分">
<change afterPath="$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/vo/RoleVo.java" afterDir="false" />
<list default="true" id="58efcb75-622d-40c1-b8e0-10cd2fb456b4" name="Default Changelist" comment="">
<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$/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/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/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-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-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/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-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-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/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/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/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/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/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/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>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -100,7 +101,7 @@
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<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_npm_path_reset_for_default_project" value="true" />
<property name="project.structure.last.edited" value="Modules" />
......@@ -111,11 +112,12 @@
<property name="settings.editor.splitter.proportion" value="0.20898877" />
</component>
<component name="RecentsManager">
<key name="MoveFile.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-server-datashow\src\main\resources" />
<recent name="E:\mx_project\cneeds-server" />
<recent name="E:\mx_project\cneeds-server\src" />
<key name="CopyFile.RECENT_KEYS">
<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-common-data\src\main\resources\mapper" />
<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\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 name="CopyClassDialog.RECENTS_KEY">
<recent name="com.mx.cneeds.common.vo" />
......@@ -124,12 +126,11 @@
<recent name="com.mx.cneeds.server.datashow.web.system" />
<recent name="com.mx.cneeds.common.dto" />
</key>
<key name="CopyFile.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-user\src\main\java\com\mx\cneeds\server\user\service" />
<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\cneeds-common-pojo\src\main\java" />
<recent name="E:\mx_project\cneeds-server\cneeds-server-datashow" />
<key name="MoveFile.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-server-datashow\src\main\resources" />
<recent name="E:\mx_project\cneeds-server" />
<recent name="E:\mx_project\cneeds-server\src" />
</key>
</component>
<component name="RunManager" selected="Spring Boot.DatashowApplication">
......@@ -293,7 +294,8 @@
<workItem from="1583807454250" duration="27147000" />
<workItem from="1583893504296" duration="26375000" />
<workItem from="1583980091332" duration="17880000" />
<workItem from="1584066161394" duration="18177000" />
<workItem from="1584066161394" duration="18287000" />
<workItem from="1584325001929" duration="17951000" />
</task>
<task id="LOCAL-00001" summary="1.修改不需要web服务 &#10;2.增加一个logupload">
<created>1578451117064</created>
......@@ -372,7 +374,14 @@
<option name="project" value="LOCAL" />
<updated>1584011537931</updated>
</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 />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -404,7 +413,8 @@
<MESSAGE value="1.增加dto&#10;2.系统管理4个模块的查询&#10;3.系统模块add功能&#10;4.增加mysql注释" />
<MESSAGE value="1.增加登陆,等" />
<MESSAGE value="1.部门模块&#10;2.角色模块部分" />
<option name="LAST_COMMIT_MESSAGE" value="1.部门模块&#10;2.角色模块部分" />
<MESSAGE value="2.角色模块增删改查" />
<option name="LAST_COMMIT_MESSAGE" value="2.角色模块增删改查" />
</component>
<component name="WindowStateProjectService">
<state x="552" y="178" key="#Project_Structure" timestamp="1583920392109">
......@@ -435,62 +445,62 @@
<screen x="0" y="0" width="1920" height="1040" />
</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="463" y="112" key="CommitChangelistDialog2" timestamp="1584069254530">
<state x="463" y="112" key="CommitChangelistDialog2" timestamp="1584096665796">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="463" y="112" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1584069254530" />
<state x="463" y="112" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1584096665796" />
<state x="740" y="275" key="FileChooserDialogImpl" timestamp="1583991202144">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<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="1584096626830">
<state width="1877" height="327" key="GridCell.Tab.0.bottom" timestamp="1584096720690">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="327" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1584096626830" />
<state width="1877" height="327" key="GridCell.Tab.0.center" timestamp="1584096626830">
<state width="1877" height="327" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1584096720690" />
<state width="1877" height="327" key="GridCell.Tab.0.center" timestamp="1584096720690">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="327" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1584096626830" />
<state width="1877" height="327" key="GridCell.Tab.0.left" timestamp="1584096626830">
<state width="1877" height="327" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1584096720690" />
<state width="1877" height="327" key="GridCell.Tab.0.left" timestamp="1584096720690">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="327" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1584096626830" />
<state width="1877" height="327" key="GridCell.Tab.0.right" timestamp="1584096626830">
<state width="1877" height="327" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1584096720690" />
<state width="1877" height="327" key="GridCell.Tab.0.right" timestamp="1584096720690">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="327" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1584096626830" />
<state width="1877" height="216" key="GridCell.Tab.1.bottom" timestamp="1584096619672">
<state width="1877" height="327" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1584096720690" />
<state width="1877" height="471" key="GridCell.Tab.1.bottom" timestamp="1584096720686">
<screen x="0" y="0" width="1920" height="1040" />
</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="216" key="GridCell.Tab.1.center" 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="471" key="GridCell.Tab.1.center" timestamp="1584096720686">
<screen x="0" y="0" width="1920" height="1040" />
</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="216" key="GridCell.Tab.1.left" 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="471" key="GridCell.Tab.1.left" timestamp="1584096720686">
<screen x="0" y="0" width="1920" height="1040" />
</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="216" key="GridCell.Tab.1.right" 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="471" key="GridCell.Tab.1.right" timestamp="1584096720686">
<screen x="0" y="0" width="1920" height="1040" />
</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="216" key="GridCell.Tab.2.bottom" 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="471" key="GridCell.Tab.2.bottom" timestamp="1584096720686">
<screen x="0" y="0" width="1920" height="1040" />
</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="216" key="GridCell.Tab.2.center" 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="471" key="GridCell.Tab.2.center" timestamp="1584096720686">
<screen x="0" y="0" width="1920" height="1040" />
</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="216" key="GridCell.Tab.2.left" 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="471" key="GridCell.Tab.2.left" timestamp="1584096720686">
<screen x="0" y="0" width="1920" height="1040" />
</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="216" key="GridCell.Tab.2.right" 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="471" key="GridCell.Tab.2.right" timestamp="1584096720686">
<screen x="0" y="0" width="1920" height="1040" />
</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">
<screen x="0" y="0" width="1920" height="1040" />
</state>
......@@ -503,10 +513,10 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<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="1584011539523">
<state x="552" y="253" key="Vcs.Push.Dialog.v2" timestamp="1584096671443">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="552" y="253" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1584011539523" />
<state x="552" y="253" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1584096671443" />
<state x="752" y="437" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1583724603426">
<screen x="0" y="0" width="1920" height="1040" />
</state>
......@@ -523,10 +533,10 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<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="1584085955206">
<state x="616" y="173" width="672" height="676" key="search.everywhere.popup" timestamp="1584354253442">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="616" y="173" width="672" height="676" key="search.everywhere.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1584085955206" />
<state x="616" y="173" width="672" height="676" key="search.everywhere.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1584354253442" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
......@@ -543,7 +553,7 @@
</line-breakpoint>
<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>
<line>237</line>
<line>293</line>
<option name="timeStamp" value="27" />
</line-breakpoint>
</breakpoints>
......
......@@ -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;
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;
......@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mx.cneeds.server.entity.SysRoleEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 角色表
*
......@@ -14,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface SysRoleDao extends BaseMapper<SysRoleEntity> {
List<SysRoleEntity> queryList(Map<String, Object> params);
}
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);
}
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);
}
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;
}
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;
}
......@@ -13,4 +13,12 @@
</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>
\ No newline at end of file
<?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
<?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
......@@ -4,6 +4,7 @@ import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @ClassName UserDto
......@@ -45,4 +46,11 @@ public class UserDto implements Serializable {
* 部门id
*/
private Long deptId;
private List<Long> funcIdList;
private List<Long> deptIdList;
private Long roleId;
}
......@@ -65,6 +65,10 @@ public class SystemController {
return new R().put("data",pageDto);
}
/**
* 查询出角色关联的模块
* @return
*/
@PostMapping("/func/listAll")
public R selectTreeFunc(){
List<FuncDto> dtos = userClient.funcListAll();
......@@ -86,6 +90,32 @@ public class SystemController {
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")
public R deptList(@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer pageSize,
......@@ -199,6 +229,32 @@ public class SystemController {
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")
public R roleList(@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer pageSize,
......@@ -253,7 +309,6 @@ public class SystemController {
BeanUtils.copyProperties(vo,dto);
userClient.updateRole(dto);
return R.ok();
}
@PostMapping("/role/delete")
......@@ -288,7 +343,6 @@ public class SystemController {
orderField = RequestParamterConverter.toLine(orderField);
}
PageDto pageDto = userClient.userList(page,pageSize,orderField,order);
return new R().put("data",pageDto);
......
package com.mx.cneeds.server.user.service;
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.server.entity.SysRoleEntity;
import org.springframework.transaction.annotation.Transactional;
......@@ -19,8 +20,14 @@ public interface SysRoleService extends IService<SysRoleEntity> {
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);
@Transactional(rollbackFor = Exception.class)
void update(SysRoleEntity role, List<Long> funcIdList, List<Long> deptIdList);
void deleteBatch(Long[] roleIds);
}
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);
}
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);
}
......@@ -25,5 +25,7 @@ public interface SysUserRoleService extends IService<SysUserRoleEntity> {
List<Long> queryRoleIdList(Long userId);
int deleteBatch(Long[] roleIds);
void saveOrUpdate(Long userId, Long roleId);
}
......@@ -3,7 +3,9 @@ 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.SysUserEntity;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
......@@ -18,5 +20,11 @@ public interface SysUserService extends IService<SysUserEntity> {
PageUtils queryPage(Map<String, Object> params);
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);
}
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.Query;
import com.mx.cneeds.server.dao.SysRoleDao;
......@@ -38,6 +39,12 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
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
@Transactional(rollbackFor = Exception.class)
......@@ -54,6 +61,18 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
@Override
@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) {
//删除角色
this.removeByIds(Arrays.asList(roleIds));
......
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);
}
}
}
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);
}
}
}
......@@ -36,4 +36,20 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleDao, SysUserR
public int deleteBatch(Long[] 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);
}
}
......@@ -4,17 +4,32 @@ import com.mx.cneeds.common.pager.PageUtils;
import com.mx.cneeds.common.pager.Query;
import com.mx.cneeds.server.dao.SysUserDao;
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 java.util.Arrays;
import java.util.Date;
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("sysUserService")
public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> implements SysUserService {
@Autowired
private SysUserFuncService sysUserFuncService;
@Autowired
private SysUserDeptService sysUserDeptService;
@Autowired
private SysUserRoleService sysUserRoleService;
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<SysUserEntity> page = this.page(
......@@ -32,4 +47,48 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
.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);
}
}
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.pager.PageUtils;
import com.mx.cneeds.common.result.R;
......@@ -73,6 +74,18 @@ public class SysRoleController {
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 {
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody SysRoleEntity sysRole){
ValidatorUtils.validateEntity(sysRole);
sysRoleService.updateById(sysRole);
public R update(@RequestBody RoleDto dto){
ValidatorUtils.validateEntity(dto);
SysRoleEntity sysRole = new SysRoleEntity();
BeanUtils.copyProperties(dto,sysRole);
sysRoleService.update(sysRole, dto.getFuncIdList(), dto.getDeptIdList());
return R.ok();
}
......
......@@ -31,18 +31,10 @@ public class SysUserController {
private SysUserService sysUserService;
public R Login(UserVo userVo){
return new R().put("user","");
}
/**
* 列表
*/
@RequestMapping("/list")
// @RequiresPermissions("sys:sysuser:list")
public PageUtils list(@RequestParam Map<String, Object> params){
PageUtils page = sysUserService.queryPage(params);
return page;
......@@ -53,7 +45,6 @@ public class SysUserController {
* 信息
*/
// @RequestMapping("/info/{userId}")
// @RequiresPermissions("sys:sysuser:info")
public R info(@PathVariable("userId") Long userId){
SysUserEntity sysUser = sysUserService.getById(userId);
......@@ -72,10 +63,13 @@ public class SysUserController {
* 保存
*/
@RequestMapping("/save")
// @RequiresPermissions("sys:sysuser:save")
public R save(@RequestBody SysUserEntity sysUser){
sysUserService.save(sysUser);
public R save(@RequestBody UserDto dto){
SysUserEntity sysUser = new SysUserEntity();
BeanUtils.copyProperties(dto,sysUser);
sysUserService.saveUser(sysUser, dto.getFuncIdList(), dto.getDeptIdList(), dto.getRoleId());
return R.ok();
}
......@@ -83,10 +77,12 @@ public class SysUserController {
* 修改
*/
@RequestMapping("/update")
// @RequiresPermissions("sys:sysuser:update")
public R update(@RequestBody SysUserEntity sysUser){
public R update(@RequestBody UserDto dto){
SysUserEntity sysUser = new SysUserEntity();
BeanUtils.copyProperties(dto,sysUser);
ValidatorUtils.validateEntity(sysUser);
sysUserService.updateById(sysUser);
sysUserService.update(sysUser, dto.getFuncIdList(), dto.getDeptIdList());
return R.ok();
}
......@@ -95,9 +91,8 @@ public class SysUserController {
* 删除
*/
@RequestMapping("/delete")
// @RequiresPermissions("sys:sysuser:delete")
public R delete(@RequestBody Long[] userIds){
sysUserService.removeByIds(Arrays.asList(userIds));
sysUserService.deleteBatch(userIds);
return R.ok();
}
......
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();
}
}
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();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment