Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
9d837915
Commit
9d837915
authored
Apr 18, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
28ec0d2b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
727 additions
and
55 deletions
+727
-55
MysqlGenerator.java
...energy/chnmuseum/party/common/mybatis/MysqlGenerator.java
+1
-1
BatchUploadResVO.java
...wisenergy/chnmuseum/party/common/vo/BatchUploadResVO.java
+4
-0
AssetTmpMapper.java
...a/cn/wisenergy/chnmuseum/party/mapper/AssetTmpMapper.java
+16
-0
AssetTmp.java
...ain/java/cn/wisenergy/chnmuseum/party/model/AssetTmp.java
+102
-0
ExhibitionBoard.java
...a/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
+8
-0
VideoContent.java
...java/cn/wisenergy/chnmuseum/party/model/VideoContent.java
+4
-0
VideoContentTmp.java
...a/cn/wisenergy/chnmuseum/party/model/VideoContentTmp.java
+1
-1
AssetTmpService.java
...cn/wisenergy/chnmuseum/party/service/AssetTmpService.java
+16
-0
AssetTmpServiceImpl.java
...rgy/chnmuseum/party/service/impl/AssetTmpServiceImpl.java
+22
-0
AuditServiceImpl.java
...energy/chnmuseum/party/service/impl/AuditServiceImpl.java
+30
-28
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+17
-16
FileUploadController.java
.../chnmuseum/party/web/controller/FileUploadController.java
+458
-2
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+1
-1
VideoContentController.java
...hnmuseum/party/web/controller/VideoContentController.java
+15
-6
AssetTmpMapper.xml
src/main/resources/mapper/AssetTmpMapper.xml
+32
-0
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/mybatis/MysqlGenerator.java
View file @
9d837915
...
...
@@ -3,7 +3,7 @@ package cn.wisenergy.chnmuseum.party.common.mybatis;
public
class
MysqlGenerator
{
private
static
final
String
[]
tableNames
=
new
String
[]{
"
video_content_tmp"
,
"exhibition_board_tmp"
,
"learning_conten
t_tmp"
"
asse
t_tmp"
};
// private static final String projectPath = "D:\\develop\\Project\\chnmuseum-party";
private
static
final
String
projectPath
=
"/opt/ss"
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/BatchUploadResVO.java
View file @
9d837915
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
vo
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
cn.wisenergy.chnmuseum.party.model.AssetTmp
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -37,6 +38,9 @@ public class BatchUploadResVO {
@ApiModelProperty
(
"成功上传的文件集合"
)
private
Set
<
Asset
>
fileList
;
@ApiModelProperty
(
"成功上传的文件集合(修改时使用)"
)
private
Set
<
AssetTmp
>
fileTmpList
;
@Data
public
static
class
HandleResult
{
...
...
src/main/java/cn/wisenergy/chnmuseum/party/mapper/AssetTmpMapper.java
0 → 100644
View file @
9d837915
package
cn
.
wisenergy
.
chnmuseum
.
party
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.wisenergy.chnmuseum.party.model.AssetTmp
;
/**
* <pre>
* 文件资产临时 Mapper 接口
* </pre>
*
* @author Danny Lee
* @since 2021-04-18
*/
public
interface
AssetTmpMapper
extends
BaseMapper
<
AssetTmp
>
{
}
src/main/java/cn/wisenergy/chnmuseum/party/model/AssetTmp.java
0 → 100644
View file @
9d837915
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
com.baomidou.mybatisplus.annotation.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 文件资产临时
* </p>
*
* @author Danny Lee
* @since 2021-04-18
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"asset_tmp"
)
@ApiModel
(
value
=
"文件资产临时"
,
description
=
"文件资产临时"
)
public
class
AssetTmp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"文件资产ID"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"文件资产ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
id
;
@ApiModelProperty
(
"所属项ID"
)
@TableField
(
"ref_item_id"
)
private
String
refItemId
;
@ApiModelProperty
(
"原始文件名"
)
@TableField
(
"file_name"
)
private
String
fileName
;
@ApiModelProperty
(
"加密后文件名"
)
@TableField
(
"file_name_crypto"
)
private
String
fileNameCrypto
;
@ApiModelProperty
(
"扩展名"
)
@TableField
(
"file_ext_name"
)
private
String
fileExtName
;
@ApiModelProperty
(
"文件类型"
)
@TableField
(
"file_type"
)
private
String
fileType
;
@ApiModelProperty
(
"文件分类"
)
@TableField
(
"file_cat"
)
private
String
fileCat
;
@ApiModelProperty
(
"文件大小(B)"
)
@TableField
(
"file_size"
)
private
Long
fileSize
;
@ApiModelProperty
(
"下载链接"
)
@TableField
(
"file_url"
)
private
String
fileUrl
;
@ApiModelProperty
(
"加密链接"
)
@TableField
(
"file_url_crypto"
)
private
String
fileUrlCrypto
;
@ApiModelProperty
(
"视频缩略图"
)
@TableField
(
"thumbnail"
)
private
String
thumbnail
;
@ApiModelProperty
(
"语言"
)
@TableField
(
"language"
)
private
String
language
;
@ApiModelProperty
(
"MD5"
)
@TableField
(
"md5"
)
private
String
md5
;
@TableField
(
"crc32"
)
private
Long
crc32
;
@TableField
(
"video_content_name"
)
private
String
videoContentName
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"修改日期"
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
LocalDateTime
updateTime
;
}
src/main/java/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
View file @
9d837915
...
...
@@ -158,10 +158,18 @@ public class ExhibitionBoard implements Serializable {
@TableField
(
exist
=
false
)
private
List
<
Asset
>
audioList
;
@ApiModelProperty
(
"展板视频(审核详情使用)"
)
@TableField
(
exist
=
false
)
private
List
<
AssetTmp
>
audioTmpList
;
@ApiModelProperty
(
"参考资料列表"
)
@TableField
(
exist
=
false
)
private
List
<
Asset
>
datumList
;
@ApiModelProperty
(
"参考资料列表(审核详情使用)"
)
@TableField
(
exist
=
false
)
private
List
<
AssetTmp
>
datumTmpList
;
@ApiModelProperty
(
"审核意见记录"
)
@TableField
(
exist
=
false
)
private
List
<
Audit
>
auditHistoryList
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/VideoContent.java
View file @
9d837915
...
...
@@ -93,6 +93,10 @@ public class VideoContent implements Serializable {
@TableField
(
exist
=
false
)
private
List
<
Asset
>
videoFileList
;
@ApiModelProperty
(
"视频文件信息列表(审核详情使用)"
)
@TableField
(
exist
=
false
)
private
List
<
AssetTmp
>
videoFileTmpList
;
@ApiModelProperty
(
"审核意见记录"
)
@TableField
(
exist
=
false
)
private
List
<
Audit
>
auditHistoryList
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/VideoContentTmp.java
View file @
9d837915
src/main/java/cn/wisenergy/chnmuseum/party/service/AssetTmpService.java
0 → 100644
View file @
9d837915
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
;
import
cn.wisenergy.chnmuseum.party.model.AssetTmp
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 文件资产临时 服务接口
* </p>
*
* @author Danny Lee
* @since 2021-04-18
*/
public
interface
AssetTmpService
extends
IService
<
AssetTmp
>
{
}
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/AssetTmpServiceImpl.java
0 → 100644
View file @
9d837915
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.wisenergy.chnmuseum.party.mapper.AssetTmpMapper
;
import
cn.wisenergy.chnmuseum.party.model.AssetTmp
;
import
cn.wisenergy.chnmuseum.party.service.AssetTmpService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
/**
* <pre>
* 文件资产临时 服务实现类
* </pre>
*
* @author Danny Lee
* @since 2021-04-18
*/
@Slf4j
@Service
public
class
AssetTmpServiceImpl
extends
ServiceImpl
<
AssetTmpMapper
,
AssetTmp
>
implements
AssetTmpService
{
}
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/AuditServiceImpl.java
View file @
9d837915
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.wisenergy.chnmuseum.party.common.enums.*
;
import
cn.wisenergy.chnmuseum.party.common.mvc.InterfaceException
;
import
cn.wisenergy.chnmuseum.party.mapper.AuditMapper
;
...
...
@@ -21,8 +22,6 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* <pre>
...
...
@@ -39,6 +38,9 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
@Resource
private
AssetService
assetService
;
@Resource
private
AssetTmpService
assetTmpService
;
@Resource
private
AuditMapper
auditMapper
;
...
...
@@ -276,22 +278,20 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
final
VideoContent
one
=
JSONObject
.
parseObject
(
data
,
VideoContent
.
class
);
final
List
<
String
>
videoFileIdList
=
one
.
getVideoFileIdList
();
if
(
videoFileIdList
!=
null
&&
!
videoFileIdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
);
final
List
<
Asset
>
assetList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
f
inal
Map
<
String
,
String
>
collect
=
assetList
.
stream
().
collect
(
Collectors
.
toMap
(
Asset:
:
getId
,
Asset:
:
getFileUrl
));
for
(
String
videoFileId
:
videoFileIdList
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
videoFileId
);
this
.
assetService
.
remove
(
Wrappers
.<
Asset
>
lambdaUpdate
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
)
);
final
List
<
Asset
Tmp
>
assetTmpList
=
this
.
assetTmpService
.
list
(
Wrappers
.<
AssetTmp
>
lambdaQuery
().
eq
(
AssetTmp:
:
getRefItemId
,
videoContentId
)
);
f
or
(
AssetTmp
assetTmp
:
assetTmpList
)
{
Asset
asset
=
new
Asset
();
BeanUtil
.
copyProperties
(
assetTmp
,
asset
);
asset
.
setThumbnail
(
videoContent
.
getThumbnail
());
asset
.
setFileType
(
FileTypeEnum
.
VIDEO
.
name
());
asset
.
setFileCat
(
FileCatEnum
.
VIDEO_CONTENT
.
name
());
asset
.
setRefItemId
(
videoContentId
);
this
.
assetService
.
updateById
(
asset
);
this
.
assetService
.
save
(
asset
);
if
(
StringUtils
.
isBlank
(
one
.
getName
()))
{
videoContent
.
setName
(
asset
.
getVideoContentName
());
}
collect
.
remove
(
videoFileId
);
}
collect
.
forEach
((
k
,
v
)
->
this
.
assetService
.
removeById
(
k
));
}
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setPublished
(
true
);
//todo
...
...
@@ -341,34 +341,36 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
final
ExhibitionBoard
one
=
JSONObject
.
parseObject
(
data
,
ExhibitionBoard
.
class
);
final
List
<
String
>
audioIdList
=
one
.
getAudioIdList
();
if
(
audioIdList
!=
null
&&
!
audioIdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoardId
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
final
List
<
Asset
>
assetList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
final
Map
<
String
,
String
>
collect
=
assetList
.
stream
().
collect
(
Collectors
.
toMap
(
Asset:
:
getId
,
Asset:
:
getFileUrl
));
for
(
String
audioId
:
audioIdList
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
audioId
);
final
LambdaUpdateWrapper
<
Asset
>
lambdaUpdateWrapper
=
Wrappers
.<
Asset
>
lambdaUpdate
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoardId
);
lambdaUpdateWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
this
.
assetService
.
remove
(
lambdaUpdateWrapper
);
final
LambdaQueryWrapper
<
AssetTmp
>
assetTmpQueryWrapper
=
Wrappers
.<
AssetTmp
>
lambdaQuery
().
eq
(
AssetTmp:
:
getRefItemId
,
exhibitionBoardId
);
assetTmpQueryWrapper
.
eq
(
AssetTmp:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
final
List
<
AssetTmp
>
assetTmpList
=
this
.
assetTmpService
.
list
(
assetTmpQueryWrapper
);
for
(
AssetTmp
assetTmp
:
assetTmpList
)
{
Asset
asset
=
new
Asset
();
BeanUtil
.
copyProperties
(
assetTmp
,
asset
);
asset
.
setFileType
(
FileTypeEnum
.
AUDIO
.
name
());
asset
.
setFileCat
(
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
asset
.
setRefItemId
(
exhibitionBoardId
);
this
.
assetService
.
updateById
(
asset
);
collect
.
remove
(
audioId
);
this
.
assetService
.
save
(
asset
);
}
collect
.
forEach
((
k
,
v
)
->
this
.
assetService
.
removeById
(
k
));
}
final
List
<
String
>
datumIdList
=
one
.
getDatumIdList
();
if
(
datumIdList
!=
null
&&
!
datumIdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoardId
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
Asset
>
assetList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
final
Map
<
String
,
String
>
collect
=
assetList
.
stream
().
collect
(
Collectors
.
toMap
(
Asset:
:
getId
,
Asset:
:
getFileUrl
));
for
(
String
datumId
:
datumIdList
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
datumId
);
final
LambdaUpdateWrapper
<
Asset
>
lambdaUpdateWrapper
=
Wrappers
.<
Asset
>
lambdaUpdate
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoardId
);
lambdaUpdateWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
this
.
assetService
.
remove
(
lambdaUpdateWrapper
);
final
LambdaQueryWrapper
<
AssetTmp
>
assetTmpQueryWrapper
=
Wrappers
.<
AssetTmp
>
lambdaQuery
().
eq
(
AssetTmp:
:
getRefItemId
,
exhibitionBoardId
);
assetTmpQueryWrapper
.
eq
(
AssetTmp:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
AssetTmp
>
assetTmpList
=
this
.
assetTmpService
.
list
(
assetTmpQueryWrapper
);
for
(
AssetTmp
assetTmp
:
assetTmpList
)
{
Asset
asset
=
new
Asset
();
BeanUtil
.
copyProperties
(
assetTmp
,
asset
);
asset
.
setFileCat
(
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
asset
.
setRefItemId
(
exhibitionBoardId
);
this
.
assetService
.
updateById
(
asset
);
collect
.
remove
(
datumId
);
this
.
assetService
.
save
(
asset
);
}
collect
.
forEach
((
k
,
v
)
->
this
.
assetService
.
removeById
(
k
));
}
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setPublished
(
true
);
//todo
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
9d837915
...
...
@@ -58,6 +58,8 @@ public class ExhibitionBoardController extends BaseController {
private
AuditService
auditService
;
@Resource
private
AssetService
assetService
;
@Resource
private
AssetTmpService
assetTmpService
;
@PostMapping
(
"/save"
)
@RequiresAuthentication
//@RequiresPermissions("exhibition:board:save")
...
...
@@ -333,7 +335,7 @@ public class ExhibitionBoardController extends BaseController {
return
getResult
(
exhibitionBoard
);
}
@ApiOperation
(
value
=
"获取展板详情(审核
时使用)"
,
notes
=
"获取展板详情(审核时
使用)"
)
@ApiOperation
(
value
=
"获取展板详情(审核
详情使用)"
,
notes
=
"获取展板详情(审核详情
使用)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
,
required
=
true
)
})
...
...
@@ -355,18 +357,18 @@ public class ExhibitionBoardController extends BaseController {
exhibitionBoard
.
setVideoContentCopyrightOwnerName
(
name
);
}
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset
:
:
getRefItemId
,
exhibitionBoard
.
getId
());
asset
QueryWrapper
.
eq
(
Asset
:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
final
List
<
Asset
>
audioList
=
this
.
assetService
.
list
(
asset
QueryWrapper
);
exhibitionBoard
.
setAudio
List
(
audio
List
);
exhibitionBoard
.
setAudioIdList
(
audio
List
.
stream
().
map
(
Asset
:
:
getId
).
collect
(
Collectors
.
toList
()));
LambdaQueryWrapper
<
Asset
Tmp
>
assetTmpQueryWrapper
=
Wrappers
.<
AssetTmp
>
lambdaQuery
().
eq
(
AssetTmp
:
:
getRefItemId
,
exhibitionBoard
.
getId
());
asset
TmpQueryWrapper
.
eq
(
AssetTmp
:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
final
List
<
Asset
Tmp
>
audioTmpList
=
this
.
assetTmpService
.
list
(
assetTmp
QueryWrapper
);
exhibitionBoard
.
setAudio
TmpList
(
audioTmp
List
);
exhibitionBoard
.
setAudioIdList
(
audio
TmpList
.
stream
().
map
(
AssetTmp
:
:
getId
).
collect
(
Collectors
.
toList
()));
assetQueryWrapper
.
clear
();
asset
QueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset
:
:
getRefItemId
,
exhibitionBoard
.
getId
());
asset
QueryWrapper
.
eq
(
Asset
:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
Asset
>
datumList
=
this
.
assetService
.
list
(
asset
QueryWrapper
);
exhibitionBoard
.
setDatum
List
(
datum
List
);
exhibitionBoard
.
setDatumIdList
(
datum
List
.
stream
().
map
(
Asset
:
:
getId
).
collect
(
Collectors
.
toList
()));
asset
Tmp
QueryWrapper
.
clear
();
asset
TmpQueryWrapper
=
Wrappers
.<
AssetTmp
>
lambdaQuery
().
eq
(
AssetTmp
:
:
getRefItemId
,
exhibitionBoard
.
getId
());
asset
TmpQueryWrapper
.
eq
(
AssetTmp
:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
Asset
Tmp
>
datumTmpList
=
this
.
assetTmpService
.
list
(
assetTmp
QueryWrapper
);
exhibitionBoard
.
setDatum
TmpList
(
datumTmp
List
);
exhibitionBoard
.
setDatumIdList
(
datum
TmpList
.
stream
().
map
(
AssetTmp
:
:
getId
).
collect
(
Collectors
.
toList
()));
final
LambdaQueryWrapper
<
Audit
>
auditQueryWrapper
=
Wrappers
.<
Audit
>
lambdaQuery
().
eq
(
Audit:
:
getRefItemId
,
id
);
auditQueryWrapper
.
select
(
Audit:
:
getContent
);
...
...
@@ -386,10 +388,9 @@ public class ExhibitionBoardController extends BaseController {
final
VideoContent
videoContent
=
this
.
videoContentService
.
getById
(
videoContentId
);
exhibitionBoard
.
setVideoContentName
(
videoContent
.
getName
());
assetQueryWrapper
.
clear
();
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
VIDEO_CONTENT
.
name
());
final
List
<
Asset
>
videoList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
final
LambdaQueryWrapper
<
Asset
>
lambdaQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
);
lambdaQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
VIDEO_CONTENT
.
name
());
final
List
<
Asset
>
videoList
=
this
.
assetService
.
list
(
lambdaQueryWrapper
);
exhibitionBoard
.
setVideoList
(
videoList
);
}
return
getResult
(
exhibitionBoard
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/FileUploadController.java
View file @
9d837915
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningContentController.java
View file @
9d837915
...
...
@@ -361,7 +361,7 @@ public class LearningContentController extends BaseController {
return
getResult
(
learningContent
);
}
@ApiOperation
(
value
=
"获取学习内容详情(审核
时使用)"
,
notes
=
"获取学习内容详情(审核时
使用)"
)
@ApiOperation
(
value
=
"获取学习内容详情(审核
详情使用)"
,
notes
=
"获取学习内容详情(审核详情
使用)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
,
required
=
true
)
})
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/VideoContentController.java
View file @
9d837915
...
...
@@ -45,16 +45,25 @@ public class VideoContentController extends BaseController {
@Resource
private
ExhibitionBoardService
exhibitionBoardService
;
@Resource
private
VideoContentService
videoContentService
;
@Resource
private
VideoContentTmpService
videoContentTmpService
;
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
@Resource
private
VideoContentCatService
videoContentCatService
;
@Resource
private
AssetService
assetService
;
@Resource
private
AssetTmpService
assetTmpService
;
@Resource
private
AuditService
auditService
;
...
...
@@ -281,7 +290,7 @@ public class VideoContentController extends BaseController {
return
getResult
(
videoContent
);
}
@ApiOperation
(
value
=
"获取视频内容详情(审核
时使用)"
,
notes
=
"获取视频内容详情(审核时
使用)"
)
@ApiOperation
(
value
=
"获取视频内容详情(审核
详情使用)"
,
notes
=
"获取视频内容详情(审核详情
使用)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
,
required
=
true
)
})
...
...
@@ -302,11 +311,11 @@ public class VideoContentController extends BaseController {
videoContent
.
setVideoContentCopyrightOwnerName
(
copyrightOwner
.
getName
());
}
}
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset
:
:
getRefItemId
,
id
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
VIDEO_CONTENT
.
name
());
final
List
<
Asset
>
videoFileList
=
this
.
asset
Service
.
list
(
assetQueryWrapper
);
videoContent
.
setVideoFileList
(
videoFileList
);
videoContent
.
setVideoFileIdList
(
videoFileList
.
stream
().
map
(
Asset:
:
getId
).
collect
(
Collectors
.
toList
()));
final
LambdaQueryWrapper
<
Asset
Tmp
>
assetQueryWrapper
=
Wrappers
.<
AssetTmp
>
lambdaQuery
().
eq
(
AssetTmp
:
:
getRefItemId
,
id
);
assetQueryWrapper
.
eq
(
Asset
Tmp
:
:
getFileCat
,
FileCatEnum
.
VIDEO_CONTENT
.
name
());
final
List
<
Asset
Tmp
>
videoFileList
=
this
.
assetTmp
Service
.
list
(
assetQueryWrapper
);
videoContent
.
setVideoFile
Tmp
List
(
videoFileList
);
videoContent
.
setVideoFileIdList
(
videoFileList
.
stream
().
map
(
Asset
Tmp
:
:
getId
).
collect
(
Collectors
.
toList
()));
final
LambdaQueryWrapper
<
Audit
>
auditQueryWrapper
=
Wrappers
.<
Audit
>
lambdaQuery
().
eq
(
Audit:
:
getRefItemId
,
id
);
auditQueryWrapper
.
select
(
Audit:
:
getContent
);
...
...
src/main/resources/mapper/AssetTmpMapper.xml
0 → 100644
View file @
9d837915
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wisenergy.chnmuseum.party.mapper.AssetTmpMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.AssetTmp"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"ref_item_id"
property=
"refItemId"
/>
<result
column=
"file_name"
property=
"fileName"
/>
<result
column=
"file_name_crypto"
property=
"fileNameCrypto"
/>
<result
column=
"file_ext_name"
property=
"fileExtName"
/>
<result
column=
"file_type"
property=
"fileType"
/>
<result
column=
"file_cat"
property=
"fileCat"
/>
<result
column=
"file_size"
property=
"fileSize"
/>
<result
column=
"file_url"
property=
"fileUrl"
/>
<result
column=
"file_url_crypto"
property=
"fileUrlCrypto"
/>
<result
column=
"thumbnail"
property=
"thumbnail"
/>
<result
column=
"language"
property=
"language"
/>
<result
column=
"md5"
property=
"md5"
/>
<result
column=
"crc32"
property=
"crc32"
/>
<result
column=
"video_content_name"
property=
"videoContentName"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, ref_item_id, file_name, file_name_crypto, file_ext_name, file_type, file_cat, file_size, file_url,
file_url_crypto, thumbnail, language, md5, crc32, video_content_name, create_time, update_time
</sql>
</mapper>
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