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.RStatDevSignalFeignClient;
import com.njcn.prepare.harmonic.pojo.param.DeviceParam;
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 wr
 * @description
 * @date 2023/9/28 9:46
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class RStatDevSignalJob {

    private final RStatDevSignalFeignClient rStatDevSignalFeignClient;
    @XxlJob("rStatDevSignalDay")
    public void rStatDevSignalDay(){
        log.info(LocalDateTime.now()+"终端通信管理_日统计------------------------");
        DeviceParam deviceParam = new DeviceParam();
        deviceParam.setDataDate(CommonExecutorUtils.prepareTimeDeal(BizParamConstant.STAT_BIZ_DAY));
        CommonExecutorUtils.commDefineDateObj(BizParamConstant.STAT_BIZ_DAY,deviceParam);
        rStatDevSignalFeignClient.rstatdevsignalHandler(deviceParam);
    }
}
