package com.chinacreator.process.job;

import org.quartz.*;
import org.apache.log4j.*;
import com.chinacreator.process.dao.*;
import org.springframework.beans.factory.annotation.*;
import com.chinacreator.process.service.*;
import java.util.*;
import com.chinacreator.process.bean.*;

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class GDtencentBillRetryJob
{
    private static Logger log;
    @Autowired
    private TencentBillDao dao;
    @Autowired
    private TencentBillService service;
    
    static {
        GDtencentBillRetryJob.log = Logger.getLogger((Class)GDtencentBillRetryJob.class);
    }
    
    public void doProcess() throws Exception {
        final long stime = System.currentTimeMillis();
        try {
            final List<TencentBillLog> list = this.dao.existBillLogAgain3();
            if (list != null && list.size() > 0) {
                for (final TencentBillLog log : list) {
                    final TencentBillChannel ch = this.dao.existChannel(log.getCpid(), log.getSpid());
                    this.service.BillRetry3(ch, log);
                }
            }
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        try {
            final List<TencentBillLog> list = this.dao.existBillLogAgain4();
            if (list != null && list.size() > 0) {
                for (final TencentBillLog log : list) {
                    final TencentBillChannel ch = this.dao.existChannel(log.getCpid(), log.getSpid());
                    this.service.BillRetry4(ch, log);
                }
            }
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        GDtencentBillRetryJob.log.info((Object)("\u91cd\u65b0\u5bf9\u8d26\u65f6\u957f====" + (System.currentTimeMillis() - stime)));
    }
}