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

import com.ym.mec.biz.event.CourseStatusChangeEvent;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

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

/**
 * @Author qnc99
 * @Date 2020/12/2 0002
 */
@Service
public class CourseEventSource {

    @Resource
    private ApplicationContext applicationContext;

    /**
     * @describe 课程状态变更
     * @author qnc99
     * @date 2020/12/2 0002
     * @return void
     */
    public void courseStatusChange(Set<Long> courseIds){
        applicationContext.publishEvent(new CourseStatusChangeEvent(this, courseIds));
    }

}
