package com.njcn.executor.handler;

import com.njcn.common.pojo.constant.BizParamConstant;
import com.njcn.executor.utils.CommonExecutorUtils;
import com.njcn.prepare.harmonic.api.newalgorithm.RMpMonitorEvaluateFeignClient;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * 类的介绍：
 *
 * @author xuyang
 * @version 1.0.0
 * @createTime 2023/7/26 9:30
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class RMpMonitorEvaluateJob {

    private final RMpMonitorEvaluateFeignClient rMpMonitorEvaluateFeignClient;

    @XxlJob("rMpMonitorEvaluate")
    public void rMpMonitorEvaluate(){
        log.info(LocalDateTime.now()+"监测点评价_日统计调度开始------------------------");
        LineParam lineParam = new LineParam();
        lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_DAY));
        lineParam.setDataDate(CommonExecutorUtils.prepareTimeDeal(BizParamConstant.STAT_BIZ_DAY));
        lineParam.setDataSource(2);
        rMpMonitorEvaluateFeignClient.handlerMonitorEvaluate(lineParam);
    }

}
