package com.ym.mec.biz.event.source;

import com.ym.mec.biz.dal.enums.MessageTypeEnum;
import com.ym.mec.biz.dal.enums.SysUserRoleEnum;
import com.ym.mec.biz.event.SendSeoMessageChangeEvent;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class SendSeoMessageSource {
    @Resource
    private ApplicationContext applicationContext;

    public void sendSeoMessage(Integer organId, SysUserRoleEnum[] roleArr, String memo,
                               Integer targetId, MessageTypeEnum msgTemplate, Object... args){
        applicationContext.publishEvent(new SendSeoMessageChangeEvent(this,organId,roleArr,memo,targetId,msgTemplate,args));
    }
}
