Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-mqtt-protocol
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b2c80565
authored
Nov 17, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
mqtt协议包,兼容读写返回值
parent
540c3bfb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
src/main/java/org/jetlinks/protocol/official/JetLinksMqttDeviceMessageCodec.java
src/main/java/org/jetlinks/protocol/official/JetLinksMqttDeviceMessageCodec.java
View file @
b2c80565
...
...
@@ -234,7 +234,13 @@ public class JetLinksMqttDeviceMessageCodec implements DeviceMessageCodec {
Set
<
String
>
keySet
=
jsonObject
.
keySet
();
Map
<
String
,
Object
>
propertiesMap
=
new
HashMap
<>();
for
(
String
key
:
keySet
)
{
propertiesMap
.
put
(
key
,
((
JSONObject
)
jsonObject
.
get
(
key
)).
get
(
"value"
));
Object
value
=
((
JSONObject
)
jsonObject
.
get
(
key
)).
get
(
"value"
);
if
(
value
!=
null
&&
value
.
toString
().
equals
(
"success"
))
{
propertiesMap
.
put
(
key
,
0
);
}
else
{
propertiesMap
.
put
(
key
,
value
);
}
}
map
.
put
(
"properties"
,
propertiesMap
);
map
.
put
(
"success"
,
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment