package cn.pluss.platform.device.impl;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.pluss.platform.entity.Device;
import cn.pluss.platform.device.DeviceService;
import cn.pluss.platform.mapper.DeviceMapper;

@Transactional
@Service("deviceService")
public class DeviceServiceImpl extends ServiceImpl<DeviceMapper,Device> implements DeviceService{

	 private static final Logger logger = LoggerFactory.getLogger( DeviceServiceImpl.class);


    @Autowired
	  private DeviceMapper deviceMapper;

    @Override
    public Device queryDevice(Device device){
        return deviceMapper.queryDevice(device);
    }

    @Override
    public List<Device> queryDeviceList(Device device){
        return deviceMapper.queryDeviceList(device);
    }
    @Override
    public void saveDevice(Device device){
          deviceMapper.saveDevice(device);
    }
    @Override
    public void updateDevice(Device device){
        deviceMapper.updateDevice(device);
    }
    @Override
    public void deleteDevice(Device device){
        deviceMapper.deleteDevice(device);
    }
    @Override
    public List<Device> queryDevicePage(Map map){
        return deviceMapper.queryDevicePage(map);
    }
    @Override
    public Integer queryDevicePageCount(Map map){
        return deviceMapper.queryDevicePageCount(map);
    }
    @Override
    public void saveDeviceBatch(List<Device> deviceList) {
         deviceMapper.saveDeviceBatch(deviceList);
    }

    @Override
    public Page<Device> pageDate(Page<Device> page, Device device) {
        return baseMapper.pageDate(page,device);
    }

    @Override
    public Device getDeviceId(Integer id) {
        return baseMapper.getDeviceId(id);
    }
}

