package com.mortals.xhx.common.utils;

import com.mortals.xhx.common.code.DeviceMethodEnum;
import com.mortals.xhx.module.device.model.DeviceEntity;
import com.mortals.xhx.module.device.service.DeviceService;
import com.mortals.xhx.module.platform.model.PlatformEntity;
import com.mortals.xhx.module.product.model.ProductEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 发送任务
 *
 * @author: zxfei
 * @date: 2022/4/28 10:56
 * @description:
 **/
@Slf4j
@AllArgsConstructor
public class SendThirdPartyTask implements Runnable {
    private DeviceEntity deviceEntity;
    private ProductEntity productEntity;
    private PlatformEntity platformEntity;
    private DeviceService deviceService;

    @Override
    public void run() {
        deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceMethodEnum.ONLINE);
    }
}
