package com.zfire.jiasm.syncdata.upload.order;

import com.zfire.jiasm.syncdata.constant.TaskConfigEnum;
import com.zfire.jiasm.syncdata.service.RepairProduceUploadListService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 生成上传任务清单 out_jiasm_to_gree_upload_task_list
 * 1:从需要上传的订单数据表中提取数据 out_jiasm_to_gree_uploadnotifylist
 *:2:对应表中提取表中数据 生成上传任务清单 out_jiasm_to_gree_upload_task_list
 */
@Slf4j
@Component
public class RepairProduceUploadList {
    @Value("${wxuploadscc}")
    private String wxuploadscc = "";

    @Autowired
    RepairProduceUploadListService repairProduceUploadListService;


    @Scheduled(fixedDelayString = "${wxuploadsc}")
    private void produceList() throws Exception {
        if (wxuploadscc.equals(TaskConfigEnum.FALSE.getCode())){
            return;
        }

        repairProduceUploadListService.processproduceList();
    }



}
