package com.qxgmat.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class AsyncTask {
    private static final Logger logger = LoggerFactory.getLogger(AsyncTask.class);

    @Async("autoExercisePaper")
    public void autoExercisePaper() {
        logger.info("自动练习组卷：顺序，考点，难易度");
        long start = System.currentTimeMillis();
        long end = System.currentTimeMillis();
        logger.info("完成任务一，耗时：" + (end - start) + "毫秒");
    }

    @Async("autoExercisePaperError")
    public void autoExercisePaperError() {
        logger.info("自动练习：难易度组卷，全局难易度判断");
    }

    @Async("autoSentencePaper")
    public void autoSentencePaper() {
        logger.info("自动长难句：对于试用卷进行自动生成");
    }
}
