|  |  | @ -22,6 +22,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.FieldConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.RenException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.security.user.LoginUserUtil; | 
			
		
	
	
		
			
				
					|  |  | @ -116,6 +118,11 @@ public class GovRoleServiceImpl extends BaseServiceImpl<GovRoleDao, GovRoleEntit | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public void delete(String[] ids) { | 
			
		
	
		
			
				
					|  |  |  |         //联建单位负责人、社区自组织负责人两个默认解释不允许删除
 | 
			
		
	
		
			
				
					|  |  |  |         GovRoleEntity entity = baseDao.selectById(ids[0]); | 
			
		
	
		
			
				
					|  |  |  |         if(null!=entity && "1".equals(entity.getDefaultRole())){ | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "系统默认角色,不允许删除", "系统默认角色,不允许删除"); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         baseDao.deleteBatchIds(Arrays.asList(ids)); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         govRoleMenuService.deleteByRoleIds(ids); | 
			
		
	
	
		
			
				
					|  |  | 
 |