package jnpf.cultivate.event.impl.trigger.course;

import jnpf.cultivate.event.base.TriggerProcessor;
import jnpf.cultivate.event.base.course.CourseProcessLearnAbstract;
import jnpf.model.cultivate.bo.TriggerEventBO;
import jnpf.model.cultivate.event.dto.course.CommonCourseProcessLearnDTO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
@Slf4j
public class CommonCourseProcessLearnProcessor extends CourseProcessLearnAbstract<CommonCourseProcessLearnDTO> implements TriggerProcessor<CommonCourseProcessLearnDTO> {

    @Override
    public boolean triggerTypeConfirmation(TriggerEventBO.TriggerEventType triggerEventType) {
        return triggerEventType == TriggerEventBO.TriggerEventType.COMMON_COURSE;
    }

    @Override
    public void triggerHandle(CommonCourseProcessLearnDTO triggerEvent) {
        super.courseProcessLearn(triggerEvent);
    }

    @Override
    public void courseLearnCompleteHandle(CommonCourseProcessLearnDTO baseData) {
        // ignore 通用课程学习完成后不做任何处理
    }

}
