package com.red.circle.other.app.service.user.device;

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.other.app.command.user.UploadLatestDeviceCmdExe;
import com.red.circle.other.app.command.user.query.DeviceCheckAvailableQryExe;
import com.red.circle.other.app.dto.cmd.user.user.UploadDeviceCmd;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * 设备服务 实现.
 *
 * @author pengliang on 2023/5/31
 */
@Service
@RequiredArgsConstructor
public class DeviceServiceImpl implements DeviceService {

  private static final Logger log = LoggerFactory.getLogger(DeviceServiceImpl.class);
  private final UploadLatestDeviceCmdExe uploadLatestDeviceCmdExe;
  private final DeviceCheckAvailableQryExe deviceCheckAvailableQryExe;

  @Override
  public void uploadLatestDevice(UploadDeviceCmd cmd) {
    uploadLatestDeviceCmdExe.execute(cmd);
  }

  @Override
  public String checkAvailable(AppExtCommand cmd) {
    return deviceCheckAvailableQryExe.execute(cmd);
  }

}
