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
2c1aa1f7
authored
Nov 15, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:修复bug
parent
359893b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 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 @
2c1aa1f7
...
@@ -407,12 +407,14 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -407,12 +407,14 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
modifyWifiInfo
(
PlatDeviceSetupDTO
dto
)
{
public
void
modifyWifiInfo
(
PlatDeviceSetupDTO
dto
)
{
PlatDeviceOther
other
=
platDeviceOtherService
.
getOne
(
new
QueryWrapper
<
PlatDeviceOther
>().
lambda
()
List
<
PlatDeviceOther
>
platDeviceOtherList
=
platDeviceOtherService
.
list
(
new
QueryWrapper
<
PlatDeviceOther
>().
lambda
()
.
eq
(
PlatDeviceOther:
:
getDeviceId
,
dto
.
getId
()));
.
eq
(
PlatDeviceOther:
:
getDeviceId
,
dto
.
getId
()));
other
.
setWifiName
(
dto
.
getWifiName
());
for
(
PlatDeviceOther
other
:
platDeviceOtherList
)
{
other
.
setWifiPassword
(
dto
.
getWifiPassword
());
other
.
setWifiName
(
dto
.
getWifiName
());
platDeviceOtherService
.
updateById
(
other
);
other
.
setWifiPassword
(
dto
.
getWifiPassword
());
platDeviceOtherService
.
updateById
(
other
);
}
}
}
/**
/**
...
@@ -524,13 +526,14 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -524,13 +526,14 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if
(
StringUtils
.
isNotEmpty
(
result
))
{
if
(
StringUtils
.
isNotEmpty
(
result
))
{
resultList
.
add
(
result
);
resultList
.
add
(
result
);
}
}
PlatDeviceOther
other
=
platDeviceOtherService
.
getOne
(
new
QueryWrapper
<
PlatDeviceOther
>().
lambda
()
List
<
PlatDeviceOther
>
otherList
=
platDeviceOtherService
.
list
(
new
QueryWrapper
<
PlatDeviceOther
>().
lambda
()
.
eq
(
PlatDeviceOther:
:
getOriDeviceId
,
deviceId
)
.
eq
(
PlatDeviceOther:
:
getOriDeviceId
,
deviceId
)
.
last
(
"limit 1"
));
.
last
(
"limit 1"
));
if
(
other
!=
null
)
{
for
(
PlatDeviceOther
platDeviceOther
:
otherList
)
{
o
ther
.
setAttribute
(
JSON
.
toJSONString
(
map
));
platDeviceO
ther
.
setAttribute
(
JSON
.
toJSONString
(
map
));
platDeviceOtherService
.
updateById
(
o
ther
);
platDeviceOtherService
.
updateById
(
platDeviceO
ther
);
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
resultList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
resultList
))
{
throw
new
RuntimeException
(
"修改设备属性失败:"
+
resultList
.
get
(
0
));
throw
new
RuntimeException
(
"修改设备属性失败:"
+
resultList
.
get
(
0
));
...
...
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