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 58261a70
authored
Apr 26, 2021
by
fz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.车钥匙修改自动感应接口,mac存在就更新蓝牙地址,不存在则新增
1 parent
ca5829af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
src/main/java/com/glsx/smart/service/impl/AiLockingKeyServiceImpl.java
src/main/java/com/glsx/smart/service/impl/AiLockingKeyServiceImpl.java
View file @
58261a7
...
@@ -227,15 +227,18 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
...
@@ -227,15 +227,18 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
List
<
SmartVehicleBlueKey
>
blueKeys
=
smartVehicleBlueKeyService
.
selectByExample
(
getBlueKeyExampleByUserAndSn
(
userId
,
sn
));
List
<
SmartVehicleBlueKey
>
blueKeys
=
smartVehicleBlueKeyService
.
selectByExample
(
getBlueKeyExampleByUserAndSn
(
userId
,
sn
));
if
(
CollectionUtils
.
isEmpty
(
blueKeys
))
if
(
CollectionUtils
.
isEmpty
(
blueKeys
))
return
R
.
error
(
"车钥匙不存在"
);
return
R
.
error
(
"车钥匙不存在"
);
SmartVehicleBlueKey
blueKey
=
blueKeys
.
get
(
0
);
long
carKeyId
=
blueKey
.
getId
();
long
carKeyId
=
blueKeys
.
get
(
0
).
getId
();
//根据车钥匙id,蓝牙查询是否存在
SmartKeyBlueSenseExample
example
=
new
SmartKeyBlueSenseExample
();
//根据车钥匙id查询蓝牙信息
example
.
createCriteria
()
SmartKeyBlueSenseExample
example
=
getBlueSenseExampleByCarKeyID
(
carKeyId
);
.
andCarKeyIdEqualTo
(
carKeyId
)
.
andMobileBlueMacEqualTo
(
mobileMac
)
.
andIsDeleteEqualTo
(
0
);
List
<
SmartKeyBlueSense
>
blueSenseList
=
smartKeyBlueSenseService
.
selectByExample
(
example
);
List
<
SmartKeyBlueSense
>
blueSenseList
=
smartKeyBlueSenseService
.
selectByExample
(
example
);
if
(
CollectionUtils
.
isEmpty
(
blueSenseList
))
{
if
(
CollectionUtils
.
isEmpty
(
blueSenseList
))
{
//不存在,新增手机蓝牙,感应状态数据
//不存在,新增手机蓝牙,感应状态数据
SmartKeyBlueSense
blueSense
=
SmartKeyBlueSense
.
builder
()
SmartKeyBlueSense
blueSense
=
SmartKeyBlueSense
.
builder
()
...
...
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