package com.jiayue.passback.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiayue.passback.entity.WindTowerInfo;
import com.jiayue.passback.mapper.WindTowerInfoMapper;
import com.jiayue.passback.service.WindTowerInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WindTowerInfoServiceImpl extends ServiceImpl<WindTowerInfoMapper, WindTowerInfo> implements WindTowerInfoService {
    @Override
    public int WindTowerInfoInfoId() {
        int id = 0;

        List<WindTowerInfo> WindTowerInfoList = list(lambdaQuery().eq(WindTowerInfo::getReport, true).getWrapper());

        if (WindTowerInfoList.size() > 0) {
            id = WindTowerInfoList.get(0).getId();
        }

        return id;
    }
}
