package com.ycl.service.smoke.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ycl.entity.caseHandler.WorkflowConfigStep; import com.ycl.entity.smoke.OdsStatistics; import com.ycl.mapper.smoke.OdsStatisticsMapper; import com.ycl.service.smoke.IOdsStatisticsService; import org.springframework.stereotype.Service; import java.util.List; /** *

* 报警消息 服务实现类 *

* * @author lyq * @since 2023-02-28 */ @Service public class OdsStatisticsServiceImpl extends ServiceImpl implements IOdsStatisticsService { @Override public OdsStatistics getByType(String typeName) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper().eq(OdsStatistics::getTypeName, typeName).orderByDesc(OdsStatistics::getId); List list = this.list(queryWrapper); if (list.size() > 0) { return list.get(0); } return null; } }