package com.goafanti.common.task;

import javax.annotation.Resource;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.goafanti.common.utils.LoggerUtils;
import com.goafanti.member.service.MemberOrderService;

@Component
public class ExpiredUserMemberTask {

	@Resource
	MemberOrderService memberOrderService;

	/**
	 * "0 0 1 * * ?" 每天1点触发一次
	 */
	@Scheduled(cron = "0 0 1 * * ?")
	public void exprireRun() {
		LoggerUtils.debug(getClass(), "开始检查会员到期");
		memberOrderService.updateExpiredUser();
	}

}
