package com.ho.business.service.impl;

import com.ho.business.entity.DeviceType;
import com.ho.business.mapper.DeviceTypeMapper;
import com.ho.business.service.DeviceTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;
import java.util.Set;

/**
 * @Description 针对表【device_type】的数据库操作Service实现
 * Author yule
 * Date 2022/8/31 11:10
 */
@Service
public class DeviceTypeServiceImpl implements DeviceTypeService {

    @Autowired
    private DeviceTypeMapper deviceTypeMapper;

    @Override
    public List<DeviceType> selectAll() {
        List<DeviceType> deviceTypes = deviceTypeMapper.selectAll();
        return deviceTypes;
    }


    @Override
    public DeviceType getOne(Integer pid) {
        DeviceType deviceType = deviceTypeMapper.selectByPid(pid);
        return deviceType;
    }

    @Override
    public List<DeviceType> selectByIds(List<Integer> typeIds) {
        List<DeviceType> deviceTypes = deviceTypeMapper.selectByIds(typeIds);
        return deviceTypes;
    }


    @Override
    public List<DeviceType> selectByPids(Set<Integer> pIds) {
        List<DeviceType> deviceTypes = deviceTypeMapper.selectByPids(pIds);
        return deviceTypes;
    }

    @Override
    public DeviceType selectByDeviceType(String deviceType) {
        DeviceType device = deviceTypeMapper.selectByDeviceType(deviceType);
        return device;
    }

    @Override
    public List<DeviceType> selectName(List<String> deviceTypeList) {
        List<DeviceType> deviceTypes = deviceTypeMapper.selectName(deviceTypeList);
        return deviceTypes;
    }

}

