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
111b5aa5
authored
Nov 15, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:配网bug
parent
178103e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
17 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 @
111b5aa5
...
@@ -327,14 +327,6 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -327,14 +327,6 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
id
=
db
.
getId
();
id
=
db
.
getId
();
PlatDeviceOther
other
=
platDeviceOtherService
.
getOne
(
new
QueryWrapper
<
PlatDeviceOther
>().
lambda
()
.
eq
(
PlatDeviceOther:
:
getOriDeviceId
,
dto
.
getOriDeviceId
()));
if
(
other
==
null
)
{
other
=
new
PlatDeviceOther
();
}
String
otherId
=
other
.
getId
();
String
tenantId
=
db
.
getTenantId
();
String
tenantId
=
db
.
getTenantId
();
BeanUtils
.
copyProperties
(
dto
,
db
);
BeanUtils
.
copyProperties
(
dto
,
db
);
db
.
setId
(
id
);
db
.
setId
(
id
);
...
@@ -342,17 +334,16 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -342,17 +334,16 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
db
.
setOrgId
(
dto
.
getOrgId
());
db
.
setOrgId
(
dto
.
getOrgId
());
saveOrUpdate
(
db
);
saveOrUpdate
(
db
);
id
=
db
.
getId
();
id
=
db
.
getId
();
deviceCacheUtil
.
put
(
db
);
deviceCacheUtil
.
put
(
db
);
BeanUtils
.
copyProperties
(
dto
,
other
);
List
<
PlatDeviceOther
>
platDeviceOtherList
=
platDeviceOtherService
.
list
(
new
QueryWrapper
<
PlatDeviceOther
>().
lambda
()
other
.
setId
(
otherId
);
.
eq
(
PlatDeviceOther:
:
getOriDeviceId
,
dto
.
getOriDeviceId
())
);
other
.
setDeviceId
(
id
);
for
(
PlatDeviceOther
platDeviceOther
:
platDeviceOtherList
)
{
other
.
setOriDeviceId
(
db
.
getOriDeviceId
()
);
BeanUtils
.
copyProperties
(
dto
,
platDeviceOther
,
"id"
);
platDeviceOther
.
setDeviceId
(
id
);
platDeviceOtherService
.
saveOrUpdate
(
other
);
platDeviceOther
.
setOriDeviceId
(
db
.
getOriDeviceId
()
);
platDeviceOtherService
.
saveOrUpdate
(
platDeviceOther
);
}
}
}
@Override
@Override
...
...
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