From cbcfefd656612000fb47e275737391808c7a255a Mon Sep 17 00:00:00 2001 From: liuxm <liuxm@fescotech.com> Date: 星期四, 16 五月 2024 10:11:20 +0800 Subject: [PATCH] 角色-权限id类型修改 --- pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java b/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java index e3a95c6..eec6e82 100644 --- a/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java +++ b/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java @@ -2,7 +2,6 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.dy.common.webUtil.QueryResultVo; -import com.dy.pmsBase.role.QueryVo; import com.dy.pmsGlobal.daoBa.BaPrivilegeMapper; import com.dy.pmsGlobal.daoBa.BaRoleMapper; import com.dy.pmsGlobal.daoBa.BaRolePrivilegeMapper; @@ -50,6 +49,19 @@ return this.dao.deleteLogicById(id); } + /** + * 绂佺敤鎴栧惎鐢ㄨ鑹蹭俊鎭� + * @param id + * @param disabled + * @return + */ + public int disabled(Long id,Boolean disabled) { + BaRole role=new BaRole(); + role.id=id; + role.disabled=disabled; + return dao.updateByPrimaryKeySelective(role); + } + @Transactional public int update(BaRole role) { int count = dao.updateByPrimaryKeySelective(role); @@ -64,9 +76,9 @@ * @param priIds 鏉冮檺id * @return */ - private void updateRolePrivileges(Long roleId,List<Integer> priIds) { + private void updateRolePrivileges(Long roleId,List<Long> priIds) { if(CollectionUtils.isEmpty(priIds)){ - throw new RuntimeException("鏉冮檺id涓嶈兘涓虹┖"); + return; } // 鍒犻櫎瑙掕壊鏉冮檺 rpDao.deleteByRoleId(roleId); @@ -81,6 +93,10 @@ return dao.selectByPrimaryKey(Long.valueOf(roleId)); } + public List<BaRole> selectAll() { + return dao.selectAll(); + } + /** * 鑾峰彇瑙掕壊鍒楄〃 */ -- Gitblit v1.8.0