package com.fastbee.iot.service.impl;

import cn.hutool.core.date.DateTime;
import com.fastbee.iot.mapper.DeviceMapper;
import com.fastbee.iot.service.IDeviceActivationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 设备激活Service业务层处理
 */
@Service
public class DeviceActivationServiceImpl implements IDeviceActivationService
{
   @Autowired
   private DeviceMapper deviceMapper;

   @Override
   public int selectDevice(String serialNumber,Long tenantId,String tenantName,double longitude,double latitude,String imgUrl)
   {
      //获取激活时间/更新时间
      DateTime activationTime=DateTime.now();

      return deviceMapper.updateDeviceActivationStatus(serialNumber,activationTime,tenantId,tenantName,longitude,latitude,imgUrl);
   }
}
