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
fd215fc5
Commit
fd215fc5
authored
Mar 29, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
cf0df255
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
16 deletions
+42
-16
ExhibitionBoard.java
...a/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
+5
-1
AssetController.java
...nergy/chnmuseum/party/web/controller/AssetController.java
+1
-2
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+30
-9
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+6
-4
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
View file @
fd215fc5
...
...
@@ -117,7 +117,11 @@ public class ExhibitionBoard implements Serializable {
@TableField
(
exist
=
false
)
private
String
exhibitionBoardCatName
;
@ApiModelProperty
(
"音频URL列表"
)
@ApiModelProperty
(
"展板视频URL列表"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
videoUrlList
;
@ApiModelProperty
(
"展板音频URL列表"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
audioUrlList
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AssetController.java
View file @
fd215fc5
...
...
@@ -277,8 +277,7 @@ public class AssetController extends BaseController {
}
final
String
videoUrl
=
asset
.
getVideoUrl
();
final
List
<
VideoVo
>
videoVoList
=
JSONObject
.
parseObject
(
videoUrl
,
new
TypeReference
<
List
<
VideoVo
>>()
{
},
Feature
.
OrderedField
);
final
List
<
VideoVo
>
videoVoList
=
JSONObject
.
parseObject
(
videoUrl
,
new
TypeReference
<
List
<
VideoVo
>>()
{},
Feature
.
OrderedField
);
asset
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
return
getResult
(
asset
);
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
fd215fc5
...
...
@@ -6,11 +6,14 @@ import cn.wisenergy.chnmuseum.party.common.enums.LanguageEnum;
import
cn.wisenergy.chnmuseum.party.common.util.TimeUtils
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.common.vo.VideoVo
;
import
cn.wisenergy.chnmuseum.party.model.*
;
import
cn.wisenergy.chnmuseum.party.service.*
;
import
cn.wisenergy.chnmuseum.party.service.impl.*
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.parser.Feature
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -91,6 +94,9 @@ public class ChinaMobileRestApiController extends BaseController {
@Resource
private
LearningContentBoardService
learningContentBoardService
;
@Resource
private
AssetService
assetService
;
private
static
final
String
SHIRO_JWT_TOKEN
=
"shiro:jwt:token:"
;
//用户登录次数计数 redisKey 前缀
private
static
final
String
SHIRO_LOGIN_COUNT
=
"shiro_login_count_"
;
...
...
@@ -391,7 +397,7 @@ public class ChinaMobileRestApiController extends BaseController {
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PostMapping
(
"/
getPageList
"
)
@PostMapping
(
"/
exhibitionBoard/getPage
"
)
@RequiresPermissions
(
"exhibition:board:page"
)
@ApiOperation
(
value
=
"获取展板分页列表"
,
notes
=
"获取展板分页列表"
)
public
Map
<
String
,
Object
>
getExhibitionBoardPageList
(
GenericPageParam
genericPageParam
)
{
...
...
@@ -431,6 +437,11 @@ public class ChinaMobileRestApiController extends BaseController {
String
name
=
this
.
exhibitionBoardCatService
.
getById
(
exhibitionBoard
.
getExhibitionBoardCatId
()).
getName
();
exhibitionBoard
.
setExhibitionBoardCatName
(
name
);
}
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
>>()
{},
Feature
.
OrderedField
);
exhibitionBoard
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
}
return
getResult
(
page
);
}
...
...
@@ -441,13 +452,23 @@ public class ChinaMobileRestApiController extends BaseController {
@ApiImplicitParam
(
name
=
"language"
,
value
=
"语言"
,
dataType
=
"String"
,
paramType
=
"query"
),
})
@GetMapping
(
"/exhibitionBoard/getBoardInfo"
)
public
JSONObject
getById
(
@RequestParam
(
value
=
"boardId"
)
String
id
,
@RequestParam
(
"language"
)
LanguageEnum
language
)
{
public
Map
<
String
,
Object
>
getById
(
@RequestParam
(
value
=
"boardId"
)
String
id
,
@RequestParam
(
"language"
)
LanguageEnum
language
)
{
ExhibitionBoard
exhibitionBoard
=
exhibitionBoardService
.
getById
(
id
);
JSONObject
resultMap
=
new
JSONObject
();
resultMap
.
put
(
"resultCode"
,
200
);
resultMap
.
put
(
"message"
,
"成功"
);
resultMap
.
put
(
"data"
,
exhibitionBoard
);
return
resultMap
;
String
exhibitionBoardCatId
=
exhibitionBoard
.
getExhibitionBoardCatId
();
if
(
exhibitionBoardCatId
!=
null
)
{
exhibitionBoard
.
setExhibitionBoardCatName
(
this
.
exhibitionBoardCatService
.
getById
(
exhibitionBoardCatId
).
getName
());
}
String
boardCopyrightOwnerId
=
exhibitionBoard
.
getBoardCopyrightOwnerId
();
if
(
boardCopyrightOwnerId
!=
null
)
{
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
>>()
{},
Feature
.
OrderedField
);
exhibitionBoard
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
return
getResult
(
exhibitionBoard
);
}
@PostMapping
(
"/equitment/playLog"
)
...
...
@@ -477,7 +498,7 @@ public class ChinaMobileRestApiController extends BaseController {
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PostMapping
(
"/
getPageList
"
)
@PostMapping
(
"/
learningProject/getPage
"
)
@RequiresPermissions
(
"learning:project:page"
)
@ApiOperation
(
value
=
"获取学习项目分页列表"
,
notes
=
"获取学习项目分页列表"
)
public
Map
<
String
,
Object
>
getLearningProjectPageList
(
GenericPageParam
genericPageParam
)
{
...
...
@@ -520,7 +541,7 @@ public class ChinaMobileRestApiController extends BaseController {
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PostMapping
(
"/getPageList"
)
@PostMapping
(
"/
learningContent/
getPageList"
)
@RequiresPermissions
(
"learning:content:page"
)
@ApiOperation
(
value
=
"获取学习内容分页列表"
,
notes
=
"获取学习内容分页列表"
)
public
Map
<
String
,
Object
>
getLearningContentPageList
(
GenericPageParam
genericPageParam
)
{
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
fd215fc5
...
...
@@ -9,12 +9,15 @@ import cn.wisenergy.chnmuseum.party.common.validator.groups.Add;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
cn.wisenergy.chnmuseum.party.common.vo.AudioVo
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.common.vo.VideoVo
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
cn.wisenergy.chnmuseum.party.model.Audit
;
import
cn.wisenergy.chnmuseum.party.model.ExhibitionBoard
;
import
cn.wisenergy.chnmuseum.party.service.*
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.parser.Feature
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -35,6 +38,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* <pre>
...
...
@@ -315,10 +319,8 @@ public class ExhibitionBoardController extends BaseController {
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
>>()
{},
Feature
.
OrderedField
);
exhibitionBoard
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
return
getResult
(
exhibitionBoard
);
}
...
...
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