apzl_leasing/src_tenwa/quartz/CGBOnlineBankingTransactionRecordsPullJob.java
2023-09-11 18:27:45 +08:00

38 lines
1.2 KiB
Java

package quartz;
import com.tenwa.cgb.conf.CGBconfProperties;
import com.tenwa.cgbbank.service.CGBBankService;
import com.tenwa.util.GlobalConst;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
/**
* @program: apzl_leasing
* @description: 拉取广发银行网银流水
* @author: 李超杰
* @create: 2023-06-06 16:23
*/
public class CGBOnlineBankingTransactionRecordsPullJob implements Job {
private static Log log = LogFactory.getLog(CGBBankService.class);
private static CGBBankService cgbBankService = CGBBankService.getInstance();
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
String yesterday = LocalDate.now().format(GlobalConst.dateFormatterNone);
try {
cgbBankService.startProcess(CGBconfProperties.OWNACCNUMBER, yesterday);
} catch (Throwable e) {
log.error("定时任务拉取广发银行网银流水失败!拉取日期:" + yesterday + ",本方账号:" + CGBconfProperties.OWNACCNUMBER, e);
}
}
}