Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e435f661
authored
May 10, 2021
by
fz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.根据用户查询钥匙,过滤掉没有保存注册信息的
1 parent
36e187f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
src/main/java/com/glsx/smart/service/impl/AiLockingKeyServiceImpl.java
src/main/java/com/glsx/smart/service/impl/AiLockingKeyServiceImpl.java
View file @
e435f66
...
...
@@ -368,12 +368,8 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
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,查询蓝牙,感应列表
List
<
Long
>
carKeyIds
=
keyList
.
stream
().
map
(
SmartVehicleBlueKey:
:
getId
).
collect
(
Collectors
.
toList
());
...
...
@@ -381,7 +377,7 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
//如果用户下没有蓝牙记录
if
(
CollectionUtils
.
isEmpty
(
smartKeyBlueSenseList
))
{
return
R
.
ok
().
data
(
responseList
);
return
R
.
ok
().
data
(
null
);
}
//转化为sn,蓝牙感应数据
...
...
@@ -408,10 +404,13 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
SmartKeyBlueSense
blueSense
=
blueSenseListMap
.
get
(
sn
);
response
.
setMobileBlueMac
(
blueSense
.
getMobileBlueMac
());
response
.
setAutoSenseStatus
(
blueSense
.
getAutoSenseStatus
());
if
(
StringUtils
.
isNotBlank
(
response
.
getSecretKey
())
&&
StringUtils
.
isNotBlank
(
response
.
getSecretKey
()))
validList
.
add
(
response
);
}
});
return
R
.
ok
().
data
(
response
List
);
return
R
.
ok
().
data
(
valid
List
);
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment