package com.ssj.task;

import com.ssj.framework.core.util.SystemResourceLocator;
import com.ssj.service.weixin.push.service.PushTemplateService;
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;


/** 
 * @version wuwen  2019年1月23日14:30:57
 * 短微信模板id推送
 * 定时任务 3分钟一次
 * 
 */
@DisallowConcurrentExecution
@Component
public class PushWxTemplateTask implements Job {
	
	private static Logger logger = LoggerFactory.getLogger(PushWxTemplateTask.class);

    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        try {
            PushTemplateService pushTemplateService = SystemResourceLocator.getBean(PushTemplateService.class);
            pushTemplateService.pushWxTemplate();
        } catch (Exception e) {
            logger.error("PushWxTemplateTask任务失败:" + e.getMessage(), e);
        }
    }
}

