|  | @@ -25,6 +25,7 @@ import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  |  import org.apache.logging.log4j.util.Strings;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.context.annotation.Lazy;
 | 
	
		
			
				|  |  | +import org.springframework.data.redis.core.RedisTemplate;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Component;
 | 
	
		
			
				|  |  |  import org.springframework.web.socket.*;
 | 
	
		
			
				|  |  |  import reactor.util.function.Tuple2;
 | 
	
	
		
			
				|  | @@ -68,6 +69,9 @@ public class KfMsgWebsocketHandler implements WebSocketHandler {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private IKfQuickReplyService kfQuickReplyService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private RedisTemplate<String, String> redisTemplate;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * websocket连接建立成功
 | 
	
		
			
				|  |  |       */
 | 
	
	
		
			
				|  | @@ -408,8 +412,8 @@ public class KfMsgWebsocketHandler implements WebSocketHandler {
 | 
	
		
			
				|  |  |                  .build());
 | 
	
		
			
				|  |  |          //发送消息, 给所有在线客服推送完整待接入列表
 | 
	
		
			
				|  |  |          List<KfWebSocketMsgDTO.WaitUserBean> waitUserList = kfSessionUserService.getWaitUserList(param.getGameId());
 | 
	
		
			
				|  |  | -        this.sendMessage(session, KfWebSocketMsgDTO.builder()
 | 
	
		
			
				|  |  | -                .webSocketMsgType(param.getWebSocketMsgType())
 | 
	
		
			
				|  |  | +        this.pushMessage(KfWebSocketMsgDTO.builder()
 | 
	
		
			
				|  |  | +                .webSocketMsgType(KfWebSocketMsgEnum.WEBSOCKET_MSG_WAIT_LIST)
 | 
	
		
			
				|  |  |                  .gameId(param.getGameId())
 | 
	
		
			
				|  |  |                  .waitUserList(waitUserList)
 | 
	
		
			
				|  |  |                  .build());
 | 
	
	
		
			
				|  | @@ -499,8 +503,14 @@ public class KfMsgWebsocketHandler implements WebSocketHandler {
 | 
	
		
			
				|  |  |      private void sendMessage(WebSocketSession session, KfWebSocketMsgDTO kfWebSocketMsgDTO) {
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  |              session.sendMessage(new TextMessage(JsonUtil.toString(kfWebSocketMsgDTO)));
 | 
	
		
			
				|  |  | -            log.error("发送消息给客服 kfUserId : {}, msg : {}", SecurityUtil.getUserId(), JsonUtil.toString(kfWebSocketMsgDTO));
 | 
	
		
			
				|  |  |          } catch (IOException ignored) {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 消息发送到redis广播
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    private void pushMessage(KfWebSocketMsgDTO kfWebSocketMsgDTO) {
 | 
	
		
			
				|  |  | +        redisTemplate.convertAndSend(RedisKeyConstant.KF_MSG_REDIS_LISTEN_TOPIC, JsonUtil.toString(kfWebSocketMsgDTO));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 |