Commit e435f661 by fz

1.根据用户查询钥匙,过滤掉没有保存注册信息的

1 parent 36e187f6
...@@ -368,12 +368,8 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService { ...@@ -368,12 +368,8 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
List<SmartCarKeyResponse> responseList = new ArrayList<>(smartCarKeyResponseMap.values()); List<SmartCarKeyResponse> responseList = new ArrayList<>(smartCarKeyResponseMap.values());
////给没有名称的钥匙设置名字
//AtomicInteger num = new AtomicInteger(1);
//responseList.stream()
// .filter(key -> StringUtils.isBlank(key.getKeyName()))
// .forEach(key -> key.setKeyName("钥匙" + num.getAndIncrement()));
List<SmartCarKeyResponse> validList = new ArrayList();
//根据用户钥匙id,查询蓝牙,感应列表 //根据用户钥匙id,查询蓝牙,感应列表
List<Long> carKeyIds = keyList.stream().map(SmartVehicleBlueKey::getId).collect(Collectors.toList()); List<Long> carKeyIds = keyList.stream().map(SmartVehicleBlueKey::getId).collect(Collectors.toList());
...@@ -381,7 +377,7 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService { ...@@ -381,7 +377,7 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
//如果用户下没有蓝牙记录 //如果用户下没有蓝牙记录
if (CollectionUtils.isEmpty(smartKeyBlueSenseList)) { if (CollectionUtils.isEmpty(smartKeyBlueSenseList)) {
return R.ok().data(responseList); return R.ok().data(null);
} }
//转化为sn,蓝牙感应数据 //转化为sn,蓝牙感应数据
...@@ -408,10 +404,13 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService { ...@@ -408,10 +404,13 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
SmartKeyBlueSense blueSense = blueSenseListMap.get(sn); SmartKeyBlueSense blueSense = blueSenseListMap.get(sn);
response.setMobileBlueMac(blueSense.getMobileBlueMac()); response.setMobileBlueMac(blueSense.getMobileBlueMac());
response.setAutoSenseStatus(blueSense.getAutoSenseStatus()); response.setAutoSenseStatus(blueSense.getAutoSenseStatus());
if(StringUtils.isNotBlank(response.getSecretKey()) && StringUtils.isNotBlank(response.getSecretKey()))
validList.add(response);
} }
}); });
return R.ok().data(responseList); return R.ok().data(validList);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!