//package com.sunxung.factoring.job.impl;
//
//import com.sunxung.factoring.service.customerinformation.CustomerService;
//import com.sunxung.factoring.service.purchcontractmanagement.IPurchContractSupplementElectronicInfoService;
//import com.sunxung.factoring.service.purchcontractmanagement.PurchContractElectronicInfoService;
//import com.sunxung.factoring.service.settlement.SettlementElectronicInfoService;
//import com.sunxung.factoring.service.tradingPlatform.PlatformService;
//import org.apache.logging.log4j.LogManager;
//import org.apache.logging.log4j.Logger;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.scheduling.annotation.EnableScheduling;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import java.util.Date;
//
///**
// * @author liutao
// * @date 2022-07-12
// */
//@Component
//public class ShortUrlTaskJob {
//
//    private static Logger log = LogManager.getLogger(ShortUrlTaskJob.class);
//
//    @Autowired
//    private PlatformService platformService;
//
//    @Autowired
//    private CustomerService customerService;
//
//    @Autowired
//    private SettlementElectronicInfoService settlementElectronicInfoService;
//
//    @Autowired
//    private PurchContractElectronicInfoService purchContractElectronicInfoService;
//
//    @Autowired
//    private IPurchContractSupplementElectronicInfoService purchContractSupplementElectronicInfoService;
//
//    /**
//     * 短连接失效处理任务
//     */
//    @Scheduled(cron = "0 0 0 * * ?")
//    public void batchProcess() {
//        Date date = new Date();
//
//        //贸易平台
//        log.info("trading_platform表短链接失效重置任务执行开始...");
//        platformService.updateShortUrl(date);
//        log.info("trading_platform表短链接失效重置任务执行结束...");
//
//        //用户
//        log.info("contract_electronic_customer_info表短链接失效重置任务任务执行开始...");
//        customerService.updateShortUrl(date);
//        log.info("contract_electronic_customer_info表短链接失效重置任务任务执行结束...");
//
//        //结算单
//        log.info("settlement_electronic_info表短链接失效重置任务任务执行开始...");
//        settlementElectronicInfoService.updateShortUrl(date);
//        log.info("settlement_electronic_info表短链接失效重置任务任务执行结束...");
//
//        //采购合同
//        log.info("purch_contract_electronic_info表短链接失效重置任务任务执行开始...");
//        purchContractElectronicInfoService.updateShortUrl(date);
//        log.info("purch_contract_electronic_info表短链接失效重置任务任务执行结束...");
//
//        //采购合同补充合同
//        log.info("purch_contract_supplement_electronic_info表短链接失效重置任务任务执行开始...");
//        purchContractSupplementElectronicInfoService.updateShortUrl(date);
//        log.info("purch_contract_supplement_electronic_info表短链接失效重置任务任务执行结束...");
//
//    }
//
//}
