package com.gree.mall.manager.schedule.daily;

import com.gree.mall.manager.logic.settle.repair.DailyTransferLogic;
import com.gree.mall.manager.utils.DateUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author Administrator
 */
@Slf4j
@Component
public class TransferRetrySchedule {

    @Autowired
    DailyTransferLogic dailyTransferLogic;

    @Scheduled(cron = "0 0/2 * * * ? ")
    public void task() {
        log.info("【联动支付转账结果查询】{}", DateUtils.formatDate(new Date()));
        dailyTransferLogic.excute();
        log.info("【联动支付结果查询】{}",DateUtils.formatDate(new Date()));
    }

}
