|  | @@ -46,12 +46,18 @@ public class ImGroupNoticeServiceImpl extends ServiceImpl<ImGroupNoticeDao, ImGr
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | +    @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  |      public void create(ImGroupNotice imGroupNotice) {
 | 
	
		
			
				|  |  |          Long userId = this.checkAdmin(imGroupNotice.getGroupId());
 | 
	
		
			
				|  |  |          Date date = new Date();
 | 
	
		
			
				|  |  |          imGroupNotice.setOperatorId(userId);
 | 
	
		
			
				|  |  |          imGroupNotice.setCreateTime(date);
 | 
	
		
			
				|  |  |          imGroupNotice.setUpdateTime(date);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 群公告置顶 只能有一个
 | 
	
		
			
				|  |  | +        if(imGroupNotice.getTopFlag() != null && Boolean.TRUE.equals(imGroupNotice.getTopFlag())){
 | 
	
		
			
				|  |  | +            baseMapper.updateTopFlag(imGroupNotice.getGroupId());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          baseMapper.insert(imGroupNotice);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |