package cn.pluss.platform.device;

import cn.pluss.platform.entity.DeviceType;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 设备类型表 服务类
 * </p>
 *
 * @author Djh
 * @since 2022-03-04
 */
public interface DeviceTypeService extends IService<DeviceType> {

    default DeviceType getByCode(String code) {
        LambdaQueryWrapper<DeviceType> qWrapper = Wrappers.lambdaQuery();
        qWrapper.eq(DeviceType::getCode, code);

        return getOne(qWrapper);
    }
}
