package com.njcn.system.timer.tasks;

import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.device.pms.api.MonitorSendClient;
import com.njcn.device.pms.pojo.param.MonitorParam;
import com.njcn.system.pojo.vo.DictTreeVO;
import com.njcn.system.service.SysDicTreePOService;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 *
 */
@Component
@RequiredArgsConstructor
public class MonitorSendOtherUserTaskRunner implements TimerTaskRunner {

    private final MonitorSendClient monitorSendClient;

    @Override
    public void action(String date) {
        //干扰用户
        MonitorParam.Info param = new MonitorParam.Info();
        param.setObjType("987654321");
        param.setFiy(true);
        String code = monitorSendClient.windSend(param).getCode();
        if(code.equals("A0002")){
            throw new BusinessException("失败");
        }
    }
}
