package com.corewing.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.corewing.app.entity.Firmware;
import com.corewing.app.mapper.FirmwareMapper;
import com.corewing.app.service.FirmwareService;
import org.springframework.stereotype.Service;

/**
 * 固件 Service 实现类
 */
@Service
public class FirmwareServiceImpl extends ServiceImpl<FirmwareMapper, Firmware> implements FirmwareService {

    @Override
    public Firmware getByFirmwareName(String firmwareName) {
        LambdaQueryWrapper<Firmware> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(Firmware::getFirmwareName, firmwareName);
        return this.getOne(wrapper);
    }
}
