package com.ssj.task.sz;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.ssj.framework.core.util.SystemResourceLocator;
import com.ssj.service.sys.fx.service.MerchantService;

@DisallowConcurrentExecution
@Component
public class MerchantSummaryTask implements Job{

	private static Logger logger = LoggerFactory.getLogger(MerchantSummaryTask.class);
	
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		MerchantService merchantService = SystemResourceLocator.getBean(MerchantService.class);
		try{
			logger.error("结算扣币定时任务，00点启动任务....start....");
			merchantService.runSummaryByMerchant_new();
			logger.error("结算扣币定时任务，00点启动任务....end....");
		}catch (Exception e) {
			logger.error("结算扣币定时任务，00点启动异常-->"+e.getMessage());
		}

	}
}
