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
0a3d946b
Commit
0a3d946b
authored
Mar 30, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
e61dfe9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
44 deletions
+33
-44
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+33
-44
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
0a3d946b
...
...
@@ -406,42 +406,13 @@ public class ChinaMobileRestApiController extends BaseController {
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"nameOrCode"
,
value
=
"名称或编码"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"copyrightOwner"
,
value
=
"版权方"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"learningContentId"
,
value
=
"学习内容ID"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PostMapping
(
"/
getPageList
"
)
@PostMapping
(
"/
exhibitionBoard/getPage
"
)
@RequiresPermissions
(
"exhibition:board:page"
)
@ApiOperation
(
value
=
"获取展板分页列表"
,
notes
=
"获取展板分页列表"
)
public
Map
<
String
,
Object
>
getExhibitionBoardPageList
(
GenericPageParam
genericPageParam
)
{
LambdaQueryWrapper
<
ExhibitionBoard
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
queryWrapper
.
like
(
ExhibitionBoard:
:
getName
,
genericPageParam
.
getNameOrCode
());
}
// 对版权方模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getBoardCopyrightOwnerId
()))
{
queryWrapper
.
like
(
ExhibitionBoard:
:
getAssetCopyrightOwnerId
,
genericPageParam
.
getBoardCopyrightOwnerId
());
}
// 根据创建时间区间检索
if
(
genericPageParam
.
getStartDate
()
!=
null
&&
genericPageParam
.
getEndDate
()
!=
null
)
{
queryWrapper
.
ge
(
ExhibitionBoard:
:
getCreateTime
,
genericPageParam
.
getStartDate
().
atTime
(
0
,
0
,
0
))
.
le
(
ExhibitionBoard:
:
getCreateTime
,
genericPageParam
.
getEndDate
().
atTime
(
23
,
59
,
59
));
}
// 设置排序规则
queryWrapper
.
orderByDesc
(
ExhibitionBoard:
:
getCreateTime
);
// 设置查询内容
queryWrapper
.
select
(
ExhibitionBoard:
:
getId
,
ExhibitionBoard:
:
getName
,
ExhibitionBoard:
:
getAuditStatus
,
ExhibitionBoard:
:
getPublished
,
ExhibitionBoard:
:
getAssetCopyrightOwnerId
,
ExhibitionBoard:
:
getExhibitionBoardCatId
,
ExhibitionBoard:
:
getCreateTime
,
ExhibitionBoard:
:
getUpdateTime
);
Page
<
ExhibitionBoard
>
page
=
this
.
exhibitionBoardService
.
page
(
getPage
(),
queryWrapper
);
@ApiOperation
(
value
=
"展板列表查询"
,
notes
=
"展板列表查询"
)
public
Map
<
String
,
Object
>
getExhibitionBoardPageList
(
@RequestParam
(
value
=
"learningContentId"
,
required
=
false
)
String
learningContentId
)
{
final
IPage
<
ExhibitionBoard
>
page
=
this
.
learningContentBoardService
.
getBoardPageByLearningContentId
(
getPage
(),
learningContentId
,
null
);
for
(
ExhibitionBoard
exhibitionBoard
:
page
.
getRecords
())
{
if
(
exhibitionBoard
.
getAssetCopyrightOwnerId
()
!=
null
)
{
String
name
=
this
.
copyrightOwnerService
.
getById
(
exhibitionBoard
.
getAssetCopyrightOwnerId
()).
getName
();
...
...
@@ -464,10 +435,10 @@ public class ChinaMobileRestApiController extends BaseController {
@ApiOperation
(
value
=
"展板详情页面查询"
,
notes
=
"展板详情页面查询"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"boardId"
,
value
=
"展板ID"
,
dataType
=
"String"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"language"
,
value
=
"语言"
,
dataType
=
"String"
,
paramType
=
"query"
)
,
@ApiImplicitParam
(
name
=
"language"
,
value
=
"语言"
,
dataType
=
"String"
,
paramType
=
"query"
)
})
@GetMapping
(
"/exhibitionBoard/getBoardInfo"
)
public
Map
<
String
,
Object
>
getById
(
@RequestParam
(
value
=
"boardId"
)
String
id
,
@RequestParam
(
"language"
)
LanguageEnum
language
)
{
public
Map
<
String
,
Object
>
getById
(
@RequestParam
(
value
=
"boardId"
)
String
id
,
@RequestParam
(
value
=
"language"
,
required
=
false
)
LanguageEnum
language
)
{
ExhibitionBoard
exhibitionBoard
=
exhibitionBoardService
.
getById
(
id
);
String
exhibitionBoardCatId
=
exhibitionBoard
.
getExhibitionBoardCatId
();
if
(
exhibitionBoardCatId
!=
null
)
{
...
...
@@ -478,12 +449,29 @@ public class ChinaMobileRestApiController extends BaseController {
exhibitionBoard
.
setBoardCopyrightOwnerName
(
this
.
copyrightOwnerService
.
getById
(
boardCopyrightOwnerId
).
getName
());
}
final
String
assetId
=
exhibitionBoard
.
getAssetId
();
final
Asset
asset
=
this
.
assetService
.
getById
(
assetId
);
final
String
videoUrl
=
asset
.
getVideoUrl
();
final
List
<
VideoVo
>
videoVoList
=
JSONObject
.
parseObject
(
videoUrl
,
new
TypeReference
<
List
<
VideoVo
>>()
{
final
String
guideAudioUrl
=
exhibitionBoard
.
getGuideAudioUrl
();
final
List
<
AudioVo
>
audioVoList
=
JSONObject
.
parseObject
(
guideAudioUrl
,
new
TypeReference
<
List
<
AudioVo
>>()
{
},
Feature
.
OrderedField
);
exhibitionBoard
.
setAudioUrlList
(
audioVoList
.
stream
().
map
(
AudioVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
final
String
refMaterialUrl
=
exhibitionBoard
.
getRefMaterialUrl
();
final
List
<
AudioVo
>
refMaterialVoList
=
JSONObject
.
parseObject
(
refMaterialUrl
,
new
TypeReference
<
List
<
AudioVo
>>()
{
},
Feature
.
OrderedField
);
exhibitionBoard
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
exhibitionBoard
.
setMaterialUrlList
(
refMaterialVoList
.
stream
().
map
(
AudioVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
String
assetId
=
exhibitionBoard
.
getAssetId
();
if
(
assetId
!=
null
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
assetId
);
exhibitionBoard
.
setAssetName
(
this
.
assetService
.
getById
(
assetId
).
getName
());
final
String
assetCopyrightOwnerId
=
asset
.
getAssetCopyrightOwnerId
();
final
String
assetCopyrightOwnerName
=
this
.
copyrightOwnerService
.
getById
(
assetCopyrightOwnerId
).
getName
();
exhibitionBoard
.
setAssetCopyrightOwnerName
(
assetCopyrightOwnerName
);
final
String
videoUrl
=
asset
.
getVideoUrl
();
final
List
<
VideoVo
>
videoVoList
=
JSONObject
.
parseObject
(
videoUrl
,
new
TypeReference
<
List
<
VideoVo
>>()
{
},
Feature
.
OrderedField
);
exhibitionBoard
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
}
return
getResult
(
exhibitionBoard
);
}
...
...
@@ -514,7 +502,7 @@ public class ChinaMobileRestApiController extends BaseController {
})
@PostMapping
(
"/learningContent/getPage"
)
@RequiresPermissions
(
"learning:content:page"
)
@ApiOperation
(
value
=
"
获取学习内容分页列表"
,
notes
=
"获取学习内容分页列表
"
)
@ApiOperation
(
value
=
"
查询学习内容"
,
notes
=
"查询学习内容
"
)
public
Map
<
String
,
Object
>
getLearningContentPageList
(
GenericPageParam
genericPageParam
)
{
LambdaQueryWrapper
<
LearningContent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 对名称或编码模糊查询
...
...
@@ -553,7 +541,7 @@ public class ChinaMobileRestApiController extends BaseController {
})
@PostMapping
(
"/learningProject/getPage"
)
@RequiresPermissions
(
"learning:project:page"
)
@ApiOperation
(
value
=
"
获取学习项目分页列表"
,
notes
=
"获取学习项目分页列表
"
)
@ApiOperation
(
value
=
"
查询项目"
,
notes
=
"查询项目
"
)
public
Map
<
String
,
Object
>
getLearningProjectPageList
(
GenericPageParam
genericPageParam
)
{
LambdaQueryWrapper
<
LearningProject
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 对名称或编码模糊查询
...
...
@@ -606,11 +594,12 @@ public class ChinaMobileRestApiController extends BaseController {
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"learningContentId"
,
value
=
"学习内容ID"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"nameOrCode"
,
value
=
"名称或编码"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PostMapping
(
"/exhibitionBoard/search"
)
@RequiresPermissions
(
"learning:content:board:page"
)
@ApiOperation
(
value
=
"
获取学习内容展板分页列表"
,
notes
=
"获取学习内容展板分页列表
"
)
@ApiOperation
(
value
=
"
模糊搜索查询"
,
notes
=
"模糊搜索查询
"
)
public
Map
<
String
,
Object
>
getLearningContentBoardPageList
(
GenericPageParam
genericPageParam
,
@RequestParam
(
value
=
"learningContentId"
,
required
=
false
)
String
learningContentId
)
{
IPage
<
ExhibitionBoard
>
page
=
this
.
learningContentBoardService
.
getBoardPageByLearningContentId
(
getPage
(),
learningContentId
,
genericPageParam
.
getNameOrCode
());
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