From 8ee641c1bc133b04f23846f648ffeddecd1697cf Mon Sep 17 00:00:00 2001 From: 稚屿 <1491182878@qq.com> Date: 星期五, 13 八月 2021 09:08:00 +0800 Subject: [PATCH] 修复角色分配用户页面接收参数与传递参数类型不一致导致的错误 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index 3da7490..2561e08 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -67,6 +67,32 @@ } /** + * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ宸插垎閰嶇敤鎴疯鑹插垪琛� + * + * @param user 鐢ㄦ埛淇℃伅 + * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 + */ + @Override + @DataScope(deptAlias = "d", userAlias = "u") + public List<SysUser> selectAllocatedList(SysUser user) + { + return userMapper.selectAllocatedList(user); + } + + /** + * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鏈垎閰嶇敤鎴疯鑹插垪琛� + * + * @param user 鐢ㄦ埛淇℃伅 + * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 + */ + @Override + @DataScope(deptAlias = "d", userAlias = "u") + public List<SysUser> selectUnallocatedList(SysUser user) + { + return userMapper.selectUnallocatedList(user); + } + + /** * 閫氳繃鐢ㄦ埛鍚嶆煡璇㈢敤鎴� * * @param userName 鐢ㄦ埛鍚� @@ -221,6 +247,18 @@ } /** + * 娉ㄥ唽鐢ㄦ埛淇℃伅 + * + * @param user 鐢ㄦ埛淇℃伅 + * @return 缁撴灉 + */ + @Override + public boolean registerUser(SysUser user) + { + return userMapper.insertUser(user) > 0; + } + + /** * 淇敼淇濆瓨鐢ㄦ埛淇℃伅 * * @param user 鐢ㄦ埛淇℃伅 @@ -248,6 +286,8 @@ * @param userId 鐢ㄦ埛ID * @param roleIds 瑙掕壊缁� */ + @Override + @Transactional public void insertUserAuth(Long userId, Long[] roleIds) { userRoleMapper.deleteUserRoleByUserId(userId); -- Gitblit v1.9.3