获取车辆绑定的围栏对象Bean容器

master
ZhiShuo_Lou 2023-11-30 14:37:31 +08:00
parent 7c8b125043
commit 31d1a53f78
1 changed files with 4 additions and 3 deletions

View File

@ -35,6 +35,7 @@ public class CarFenceMonitor {
@Autowired @Autowired
private RedisService redisService; private RedisService redisService;
@Bean @Bean
public void getCarFencesList(){ public void getCarFencesList(){
log.info("开始获取车辆围栏信息"); log.info("开始获取车辆围栏信息");
@ -63,11 +64,11 @@ public class CarFenceMonitor {
throw new RuntimeException("该车辆未绑定围栏"); throw new RuntimeException("该车辆未绑定围栏");
} }
//容器 //围栏对象集合
List<String> locationList = new ArrayList<>(); List<Fence> locationList = new ArrayList<>();
for (Fence row : rows) { for (Fence row : rows) {
locationList.add(row.getFenceLocation()); locationList.add(row);
} }
//存储redis //存储redis