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
84bf53fe
Commit
84bf53fe
authored
Mar 30, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
691e614d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
1 deletion
+54
-1
BasePageOrderParam.java
...senergy/chnmuseum/party/common/vo/BasePageOrderParam.java
+3
-0
LearningContent.java
...a/cn/wisenergy/chnmuseum/party/model/LearningContent.java
+8
-0
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+10
-0
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+33
-1
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/BasePageOrderParam.java
View file @
84bf53fe
...
...
@@ -54,6 +54,9 @@ public abstract class BasePageOrderParam extends BasePageParam {
@ApiModelProperty
(
"展板版权方ID"
)
private
String
boardCopyrightOwnerId
;
@ApiModelProperty
(
value
=
"禁用/启用"
)
private
Boolean
isPublished
;
public
void
defaultPageSort
(
OrderItem
orderItem
)
{
this
.
defaultPageSorts
(
Collections
.
singletonList
(
orderItem
));
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/LearningContent.java
View file @
84bf53fe
...
...
@@ -121,4 +121,12 @@ public class LearningContent implements Serializable {
@TableField
(
exist
=
false
)
private
Integer
exhibitionBoardCount
;
@ApiModelProperty
(
"展板分类名称集合(列表使用)"
)
@TableField
(
exist
=
false
)
private
String
exhibitionBoardCatNames
;
@ApiModelProperty
(
"版权方名称集合(列表使用)"
)
@TableField
(
exist
=
false
)
private
String
copyrightOwnerNames
;
}
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
84bf53fe
...
...
@@ -244,6 +244,16 @@ public class ExhibitionBoardController extends BaseController {
lambdaQueryWrapper
.
in
(
ExhibitionBoard:
:
getBoardCopyrightOwnerId
,
boardCopyrightOwnerIdList
);
}
List
<
ExhibitionBoard
>
exhibitionBoardList
=
exhibitionBoardService
.
list
();
for
(
ExhibitionBoard
exhibitionBoard
:
exhibitionBoardList
)
{
if
(
exhibitionBoard
.
getAssetCopyrightOwnerId
()
!=
null
)
{
String
name
=
this
.
copyrightOwnerService
.
getById
(
exhibitionBoard
.
getAssetCopyrightOwnerId
()).
getName
();
exhibitionBoard
.
setBoardCopyrightOwnerName
(
name
);
}
if
(
exhibitionBoard
.
getExhibitionBoardCatId
()
!=
null
)
{
String
name
=
this
.
exhibitionBoardCatService
.
getById
(
exhibitionBoard
.
getExhibitionBoardCatId
()).
getName
();
exhibitionBoard
.
setExhibitionBoardCatName
(
name
);
}
}
return
getResult
(
exhibitionBoardList
);
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningContentController.java
View file @
84bf53fe
...
...
@@ -42,6 +42,12 @@ import java.util.Map;
@Api
(
tags
=
{
"学习内容操作接口"
})
public
class
LearningContentController
extends
BaseController
{
@Resource
private
ExhibitionBoardCatService
exhibitionBoardCatService
;
@Resource
private
AssetTypeService
assetTypeService
;
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
@Resource
private
LearningContentService
learningContentService
;
@Resource
...
...
@@ -203,6 +209,7 @@ public class LearningContentController extends BaseController {
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"learningProjectId"
,
value
=
"学习项目ID"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"nameOrCode"
,
value
=
"名称或编码"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
...
...
@@ -210,9 +217,17 @@ public class LearningContentController extends BaseController {
@PostMapping
(
"/getPageList"
)
@RequiresPermissions
(
"learning:content:page"
)
@ApiOperation
(
value
=
"获取学习内容分页列表"
,
notes
=
"获取学习内容分页列表"
)
public
Map
<
String
,
Object
>
getLearningContentPageList
(
GenericPageParam
genericPageParam
)
{
public
Map
<
String
,
Object
>
getLearningContentPageList
(
GenericPageParam
genericPageParam
,
@RequestParam
(
value
=
"learningProjectId"
,
required
=
false
)
String
learningProjectId
)
{
LambdaQueryWrapper
<
LearningContent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
learningProjectId
))
{
queryWrapper
.
like
(
LearningContent:
:
getLearningProjectId
,
learningProjectId
);
}
// 根据创建时间区间检索
if
(
genericPageParam
.
getIsPublished
()
!=
null
)
{
queryWrapper
.
like
(
LearningContent:
:
getIsPublished
,
genericPageParam
.
getIsPublished
());
}
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
queryWrapper
.
like
(
LearningContent:
:
getName
,
genericPageParam
.
getNameOrCode
());
}
...
...
@@ -228,6 +243,7 @@ public class LearningContentController extends BaseController {
LearningContent:
:
getId
,
LearningContent:
:
getName
,
LearningContent:
:
getAuditStatus
,
LearningContent:
:
getIsPublished
,
LearningContent:
:
getCreateTime
,
LearningContent:
:
getUpdateTime
);
Page
<
LearningContent
>
page
=
this
.
learningContentService
.
page
(
getPage
(),
queryWrapper
);
...
...
@@ -235,6 +251,22 @@ public class LearningContentController extends BaseController {
LambdaQueryWrapper
<
LearningContentBoard
>
lambdaQueryWrapper
=
Wrappers
.<
LearningContentBoard
>
lambdaQuery
().
eq
(
LearningContentBoard:
:
getLearningContentId
,
learningContent
.
getId
());
int
exhibitionBoardCount
=
this
.
learningContentBoardService
.
count
(
lambdaQueryWrapper
);
learningContent
.
setExhibitionBoardCount
(
exhibitionBoardCount
);
// LambdaQueryWrapper<LearningContentBoardCat> boardCatLambdaQueryWrapper = Wrappers.<LearningContentBoardCat>lambdaQuery().eq(LearningContentBoardCat::getLearningContentId, learningContent.getId());
// boardCatLambdaQueryWrapper.select(LearningContentBoardCat::getExhibitionBoardCatId);
// List<String> exhibitionBoardCatIdList = this.learningContentBoardCatService.listObjs(boardCatLambdaQueryWrapper, Object::toString);
// List<ExhibitionBoardCat> exhibitionBoardCatList = this.exhibitionBoardCatService.listByIds(exhibitionBoardCatIdList);
// String exhibitionBoardCatNames = exhibitionBoardCatList.stream().map(ExhibitionBoardCat::getName).collect(Collectors.joining("、"));
// learningContent.setExhibitionBoardCatNames(exhibitionBoardCatNames);
//
// LambdaQueryWrapper<LearningContentCopyrightOwner> copyrightOwnerLambdaQueryWrapper = Wrappers.<LearningContentCopyrightOwner>lambdaQuery().eq(LearningContentCopyrightOwner::getLearningContentId, learningContent.getId());
// copyrightOwnerLambdaQueryWrapper.select(LearningContentCopyrightOwner::getCopyrightOwnerId);
// List<String> copyrightOwnerIdList = this.learningContentCopyrightOwnerService.listObjs(copyrightOwnerLambdaQueryWrapper, Object::toString);
// List<CopyrightOwner> copyrightOwnerList = this.copyrightOwnerService.listByIds(copyrightOwnerIdList);
// String copyrightOwnerNames = copyrightOwnerList.stream().map(CopyrightOwner::getName).collect(Collectors.joining("、"));
// learningContent.setCopyrightOwnerNames(copyrightOwnerNames);
learningContent
.
setExhibitionBoardCount
(
exhibitionBoardCount
);
}
return
getResult
(
page
);
}
...
...
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