package com.zksy.audio.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zksy.audio.domain.NoiseInfo;
import com.zksy.audio.service.NoiseInfoService;
import com.zksy.audio.mapper.NoiseInfoMapper;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【noise_info(噪音信息表)】的数据库操作Service实现
* @createDate 2026-01-15 10:25:10
*/
@Service
public class NoiseInfoServiceImpl extends ServiceImpl<NoiseInfoMapper, NoiseInfo>
    implements NoiseInfoService{

    @Override
    public NoiseInfo selectNoiseInfoByDeviceNo(String deviceNo) {
        return lambdaQuery().eq(NoiseInfo::getEncode, deviceNo)
                .orderByDesc(NoiseInfo::getCreateTime)
                .last("limit 1")
                .one();
    }
}




