Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liqin
chnmuseum-party
Commits
658a7841
Commit
658a7841
authored
Apr 19, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
d785d73a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
12 deletions
+18
-12
CopyrightOwnerController.java
...museum/party/web/controller/CopyrightOwnerController.java
+7
-4
ExhibitionBoardCatController.java
...um/party/web/controller/ExhibitionBoardCatController.java
+7
-4
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+4
-4
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/CopyrightOwnerController.java
View file @
658a7841
...
...
@@ -308,12 +308,15 @@ public class CopyrightOwnerController extends BaseController {
final
LambdaQueryWrapper
<
LearningContentCopyrightOwner
>
learningContentCopyrightOwnerLambdaQueryWrapper
=
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaQuery
().
eq
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
,
id
);
final
List
<
LearningContentCopyrightOwner
>
learningContentCopyrightOwnerList
=
this
.
learningContentCopyrightOwnerService
.
list
(
learningContentCopyrightOwnerLambdaQueryWrapper
);
if
(
learningContentCopyrightOwnerList
!=
null
&&
!
learningContentCopyrightOwnerList
.
isEmpty
())
{
final
Map
<
String
,
List
<
String
>>
collect
=
learningContentCopyrightOwnerList
.
stream
().
collect
(
Collectors
.
groupingBy
(
LearningContentCopyrightOwner:
:
getLearningContentId
,
Collectors
.
mapping
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
,
Collectors
.
toList
())));
collect
.
forEach
((
k
,
v
)
->
{
if
(
v
.
size
()
==
1
)
{
this
.
learningContentService
.
removeById
(
k
);
}
});
LambdaUpdateWrapper
<
LearningContentCopyrightOwner
>
deleteWrapper2
=
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaUpdate
().
eq
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
,
id
);
this
.
learningContentCopyrightOwnerService
.
remove
(
deleteWrapper2
);
if
(
learningContentCopyrightOwnerList
.
size
()
==
1
)
{
this
.
learningContentService
.
removeById
(
learningContentCopyrightOwnerList
.
get
(
0
).
getLearningContentId
());
}
}
return
getSuccessResult
();
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardCatController.java
View file @
658a7841
...
...
@@ -210,12 +210,15 @@ public class ExhibitionBoardCatController extends BaseController {
final
LambdaQueryWrapper
<
LearningContentBoardCat
>
learningContentBoardCatLambdaQueryWrapper
=
Wrappers
.<
LearningContentBoardCat
>
lambdaQuery
().
eq
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
,
id
);
final
List
<
LearningContentBoardCat
>
learningContentBoardCatList
=
this
.
learningContentBoardCatService
.
list
(
learningContentBoardCatLambdaQueryWrapper
);
if
(
learningContentBoardCatList
!=
null
&&
!
learningContentBoardCatList
.
isEmpty
())
{
final
Map
<
String
,
List
<
String
>>
collect
=
learningContentBoardCatList
.
stream
().
collect
(
Collectors
.
groupingBy
(
LearningContentBoardCat:
:
getLearningContentId
,
Collectors
.
mapping
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
,
Collectors
.
toList
())));
collect
.
forEach
((
k
,
v
)
->
{
if
(
v
.
size
()
==
1
)
{
this
.
learningContentService
.
removeById
(
k
);
}
});
LambdaUpdateWrapper
<
LearningContentBoardCat
>
deleteWrapper1
=
Wrappers
.<
LearningContentBoardCat
>
lambdaUpdate
().
eq
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
,
id
);
this
.
learningContentBoardCatService
.
remove
(
deleteWrapper1
);
if
(
learningContentBoardCatList
.
size
()
==
1
)
{
this
.
learningContentService
.
removeById
(
learningContentBoardCatList
.
get
(
0
).
getLearningContentId
());
}
}
LambdaUpdateWrapper
<
LearningContentBoard
>
deleteWrapper2
=
Wrappers
.<
LearningContentBoard
>
lambdaUpdate
().
eq
(
LearningContentBoard:
:
getExhibitionBoardCatId
,
id
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningContentController.java
View file @
658a7841
...
...
@@ -316,8 +316,8 @@ public class LearningContentController extends BaseController {
final
LambdaQueryWrapper
<
LearningContentBoardCat
>
queryWrapper
=
Wrappers
.<
LearningContentBoardCat
>
lambdaQuery
().
eq
(
LearningContentBoardCat:
:
getLearningContentId
,
id
);
queryWrapper
.
select
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
);
final
List
<
String
>
exhibitionBoardCatIdList
=
this
.
learningContentBoardCatService
.
listObjs
(
queryWrapper
,
Object:
:
toString
);
if
(!
exhibitionBoardCatIdList
.
isEmpty
())
{
final
List
<
ExhibitionBoardCat
>
exhibitionBoardCats
=
this
.
exhibitionBoardCatService
.
listByIds
(
exhibitionBoardCatIdList
);
if
(!
exhibitionBoardCats
.
isEmpty
())
{
learningContent
.
setExhibitionBoardCatIdList
(
exhibitionBoardCats
.
stream
().
map
(
ExhibitionBoardCat:
:
getId
).
collect
(
Collectors
.
toList
()));
learningContent
.
setExhibitionBoardCatNameList
(
exhibitionBoardCats
.
stream
().
map
(
ExhibitionBoardCat:
:
getName
).
collect
(
Collectors
.
toList
()));
}
...
...
@@ -325,8 +325,8 @@ public class LearningContentController extends BaseController {
final
LambdaQueryWrapper
<
LearningContentCopyrightOwner
>
queryWrapper1
=
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaQuery
().
eq
(
LearningContentCopyrightOwner:
:
getLearningContentId
,
id
);
queryWrapper1
.
select
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
);
final
List
<
String
>
copyrightOwnerIdList
=
this
.
learningContentCopyrightOwnerService
.
listObjs
(
queryWrapper1
,
Object:
:
toString
);
if
(!
copyrightOwnerIdList
.
isEmpty
())
{
final
List
<
CopyrightOwner
>
copyrightOwnerList
=
this
.
copyrightOwnerService
.
listByIds
(
copyrightOwnerIdList
);
if
(!
copyrightOwnerList
.
isEmpty
())
{
learningContent
.
setCopyrightOwnerIdList
(
copyrightOwnerList
.
stream
().
map
(
CopyrightOwner:
:
getId
).
collect
(
Collectors
.
toList
()));
learningContent
.
setCopyrightOwnerNameList
(
copyrightOwnerList
.
stream
().
map
(
CopyrightOwner:
:
getName
).
collect
(
Collectors
.
toList
()));
}
...
...
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