mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 批量查询枪口列表
This commit is contained in:
@@ -510,7 +510,7 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
}
|
||||
// 先将已经有数据的stationId进行收集
|
||||
List<String> hasDataStationIds = new ArrayList<>(map.keySet());
|
||||
Collection<List<ConnectorInfoVO>> values = map.values();
|
||||
List<List<ConnectorInfoVO>> values = new ArrayList<>(map.values());
|
||||
// 筛选出没有数据的stationIds
|
||||
List<String> noDataStationIds = stationIds.stream()
|
||||
.filter(x -> !hasDataStationIds.contains(x))
|
||||
@@ -520,7 +520,7 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
// 通过stationIds批量查询数据库
|
||||
List<ConnectorInfoVO> newConnectorInfoList = pileConnectorInfoMapper.batchSelectConnectorList(noDataStationIds);
|
||||
if (CollectionUtils.isEmpty(values)) {
|
||||
values = new ArrayList<>();
|
||||
values = Lists.newArrayList();
|
||||
}
|
||||
values.add(newConnectorInfoList);
|
||||
|
||||
@@ -534,7 +534,8 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
List<ConnectorInfoVO> voList = entry.getValue();
|
||||
|
||||
String redisKey = baseRedisKey + stationId;
|
||||
redisCache.setCacheObject(redisKey, voList, CacheConstants.cache_expire_time_1h);
|
||||
redisCache.setCacheList(redisKey, voList);
|
||||
redisCache.expire(redisKey, CacheConstants.cache_expire_time_1h);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user