Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
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
a13e9404
authored
Dec 21, 2023
by
罗志长
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 设备编辑优化
parent
da65198c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
a13e9404
...
...
@@ -618,6 +618,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
PlatDeviceBaseAttrDTO
platDeviceBaseAttrDTO
=
getPlatDeviceBaseAttrDTO
(
deviceId
);
String
reqJson
=
JSON
.
toJSONString
(
dto
);
Map
<
String
,
Object
>
map
=
getReqMap
(
dto
,
platDeviceBaseAttrDTO
);
if
(
map
.
isEmpty
())
{
return
;
}
log
.
info
(
"写入设备属性请求参数:{}"
,
reqJson
);
String
result
=
devicePropertiesOperateService
.
deviceWriteAttr
(
deviceId
,
map
);
if
(
StringUtils
.
isNotEmpty
(
result
))
{
...
...
@@ -748,6 +751,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
for
(
String
deviceId
:
deviceIdList
)
{
PlatDeviceBaseAttrDTO
platDeviceBaseAttrDTO
=
getPlatDeviceBaseAttrDTO
(
deviceId
);
Map
<
String
,
Object
>
map
=
getReqMap
(
dto
,
platDeviceBaseAttrDTO
);
if
(
map
.
isEmpty
())
{
continue
;
}
String
result
=
devicePropertiesOperateService
.
deviceWriteAttr
(
deviceId
,
map
);
if
(
StringUtils
.
isNotEmpty
(
result
))
{
throw
new
RuntimeException
(
"修改设备属性失败:"
+
result
);
...
...
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