package com.jiayue.passback.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jiayue.passback.entity.WeatherStationInfo; import com.jiayue.passback.mapper.WeatherStationInfoMapper; import com.jiayue.passback.service.WeatherStationInfoService; import org.springframework.stereotype.Service; import java.util.List; @Service public class WeatherStationInfoServiceImpl extends ServiceImpl implements WeatherStationInfoService { @Override public int weatherStationInfoId() { int id = 0; List weatherStationInfoList = list(lambdaQuery().eq(WeatherStationInfo::getReport, true).getWrapper()); if (weatherStationInfoList.size() > 0) { id = weatherStationInfoList.get(0).getId(); } return id; } }