| 
					
				 | 
			
			
				@@ -6,6 +6,7 @@ import com.zanxiang.game.data.serve.pojo.entity.AdsMonitorAlarm; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.zanxiang.game.data.serve.pojo.vo.GameMonitorAlarmVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.zanxiang.game.data.serve.service.IGameMonitorAlarmService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import lombok.extern.slf4j.Slf4j; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.apache.commons.collections4.CollectionUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.dubbo.config.annotation.DubboReference; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.nutz.dao.Chain; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.nutz.dao.Cnd; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -44,13 +45,19 @@ public class GameMonitorAlarmServiceImpl implements IGameMonitorAlarmService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dao.execute(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //结果 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<GameMonitorAlarmVO> list = sql.getList(GameMonitorAlarmVO.class).stream().map(vo -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<GameMonitorAlarmVO> list1 = sql.getList(GameMonitorAlarmVO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (CollectionUtils.isEmpty(list1)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                log.info("没有告警信息"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (GameMonitorAlarmVO vo : list1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 String[] pitcherIds = vo.getPitcherId().split("-"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                log.info("查询投手数量:{}",pitcherIds.length); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 for (String pitcherId : pitcherIds) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     //发送给多个投手 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     log.info("发送告警信息给投手:{}", pitcherId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     dingTalkMsgRpc.sendByUserId(Long.valueOf(pitcherId), alarmStr(vo)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    log.info("发送告警信息给投手:{}成功", pitcherId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 //更新的条件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 Criteria cri = Cnd.cri(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -67,8 +74,8 @@ public class GameMonitorAlarmServiceImpl implements IGameMonitorAlarmService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     cri.where().andEquals("userId", vo.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 dao.update(AdsMonitorAlarm.class, Chain.make("warn_status", 1), cri); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return vo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }).toList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             log.error("游戏监控告警出错,原因:{}", e.getMessage(), e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 |