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

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

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

@Component
public class MatrixPushTask {
    @Resource
    private MatrixPushService matrixPushService;
    @Resource
    private WebsocketMessageService websocketMessageService;

    public void matrixPush(String destination) throws Exception {

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

        websocketMessageService.SendAlertToAll(destination,map);
    }
}
