package com.testor.module.partner.job;

import com.testor.module.partner.service.TPartnerCertificateService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * TODO 资质状态 xxl-job 修改类
 *
 * @author L
 * @version 1.0
 * @date 2022/6/30 16:23
 */
@Component
public class CertificateStatusJobHandler extends IJobHandler {

    private static final Logger logger = LoggerFactory.getLogger(CertificateStatusJobHandler.class);
    @Autowired
    private TPartnerCertificateService tPartnerCertificateService;


    @XxlJob("CertificateStatusJobHandler")
    public ReturnT<String> execute(String s) throws Exception {
        logger.info("xxl-job 编辑相关方资质，参数未：{}", s);
        tPartnerCertificateService.handleValidity();

        return ReturnT.SUCCESS;
    }

    @Override
    public void execute() throws Exception {

    }
}
