Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
荆蔚杰
/
java.archive
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f6e6517d
authored
2021-12-13 10:07:43 +0800
by
荆蔚杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
目录保存修改逻辑调整
1 parent
d4499e93
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
src/main/java/com/pashanhoo/archive/service/impl/DgArchivesServiceImpl.java
src/main/java/com/pashanhoo/archive/service/impl/DgArchivesServiceImpl.java
View file @
f6e6517
...
...
@@ -250,7 +250,10 @@ public class DgArchivesServiceImpl extends ServiceImpl<DgArchivesMapper, DgArchi
List
<
UpdateDgArchivesCatalogRequest
>
updateCatalogs
=
requests
.
stream
().
filter
(
item
->
!
StrUtil
.
isNullOrUndefined
(
item
.
getBsmCatalog
())).
collect
(
Collectors
.
toList
());
List
<
UpdateDgArchivesCatalogRequest
>
addCatalogs
=
requests
.
stream
().
filter
(
item
->
StrUtil
.
isNullOrUndefined
(
item
.
getBsmCatalog
())).
collect
(
Collectors
.
toList
());
boolean
flag
=
false
;
//存量数据更新.
if
(
updateCatalogs
.
size
()
!=
0
)
{
String
bsmArchive
=
updateCatalogs
.
stream
().
map
(
UpdateDgArchivesCatalogRequest:
:
getBsmArchives
).
findFirst
().
orElse
(
null
);
QueryWrapper
<
DgArchivesCatalogDO
>
catalogWrapper
=
new
QueryWrapper
<>();
catalogWrapper
.
lambda
().
eq
(
DgArchivesCatalogDO:
:
getBsmArchives
,
bsmArchive
);
...
...
@@ -270,12 +273,13 @@ public class DgArchivesServiceImpl extends ServiceImpl<DgArchivesMapper, DgArchi
catalogService
.
remove
(
catalogWrapper
);
}
List
<
DgArchivesCatalogDO
>
updateCatalogDOs
=
catalogConverter
.
updateList2DO
(
updateCatalogs
);
boolean
flag
=
catalogService
.
updateBatchById
(
updateCatalogDOs
);
flag
=
catalogService
.
updateBatchById
(
updateCatalogDOs
);
}
if
(
addCatalogs
.
size
()
!=
0
)
{
//新增数据
List
<
DgArchivesCatalogDO
>
addCatalogDOs
=
catalogConverter
.
updateList2DO
(
addCatalogs
);
return
catalogService
.
saveBatch
(
addCatalogDOs
);
flag
=
catalogService
.
saveBatch
(
addCatalogDOs
);
}
return
flag
;
...
...
Please
register
or
sign in
to post a comment