package com.dbs.mplus.service.batch;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.dbs.mplus.service.MPlusConfigureService;
import com.dbs.mplus.service.admin.agg.repository.AggUserAgeRepository;
import com.dbs.mplus.service.admin.agg.repository.AggUserPostnoRepository;
import com.dbs.mplus.service.admin.agg.repository.AggUserTmpRepository;
import com.dbs.mplus.service.api.MPlusApiCallService;

import com.dbs.mplus.service.mobile.helper.HelperApiFacade;
/**
 * 사이트에서 통계내고 싶은 사항을 만들어서 framework에 실행요청을 보내는 컴포넌트 
 * 
 * 
 * @author aple
 *
 */
@Component 
public class BatchJobRequestInjector { 
	@Autowired 
	private MPlusBatchJobManager jobManager; 

	@Autowired 
	private MPlusApiCallService apiCallService; 
	@Autowired 
	private MPlusConfigureService configureService; 	
//	@Autowired 
//	private SendSmsService smsService; 
	@Autowired 
	private HelperApiFacade helperFacade; 

	
	@Autowired 
	private AggUserAgeRepository userAgeRepository; 
	@Autowired 
	private AggUserPostnoRepository userPostnoRepository; 
	@Autowired 
	private AggUserTmpRepository userTmpRepository; 	
	
	@PostConstruct 
	public void init() { 
		// 도우미 메시지 삭제 (통계에서 같이 처리) 
//		this.jobManager.addAggregationBatchJob(new HelperDeleteByDateBatchJob(this.apiCallService, this.configureService.getHelperValidDate())); 
		// 탈퇴처리 
/*		this.jobManager.addWithdrawalBatchJob(
				new WithdrawalNotifyByDateBatchJob(this.apiCallService, this.smsService, this.helperFacade, 
				this.configureService.getWithdrawalDeadlineDate(), 
				this.configureService.getWithdrawalDeadlineNotifyDate(), 
				this.configureService.getWithdrawalNotifySmsFormat(), 
				this.configureService.getWithdrawalNotifyPushFormat())); */
		// 결제마스터삭제 
//		this.jobManager.setDeletePaymentBatchJob(new PaymentDeleteByDateBatchJob(this.smartPaymentRepository, this.configureService.getPaymentMasterValidDate()));
		// 연령별, 지역별 통계 
//		this.jobManager.setUserInfoBatchJob(new UserInfoBatchJob(this.apiCallService, this.userTmpRepository, this.userAgeRepository, this.userPostnoRepository));


	}
}
