Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
glsx-smart-message-channel
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 6d8666f8
authored
May 14, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]代码规范
1 parent
700b39d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
src/main/java/cn/com/glsx/consumer/modules/service/DeviceService.java
src/main/java/cn/com/glsx/consumer/modules/service/InfoService.java
src/main/java/cn/com/glsx/consumer/modules/service/DeviceService.java
View file @
6d8666f
...
...
@@ -54,6 +54,10 @@ public class DeviceService {
R
deviceName
=
smartPlatformClient
.
getDeviceName
(
devId
);
Object
data
=
deviceName
.
getData
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
data
));
if
(
jsonObject
==
null
){
log
.
info
(
"查询设备{}名称为空"
,
devId
);
return
null
;
}
return
jsonObject
.
getString
(
"name"
);
}
}
src/main/java/cn/com/glsx/consumer/modules/service/InfoService.java
View file @
6d8666f
...
...
@@ -250,6 +250,11 @@ public class InfoService {
DeviceRequest
deviceRequest
=
new
DeviceRequest
();
DeviceEventDetailRep
bizData
=
deviceEventRep
.
getBizData
();
if
((
"bindUser"
).
equals
(
deviceEventRep
.
getBizCode
()))
{
try
{
Thread
.
sleep
(
500
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
String
name
=
deviceService
.
getDeviceName
(
bizData
.
getDevId
());
deviceRequest
.
setDeviceName
(
name
);
}
else
{
...
...
@@ -259,11 +264,7 @@ public class InfoService {
deviceRequest
.
setPlatformProductId
(
deviceEventRep
.
getProductKey
());
deviceRequest
.
setChannel
(
1
);
deviceRequest
.
setParentId
(
bizData
.
getParentDevId
());
if
((
"uylvjbk8ao1nrfjb"
).
equals
(
deviceEventRep
.
getProductKey
())){
deviceRequest
.
setType
(
bizData
.
getParentDevId
()
==
null
?
1
:
2
);
}
else
{
deviceRequest
.
setType
(
1
);
}
deviceRequest
.
setType
(
bizData
.
getParentDevId
()
==
null
?
1
:
2
);
deviceRequest
.
setDeviceId
(
bizData
.
getDevId
());
return
deviceRequest
;
}
...
...
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