package com.gyee.frame.service.websocket.task;

import com.gyee.frame.common.websocket.WebsocketMessageService;
import com.gyee.frame.service.websocket.WpInfoPushService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;

@Component
public class WpInfoPushTask {
    @Resource
    private WpInfoPushService wpInfoPushService;
    @Resource
    private WebsocketMessageService websocketMessageService;

    public void wpInfoPush(String destination) throws Exception {

        Map<String, Object> map=wpInfoPushService.genreSetMap();

        websocketMessageService.SendAlertToAll(destination,map);
    }
}
