MobWebSocketPushService.java 529 字节
package com.skua.modules.websocket;

import com.alibaba.fastjson.JSONObject;
import com.skua.core.util.push.IWebSocketPushService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
@Component("webSocketPushService")
public class MobWebSocketPushService implements IWebSocketPushService {
    @Resource
    private WebSocket webSocket;
    @Override
    public void webSocketPush(String[] userIds, JSONObject msgJson) {
        webSocket.sendMoreMessage(userIds, msgJson.toJSONString());
    }
}