package cn.com.ctop.job.kuaishou.handler;

import cn.com.ctop.common.module.utils.HttpUtils2;
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupTemplateService;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 清洗外部素材集信息表
 */
@Component
@Slf4j
public class ExternalMaterialCollectionJob {

    @Value("${xxl-job.requestUrl}")
    private String jobUrl;

    /**
     * 快手自动创建组
     */
    @XxlJob("externalMaterialCollectionJob")
    public void execute() {
        String url = jobUrl + "/jeecg-boot/external/materialCollection/createInternalMaterial";
        log.info("请求地址：{}", url);
        try {
            HttpUtils2.httpGet(url, null, null);
        } catch (Exception e) {
            XxlJobHelper.log(e.getMessage());
        }
    }
}
