|  |  | 
 |  |  |  | 
 |  |  | 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; | 
 |  |  | 
 |  |  |         return this.dao.deleteLogicById(id); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 禁用或启用角色信息 | 
 |  |  |      * @param id | 
 |  |  |      * @param disabled | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @Transactional | 
 |  |  |     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); | 
 |  |  | 
 |  |  |      * @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); | 
 |  |  | 
 |  |  |         return dao.selectByPrimaryKey(Long.valueOf(roleId)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public List<BaRole> selectAll() { | 
 |  |  |         return dao.selectAll(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 获取角色列表 | 
 |  |  |      */ |