//停用
final String status="2";
LocalDateTime now = LocalDateTime.now();
List<String> ids = tVehicleMapper.selectList(null)
.stream() #开启流
.filter(v -> v.getTvEndDate().isBefore(now)) //过滤出该字段今日前的数据
.map(id -> id.getDataId()) //类型转换
.collect(Collectors.toList());
if (!CollUtil.isEmpty(ids)){
LambdaUpdateWrapper<TVehicle> wp=new UpdateWrapper<TVehicle>()
.lambda()
.set(TVehicle::getTvStatus,status)
.in(TVehicle::getDataId,ids);
tVehicleMapper.update(null,wp);
}