package com.wsm.admin.service.impl;

import com.wsm.admin.dao.IDeviceDao;
import com.wsm.admin.model.Device;
import com.wsm.admin.service.IDeviceService;
import com.wsm.common.dao.IBaseDao;
import com.wsm.common.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DeviceServiceImpl extends BaseServiceImpl<Device, Long> implements IDeviceService {

    @Autowired
    private IDeviceDao deviceDao;

    @Override
    public IBaseDao<Device, Long> getBaseDao() {
        return this.deviceDao;
    }


    @Override
    public Device findByDeviceId16Hex(String deviceId16Hex) {
        return deviceDao.findByDeviceId16Hex(deviceId16Hex);
    }

    @Override
    public Device findByDeviceId(String deviceId) {
        return deviceDao.findByDeviceId(deviceId);
    }
}
