package cn.iocoder.yudao.module.config.service;

import cn.iocoder.yudao.module.appBase.controller.admin.InspectionSocket;
import cn.iocoder.yudao.module.config.entity.ReminderMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class ReminderHandler {

    @Autowired
    private InspectionSocket inspectionSocket;

    public void handleReminder(ReminderMessage message) {

        // 调用websocket发送消息
        inspectionSocket.sendMessage(message.getMessage(), String.valueOf(message.getUserId()));
    }
}

