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 1a828c92
authored
Apr 24, 2021
by
fz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.保存注册信息,如果蓝牙地址有则更新,没有新增
1 parent
6daadf20
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
src/main/java/com/glsx/smart/service/impl/AiLockingKeyServiceImpl.java
src/main/java/com/glsx/smart/service/impl/AiLockingKeyServiceImpl.java
View file @
1a828c9
...
@@ -304,23 +304,19 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
...
@@ -304,23 +304,19 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
//转化为sn,蓝牙感应数据
//转化为sn,蓝牙感应数据
Map
<
String
,
SmartKeyBlueSense
>
blueSenseListMap
=
new
HashMap
<>();
Map
<
String
,
SmartKeyBlueSense
>
blueSenseListMap
=
new
HashMap
<>();
smartKeyBlueSenseList
.
stream
().
forEach
(
blueSense
->
{
smartKeyBlueSenseList
.
stream
().
forEach
(
blueSense
->
{
//设备号
//设备号
String
sn
=
blueSense
.
getSn
();
String
sn
=
blueSense
.
getSn
();
Date
time1
=
blueSense
.
getCreateTime
();
SmartKeyBlueSense
data
=
null
;
if
(
blueSenseListMap
.
containsKey
(
sn
))
{
if
(
blueSenseListMap
.
containsKey
(
sn
))
{
data
=
blueSenseListMap
.
get
(
sn
);
if
(
blueSense
.
getCreateTime
().
after
(
blueSenseListMap
.
get
(
sn
).
getCreateTime
())){
if
(
time1
.
after
(
data
.
getCreateTime
()))
blueSenseListMap
.
put
(
sn
,
blueSense
);
data
.
setCreateTime
(
time1
);
}
}
else
{
}
else
{
//第一次
blueSenseListMap
.
put
(
sn
,
blueSense
);
data
=
new
SmartKeyBlueSense
();
data
.
setCreateTime
(
time1
);
}
}
blueSenseListMap
.
put
(
sn
,
data
);
});
});
blueSenseListMap
.
entrySet
().
stream
().
forEach
(
s
->
log
.
info
(
"getAllKeyByUser2=====key:"
+
s
.
getKey
()
+
"===mac:"
+
s
.
getValue
().
getMobileBlueMac
()));
blueSenseListMap
.
entrySet
().
stream
().
forEach
(
s
->
log
.
info
(
"getAllKeyByUser2=====key:"
+
s
.
getKey
()
+
"===mac:"
+
s
.
getValue
().
getMobileBlueMac
()));
...
...
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