package com.ifish.serviceImpl;

import com.ifish.dao.AliyunDeviceInfoDao;
import com.ifish.entity.AliyunDeviceInfo;
import com.ifish.service.AliyunDeviceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author: yan.y
 * @Description:
 * @Date: Created in 22:29 2019/5/20
 */
@Service
@Transactional
public class AliyunDeviceInfoServiceImpl implements AliyunDeviceInfoService {

    @Autowired
    private AliyunDeviceInfoDao aliyunDeviceInfoDao;

    @Override
    public AliyunDeviceInfo getAliyunDeviceInfo(String deviceId) {
        AliyunDeviceInfo aliyunDeviceInfo = aliyunDeviceInfoDao.get(deviceId);
        return aliyunDeviceInfo;
    }

    @Override
    public void saveOrUpdateAliyunDeviceInfo(AliyunDeviceInfo aliyunDeviceInfo) {
        this.aliyunDeviceInfoDao.saveOrUpdate(aliyunDeviceInfo);
    }

}
