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
5433376a
Commit
5433376a
authored
Apr 27, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
58a5a42c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
22 deletions
+16
-22
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+16
-22
No files found.
src/main/java/cn/chnmuseum/party/web/controller/LearningContentController.java
View file @
5433376a
...
@@ -381,31 +381,25 @@ public class LearningContentController extends BaseController {
...
@@ -381,31 +381,25 @@ public class LearningContentController extends BaseController {
learningContent
.
setLearningProjectName
(
learningProject
.
getName
());
learningContent
.
setLearningProjectName
(
learningProject
.
getName
());
}
}
final
LambdaQueryWrapper
<
LearningContentBoardCat
>
queryWrapper
=
Wrappers
.<
LearningContentBoardCat
>
lambdaQuery
().
eq
(
LearningContentBoardCat:
:
getLearningContentId
,
id
);
final
List
<
String
>
copyrightOwnerIdList
=
learningContent
.
getCopyrightOwnerIdList
();
queryWrapper
.
select
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
);
if
(
copyrightOwnerIdList
!=
null
&&
!
copyrightOwnerIdList
.
isEmpty
())
{
final
List
<
String
>
exhibitionBoardCatIdList
=
this
.
learningContentBoardCatService
.
listObjs
(
queryWrapper
,
Object:
:
toString
);
if
(!
exhibitionBoardCatIdList
.
isEmpty
())
{
final
List
<
ExhibitionBoardCat
>
exhibitionBoardCats
=
this
.
exhibitionBoardCatService
.
listByIds
(
exhibitionBoardCatIdList
);
learningContent
.
setExhibitionBoardCatIdList
(
exhibitionBoardCats
.
stream
().
map
(
ExhibitionBoardCat:
:
getId
).
collect
(
Collectors
.
toList
()));
learningContent
.
setExhibitionBoardCatNameList
(
exhibitionBoardCats
.
stream
().
map
(
ExhibitionBoardCat:
:
getName
).
collect
(
Collectors
.
toList
()));
}
final
LambdaQueryWrapper
<
LearningContentCopyrightOwner
>
learningContentCopyrightOwnerLambdaQueryWrapper
=
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaQuery
().
eq
(
LearningContentCopyrightOwner:
:
getLearningContentId
,
id
);
learningContentCopyrightOwnerLambdaQueryWrapper
.
select
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
);
final
List
<
String
>
copyrightOwnerIdList
=
this
.
learningContentCopyrightOwnerService
.
listObjs
(
learningContentCopyrightOwnerLambdaQueryWrapper
,
Object:
:
toString
);
if
(!
copyrightOwnerIdList
.
isEmpty
())
{
final
List
<
CopyrightOwner
>
copyrightOwnerList
=
this
.
copyrightOwnerService
.
listByIds
(
copyrightOwnerIdList
);
final
List
<
CopyrightOwner
>
copyrightOwnerList
=
this
.
copyrightOwnerService
.
listByIds
(
copyrightOwnerIdList
);
learningContent
.
setCopyrightOwnerIdList
(
copyrightOwner
List
.
stream
().
map
(
CopyrightOwner:
:
getId
).
collect
(
Collectors
.
toList
())
);
learningContent
.
setCopyrightOwnerIdList
(
copyrightOwner
IdList
);
learningContent
.
setCopyrightOwnerNameList
(
copyrightOwnerList
.
stream
().
map
(
CopyrightOwner:
:
getName
).
collect
(
Collectors
.
toList
()));
learningContent
.
setCopyrightOwnerNameList
(
copyrightOwnerList
.
stream
().
map
(
CopyrightOwner:
:
getName
).
collect
(
Collectors
.
toList
()));
}
}
final
LambdaQueryWrapper
<
LearningContentBoard
>
learningContentBoardLambdaQueryWrapper
=
Wrappers
.<
LearningContentBoard
>
lambdaQuery
().
eq
(
LearningContentBoard:
:
getLearningContentId
,
id
);
final
List
<
String
>
exhibitionBoardCatIdList
=
learningContent
.
getExhibitionBoardCatIdList
();
learningContentBoardLambdaQueryWrapper
.
select
(
LearningContentBoard:
:
getExhibitionBoardId
);
if
(
exhibitionBoardCatIdList
!=
null
&&
!
exhibitionBoardCatIdList
.
isEmpty
())
{
final
List
<
String
>
exhibitionBoardIdList
=
this
.
learningContentBoardService
.
listObjs
(
learningContentBoardLambdaQueryWrapper
,
Object:
:
toString
);
final
List
<
ExhibitionBoardCat
>
exhibitionBoardCats
=
this
.
exhibitionBoardCatService
.
listByIds
(
exhibitionBoardCatIdList
);
if
(!
exhibitionBoardIdList
.
isEmpty
())
{
learningContent
.
setExhibitionBoardCatIdList
(
exhibitionBoardCatIdList
);
learningContent
.
setExhibitionBoardCatNameList
(
exhibitionBoardCats
.
stream
().
map
(
ExhibitionBoardCat:
:
getName
).
collect
(
Collectors
.
toList
()));
}
final
List
<
String
>
exhibitionBoardIdList
=
learningContent
.
getExhibitionBoardIdList
();
if
(
exhibitionBoardIdList
!=
null
&&
!
exhibitionBoardIdList
.
isEmpty
())
{
final
List
<
ExhibitionBoard
>
exhibitionBoardList
=
this
.
exhibitionBoardService
.
listByIds
(
exhibitionBoardIdList
);
final
List
<
ExhibitionBoard
>
exhibitionBoardList
=
this
.
exhibitionBoardService
.
listByIds
(
exhibitionBoardIdList
);
if
(!
exhibitionBoardList
.
isEmpty
())
{
if
(!
exhibitionBoardList
.
isEmpty
())
{
learningContent
.
setExhibitionBoardIdList
(
exhibitionBoard
List
.
stream
().
map
(
ExhibitionBoard:
:
getId
).
collect
(
Collectors
.
toList
())
);
learningContent
.
setExhibitionBoardIdList
(
exhibitionBoard
IdList
);
learningContent
.
setExhibitionBoardNameList
(
exhibitionBoardList
.
stream
().
map
(
ExhibitionBoard:
:
getName
).
collect
(
Collectors
.
toList
()));
learningContent
.
setExhibitionBoardNameList
(
exhibitionBoardList
.
stream
().
map
(
ExhibitionBoard:
:
getName
).
collect
(
Collectors
.
toList
()));
}
}
...
@@ -427,14 +421,14 @@ public class LearningContentController extends BaseController {
...
@@ -427,14 +421,14 @@ public class LearningContentController extends BaseController {
}
}
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetQueryWrapper
.
eq
(
Asset:
:
getPublished
,
fals
e
);
assetQueryWrapper
.
eq
(
Asset:
:
getPublished
,
tru
e
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
final
List
<
Asset
>
audioList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
final
List
<
Asset
>
audioList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setAudioList
(
audioList
);
exhibitionBoard
.
setAudioList
(
audioList
);
assetQueryWrapper
.
clear
();
assetQueryWrapper
.
clear
();
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetQueryWrapper
.
eq
(
Asset:
:
getPublished
,
fals
e
);
assetQueryWrapper
.
eq
(
Asset:
:
getPublished
,
tru
e
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
Asset
>
datumList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
final
List
<
Asset
>
datumList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setDatumList
(
datumList
);
exhibitionBoard
.
setDatumList
(
datumList
);
...
@@ -445,7 +439,7 @@ public class LearningContentController extends BaseController {
...
@@ -445,7 +439,7 @@ public class LearningContentController extends BaseController {
if
(
videoContent
!=
null
)
{
if
(
videoContent
!=
null
)
{
assetQueryWrapper
.
clear
();
assetQueryWrapper
.
clear
();
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
);
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
);
assetQueryWrapper
.
eq
(
Asset:
:
getPublished
,
fals
e
);
assetQueryWrapper
.
eq
(
Asset:
:
getPublished
,
tru
e
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
VIDEO_CONTENT
.
name
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
VIDEO_CONTENT
.
name
());
final
List
<
Asset
>
videoList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
final
List
<
Asset
>
videoList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setVideoList
(
videoList
);
exhibitionBoard
.
setVideoList
(
videoList
);
...
...
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