package com.ssj.task;

import com.ssj.framework.core.util.SystemResourceLocator;
import com.ssj.service.conch.conch.service.ConchDerverService;
import com.ssj.service.weixin.problem.service.ValidVipService;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;


@DisallowConcurrentExecution
@Component
public class ValidVipTask implements Job {

    private static Logger logger = LoggerFactory.getLogger(ValidVipTask.class);

    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        ValidVipService validVipService =  SystemResourceLocator.getBean(ValidVipService.class);
        try {
            logger.info("插入各馆有效会员数量任务开始");
            validVipService.saveValidVip();
            validVipService.saveMonthValidVip();


        } catch (Exception e) {
            logger.error("插入各馆有效会员数量任务异常-->"+e.getMessage());
        }finally{
            logger.info("插入各馆有效会员数量开始任务结束");
        }




    }

}
