类名更改

master
Yang Haoyu 2023-12-05 14:02:14 +08:00
parent 4989a4079f
commit 0d3a168645
1 changed files with 4 additions and 1 deletions

View File

@ -38,7 +38,10 @@ public class RunnerAfter implements ApplicationRunner {
public void run(ApplicationArguments args) throws Exception {
log.info("启动初始化车辆数据到Redis");
List<Car> carList = vehicleMapper.selectVehicleInfoList(null);
Map<String, Car> collect = carList.stream().collect(Collectors.toMap(Car::getCarVin, car -> car));
Map<String, Car> collect =
carList.stream().collect(
Collectors.toMap(
Car::getCarVin, car -> car));
redisTemplate.opsForHash().putAll(VehicleConstant.VEHICLE_INFO_MAP, collect);
}
}