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
93db1527
Commit
93db1527
authored
4 years ago
by
liqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
7f3e7a0f
master
1.0
dev
No related merge requests found
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
1245 additions
and
533 deletions
+1245
-533
FastDFSUtils.java
...cn/wisenergy/chnmuseum/party/common/dfs/FastDFSUtils.java
+16
-27
AuditTypeEnum.java
...wisenergy/chnmuseum/party/common/enums/AuditTypeEnum.java
+8
-9
FileCatEnum.java
...n/wisenergy/chnmuseum/party/common/enums/FileCatEnum.java
+36
-0
FileTypeEnum.java
.../wisenergy/chnmuseum/party/common/enums/FileTypeEnum.java
+4
-4
MysqlGenerator.java
...energy/chnmuseum/party/common/mybatis/MysqlGenerator.java
+2
-2
ImportExcelUtil.java
...isenergy/chnmuseum/party/common/util/ImportExcelUtil.java
+1
-1
BasePageOrderParam.java
...senergy/chnmuseum/party/common/vo/BasePageOrderParam.java
+4
-4
BatchUploadResVO.java
...wisenergy/chnmuseum/party/common/vo/BatchUploadResVO.java
+4
-2
VideoContentCatMapper.java
...senergy/chnmuseum/party/mapper/VideoContentCatMapper.java
+16
-0
VideoContentMapper.java
.../wisenergy/chnmuseum/party/mapper/VideoContentMapper.java
+16
-0
Asset.java
src/main/java/cn/wisenergy/chnmuseum/party/model/Asset.java
+40
-47
ExhibitionBoard.java
...a/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
+36
-34
VideoContent.java
...java/cn/wisenergy/chnmuseum/party/model/VideoContent.java
+96
-0
VideoContentCat.java
...a/cn/wisenergy/chnmuseum/party/model/VideoContentCat.java
+9
-9
LearningContentBoardService.java
.../chnmuseum/party/service/LearningContentBoardService.java
+1
-1
VideoContentCatService.java
...nergy/chnmuseum/party/service/VideoContentCatService.java
+16
-0
VideoContentService.java
...isenergy/chnmuseum/party/service/VideoContentService.java
+16
-0
AssetServiceImpl.java
...energy/chnmuseum/party/service/impl/AssetServiceImpl.java
+1
-1
LearningContentBoardServiceImpl.java
...m/party/service/impl/LearningContentBoardServiceImpl.java
+1
-1
VideoContentCatServiceImpl.java
...museum/party/service/impl/VideoContentCatServiceImpl.java
+22
-0
VideoContentServiceImpl.java
...chnmuseum/party/service/impl/VideoContentServiceImpl.java
+28
-0
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+40
-62
CopyrightOwnerController.java
...museum/party/web/controller/CopyrightOwnerController.java
+8
-8
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+108
-149
FileUploadController.java
.../chnmuseum/party/web/controller/FileUploadController.java
+194
-106
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+29
-29
VideoContentCatController.java
...useum/party/web/controller/VideoContentCatController.java
+143
-0
VideoContentController.java
...hnmuseum/party/web/controller/VideoContentController.java
+266
-0
AssetMapper.xml
src/main/resources/mapper/AssetMapper.xml
+17
-14
AuditMapper.xml
src/main/resources/mapper/AuditMapper.xml
+1
-1
BoardTalkingMapper.xml
src/main/resources/mapper/BoardTalkingMapper.xml
+2
-2
ExhibitionBoardMapper.xml
src/main/resources/mapper/ExhibitionBoardMapper.xml
+20
-20
VideoContentCatMapper.xml
src/main/resources/mapper/VideoContentCatMapper.xml
+20
-0
VideoContentMapper.xml
src/main/resources/mapper/VideoContentMapper.xml
+24
-0
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/dfs/FastDFSUtils.java
View file @
93db1527
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
dfs
;
import
cn.wisenergy.chnmuseum.party.common.mvc.InterfaceException
;
import
cn.wisenergy.chnmuseum.party.common.util.*
;
import
cn.wisenergy.chnmuseum.party.common.util.CopyStreamUtils
;
import
cn.wisenergy.chnmuseum.party.common.util.FileTypeUtil
;
import
cn.wisenergy.chnmuseum.party.common.util.FileUtil
;
import
com.github.tobato.fastdfs.domain.fdfs.FileInfo
;
import
com.github.tobato.fastdfs.domain.fdfs.MetaData
;
import
com.github.tobato.fastdfs.domain.fdfs.StorePath
;
...
...
@@ -23,9 +25,7 @@ import java.io.ByteArrayInputStream;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -53,23 +53,13 @@ public class FastDFSUtils {
FastDFSUtils
.
imageConfig
=
thumbImageConfig
;
}
public
static
String
uploadFile
(
InputStream
inputStream
,
long
size
,
String
fileName
)
{
final
Set
<
MetaData
>
metaDataSet
=
new
HashSet
<>();
metaDataSet
.
add
(
new
MetaData
(
"fileName"
,
fileName
));
metaDataSet
.
add
(
new
MetaData
(
"fileSize"
,
size
+
""
));
metaDataSet
.
add
(
new
MetaData
(
"fileExtName"
,
FilenameUtils
.
getExtension
(
fileName
)));
metaDataSet
.
add
(
new
MetaData
(
"updateTime"
,
TimeUtils
.
format
(
LocalDateTime
.
now
(),
TimeUtils
.
FORMAT_ONE
)));
final
StorePath
storePath
=
storageClient
.
uploadFile
(
inputStream
,
size
,
FilenameUtils
.
getExtension
(
fileName
),
metaDataSet
);
return
dfsFileAccessBasePath
+
"/"
+
storePath
.
getFullPath
();
}
public
static
Map
<
String
,
Object
>
uploadUeImage
(
InputStream
inputStream
,
long
fileSize
,
String
fileName
)
{
boolean
isImage
=
FileTypeUtil
.
isImageByExtension
(
fileName
);
if
(
isImage
)
{
String
mimeType
=
FileUtil
.
getMimeType
(
fileName
);
final
String
storePath
=
FastDFSUtils
.
uploadFile
(
inputStream
,
fileSize
,
fileName
);
final
String
storePath
=
FastDFSUtils
.
uploadFile
(
inputStream
,
fileSize
,
fileName
,
null
);
Map
<
String
,
Object
>
uploadResult
=
new
HashMap
<>();
uploadResult
.
put
(
"url"
,
dfsFileAccessBasePath
+
"/"
+
storePath
);
uploadResult
.
put
(
"url"
,
storePath
);
uploadResult
.
put
(
"status"
,
true
);
uploadResult
.
put
(
"message"
,
"文件上传成功!"
);
uploadResult
.
put
(
"title"
,
fileName
);
...
...
@@ -80,16 +70,16 @@ public class FastDFSUtils {
throw
new
InterfaceException
(
"400"
,
"文件不是图片类型"
);
}
public
static
String
uploadVideo
(
InputStream
inputStream
,
long
size
,
String
fileName
)
{
public
static
String
uploadFile
(
InputStream
inputStream
,
long
size
,
String
fileName
,
Set
<
MetaData
>
metaDataSet
)
{
final
StorePath
storePath
=
storageClient
.
uploadFile
(
inputStream
,
size
,
FilenameUtils
.
getExtension
(
fileName
),
metaDataSet
);
return
dfsFileAccessBasePath
+
"/"
+
storePath
.
getFullPath
();
}
public
static
String
uploadVideo
(
InputStream
inputStream
,
long
size
,
String
fileName
,
Set
<
MetaData
>
metaDataSet
)
{
Map
<
String
,
Object
>
map
=
CopyStreamUtils
.
copyInputStream
(
inputStream
);
String
md5
=
(
String
)
map
.
get
(
"md5"
);
InputStream
is
=
(
InputStream
)
map
.
get
(
"inputStream"
);
final
Set
<
MetaData
>
metaDataSet
=
new
HashSet
<>();
metaDataSet
.
add
(
new
MetaData
(
"fileName"
,
fileName
));
metaDataSet
.
add
(
new
MetaData
(
"fileSize"
,
size
+
""
));
metaDataSet
.
add
(
new
MetaData
(
"updateTime"
,
TimeUtils
.
format
(
LocalDateTime
.
now
(),
TimeUtils
.
FORMAT_ONE
)));
metaDataSet
.
add
(
new
MetaData
(
"MD5"
,
md5
));
InputStream
is
=
(
InputStream
)
map
.
get
(
"inputStream"
);
final
StorePath
storePath
=
storageClient
.
uploadFile
(
is
,
size
,
FilenameUtils
.
getExtension
(
fileName
),
metaDataSet
);
return
dfsFileAccessBasePath
+
"/"
+
storePath
.
getFullPath
();
}
...
...
@@ -97,12 +87,11 @@ public class FastDFSUtils {
/**
* 使用 FastDFS 提供的客户端 storageClient 来进行文件上传,最后将上传结果返回。
* 根据 groupName 和文件名获取文件信息。
*
* @param groupName
* @param path
* @return
*/
public
static
FileInfo
getFileInfo
(
String
groupName
,
String
path
)
{
public
static
FileInfo
getFileInfo
(
String
fileUrl
)
{
fileUrl
=
fileUrl
.
replace
(
dfsFileAccessBasePath
+
"/"
,
""
);
String
groupName
=
fileUrl
.
substring
(
0
,
fileUrl
.
indexOf
(
"/"
));
String
path
=
fileUrl
.
substring
(
fileUrl
.
indexOf
(
"/"
)
+
1
);
return
storageClient
.
queryFileInfo
(
groupName
,
path
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/enums/AuditTypeEnum.java
View file @
93db1527
...
...
@@ -5,7 +5,7 @@ package cn.wisenergy.chnmuseum.party.common.enums;
*/
public
enum
AuditTypeEnum
{
ASSE
T
(
1
,
"视频内容"
),
VIDEO_CONTEN
T
(
1
,
"视频内容"
),
EXHIBITION_BOARD
(
2
,
"展板内容"
),
LEARNING_CONTENT
(
3
,
"学习内容"
),
ACCOUNT
(
4
,
"账户"
);
...
...
@@ -13,12 +13,12 @@ public enum AuditTypeEnum {
// 错误编码
private
Integer
code
;
// 信息
private
String
operation
;
private
String
type
;
// 相应编码有参构造函数
AuditTypeEnum
(
Integer
code
,
String
operation
)
{
AuditTypeEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
operation
=
operation
;
this
.
type
=
type
;
}
public
Integer
getCode
()
{
...
...
@@ -29,12 +29,11 @@ public enum AuditTypeEnum {
this
.
code
=
code
;
}
public
String
get
Operation
()
{
return
operation
;
public
String
get
Type
()
{
return
type
;
}
public
void
set
Operation
(
String
operation
)
{
this
.
operation
=
operation
;
public
void
set
Type
(
String
type
)
{
this
.
type
=
type
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/enums/FileCatEnum.java
0 → 100644
View file @
93db1527
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
enums
;
public
enum
FileCatEnum
{
VIDEO_CONTENT
(
"VIDEO_CONTENT"
,
"视频内容"
),
EXHIBITION_BOARD_AUDIO
(
"EXHIBITION_BOARD_AUDIO"
,
"展板音频"
),
EXHIBITION_BOARD_VIDEO
(
"EXHIBITION_BOARD_VIDEO"
,
"展板视频"
),
EXHIBITION_BOARD_DATUM
(
"EXHIBITION_BOARD_DATUM"
,
"展板参考资料"
),
LEARNING_CONTENT
(
"LEARNING_CONTENT"
,
"学习内容"
),
LEARNING_PROJECT
(
"LEARNING_PROJECT"
,
"学习项目"
);
private
String
cat
;
private
String
name
;
FileCatEnum
(
String
cat
,
String
name
)
{
this
.
cat
=
cat
;
this
.
name
=
name
;
}
public
String
getCat
()
{
return
cat
;
}
public
void
setCat
(
String
cat
)
{
this
.
cat
=
cat
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/enums/FileTypeEnum.java
View file @
93db1527
...
...
@@ -2,10 +2,10 @@ package cn.wisenergy.chnmuseum.party.common.enums;
public
enum
FileTypeEnum
{
D
ATUM
(
"Datum"
,
"资料
"
),
IMAGE
(
"I
mage
"
,
"图片"
),
AUDIO
(
"A
udio
"
,
"音频"
),
VIDEO
(
"V
ideo
"
,
"视频"
);
D
OCUMENT
(
"DOCUMENT"
,
"文档
"
),
IMAGE
(
"I
MAGE
"
,
"图片"
),
AUDIO
(
"A
UDIO
"
,
"音频"
),
VIDEO
(
"V
IDEO
"
,
"视频"
);
// 错误编码
private
String
type
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/mybatis/MysqlGenerator.java
View file @
93db1527
...
...
@@ -3,9 +3,9 @@ package cn.wisenergy.chnmuseum.party.common.mybatis;
public
class
MysqlGenerator
{
private
static
final
String
[]
tableNames
=
new
String
[]{
"
t_audi
t"
"
asset"
,
"video_content"
,
"video_content_ca
t"
};
// private static final String projectPath = "D:\\develop\\Project\\chnmuseum-party";
// private static final String projectPath = "D:\\develop\\Project\\chnmuseum-party";
private
static
final
String
projectPath
=
"/opt/ss"
;
public
static
void
main
(
String
[]
args
)
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/util/ImportExcelUtil.java
View file @
93db1527
...
...
@@ -11,7 +11,7 @@ import java.util.List;
import
java.util.Map
;
public
class
ImportExcelUtil
{
// abc.xls
public
static
boolean
isXls
(
String
fileName
)
{
// (?i)忽略大小写
if
(
fileName
.
matches
(
"^.+\\.(?i)(xls)$"
))
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/BasePageOrderParam.java
View file @
93db1527
...
...
@@ -45,11 +45,11 @@ public abstract class BasePageOrderParam extends BasePageParam {
@ApiModelProperty
(
"版权方类型"
)
private
String
ownerType
;
@ApiModelProperty
(
"视频分类ID"
)
private
String
assetType
Id
;
@ApiModelProperty
(
"视频
内容
分类ID"
)
private
String
videoContentCat
Id
;
@ApiModelProperty
(
"视频版权方ID"
)
private
String
asse
tCopyrightOwnerId
;
@ApiModelProperty
(
"视频
内容
版权方ID"
)
private
String
videoConten
tCopyrightOwnerId
;
@ApiModelProperty
(
"展板版权方ID"
)
private
String
boardCopyrightOwnerId
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/BatchUploadResVO.java
View file @
93db1527
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
vo
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -17,6 +18,7 @@ import java.util.List;
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"批量操作响应参数"
,
description
=
"批量操作响应参数"
)
public
class
BatchUploadResVO
{
private
static
final
long
serialVersionUID
=
51873394122822866L
;
@ApiModelProperty
(
"成功数量"
)
...
...
@@ -31,8 +33,8 @@ public class BatchUploadResVO {
@ApiModelProperty
(
"处理结果集合"
)
private
List
<
HandleResult
>
handleList
;
@ApiModelProperty
(
"成功上传的
URL
集合"
)
private
List
<
String
>
url
List
;
@ApiModelProperty
(
"成功上传的
文件
集合"
)
private
List
<
Asset
>
file
List
;
@Data
public
static
class
HandleResult
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/mapper/VideoContentCatMapper.java
0 → 100644
View file @
93db1527
package
cn
.
wisenergy
.
chnmuseum
.
party
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.wisenergy.chnmuseum.party.model.VideoContentCat
;
/**
* <pre>
* 视频内容分类 Mapper 接口
* </pre>
*
* @author Danny Lee
* @since 2021-04-01
*/
public
interface
VideoContentCatMapper
extends
BaseMapper
<
VideoContentCat
>
{
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/mapper/
AssetType
Mapper.java
→
src/main/java/cn/wisenergy/chnmuseum/party/mapper/
VideoContent
Mapper.java
View file @
93db1527
package
cn
.
wisenergy
.
chnmuseum
.
party
.
mapper
;
import
cn.wisenergy.chnmuseum.party.model.AssetType
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.wisenergy.chnmuseum.party.model.VideoContent
;
/**
* <p>
* 视频
分类
Mapper 接口
* </p>
* <p
re
>
* 视频
内容
Mapper 接口
* </p
re
>
*
* @author Danny Lee
* @since 2021-0
3-16
* @since 2021-0
4-01
*/
public
interface
AssetTypeMapper
extends
BaseMapper
<
AssetType
>
{
public
interface
VideoContentMapper
extends
BaseMapper
<
VideoContent
>
{
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/model/Asset.java
View file @
93db1527
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
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* <p>
*
视频
*
文件资产
* </p>
*
* @author Danny Lee
* @since 2021-0
3-16
* @since 2021-0
4-01
*/
@Data
@Builder
...
...
@@ -29,64 +27,59 @@ import java.util.List;
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"asset"
)
@ApiModel
(
value
=
"
视频"
,
description
=
"视频
"
)
@ApiModel
(
value
=
"
文件资产"
,
description
=
"文件资产
"
)
public
class
Asset
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"
视频
ID"
)
@ApiModelProperty
(
"
文件资产
ID"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"视频ID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
@ApiModelProperty
(
"视频名称"
)
@TableField
(
"name"
)
@NotBlank
(
message
=
"视频名称不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
name
;
@ApiModelProperty
(
"所属项ID"
)
@TableField
(
"ref_item_id"
)
private
String
refItemId
;
@ApiModelProperty
(
"视频缩略图"
)
@TableField
(
"thumbnail"
)
@NotBlank
(
message
=
"视频缩略图不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
thumbnail
;
@ApiModelProperty
(
"文件名"
)
@TableField
(
"file_name"
)
private
String
fileName
;
@ApiModelProperty
(
"
视频类别ID
"
)
@TableField
(
"
asset_type_id
"
)
private
String
assetTypeId
;
@ApiModelProperty
(
"
扩展名
"
)
@TableField
(
"
file_ext_name
"
)
private
String
fileExtName
;
@ApiModelProperty
(
"视频版权方ID"
)
@TableField
(
"asset_copyright_owner_id"
)
private
String
assetCopyrightOwnerId
;
@ApiModelProperty
(
"多媒体类型"
)
@TableField
(
"file_type"
)
private
String
fileType
;
@ApiModelProperty
(
"文件大小(B)"
)
@TableField
(
"file_size"
)
private
Long
fileSize
;
@ApiModelProperty
(
"文件分类"
)
@TableField
(
"file_cat"
)
private
String
fileCat
;
@ApiModelProperty
(
"下载链接"
)
@TableField
(
"video_url"
)
private
String
videoUrl
;
@TableField
(
"file_url"
)
private
String
fileUrl
;
@ApiModelProperty
(
"视频缩略图"
)
@TableField
(
"thumbnail"
)
private
String
thumbnail
;
@ApiModelProperty
(
"
审核状态
"
)
@TableField
(
"
audit_status
"
)
private
String
auditStatus
;
@ApiModelProperty
(
"
语言
"
)
@TableField
(
"
language
"
)
private
String
language
;
@ApiModelProperty
(
"
是否上架
"
)
@TableField
(
"
is_published
"
)
private
Boolean
published
;
@ApiModelProperty
(
"
MD5
"
)
@TableField
(
"
md5
"
)
private
String
md5
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"修改日期"
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
"视频分类"
)
@TableField
(
exist
=
false
)
private
String
assetTypeName
;
@ApiModelProperty
(
"视频版权方名称"
)
@TableField
(
exist
=
false
)
private
String
assetCopyrightOwnerName
;
@ApiModelProperty
(
"视频URL列表"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
videoUrlList
;
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
View file @
93db1527
...
...
@@ -29,7 +29,7 @@ import java.util.List;
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"exhibition_board"
)
@ApiModel
(
value
=
"展板
"
,
description
=
"展板
"
)
@ApiModel
(
value
=
"展板
内容"
,
description
=
"展板内容
"
)
public
class
ExhibitionBoard
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -67,31 +67,25 @@ public class ExhibitionBoard implements Serializable {
@NotBlank
(
message
=
"简介不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
remarks
;
@ApiModelProperty
(
"视频版权方ID"
)
@TableField
(
"asset_copyright_owner_id"
)
private
String
assetCopyrightOwnerId
;
@ApiModelProperty
(
"视频内容版权方ID"
)
@TableField
(
"video_content_copyright_owner_id"
)
@NotBlank
(
message
=
"视频内容版权方ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
videoContentCopyrightOwnerId
;
@ApiModelProperty
(
"视频类别ID"
)
@TableField
(
"asset_type_id"
)
private
String
assetTypeId
;
@TableField
(
"video_content_cat_id"
)
@NotBlank
(
message
=
"视频类别ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
videoContentCatId
;
@ApiModelProperty
(
"视频ID"
)
@TableField
(
"asset_id"
)
@NotBlank
(
message
=
"视频ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
assetId
;
@ApiModelProperty
(
"导览音频URL"
)
@TableField
(
"guide_audio_url"
)
private
String
guideAudioUrl
;
@ApiModelProperty
(
"视频内容ID"
)
@TableField
(
"video_content_id"
)
@NotBlank
(
message
=
"视频内容ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
videoContentId
;
@ApiModelProperty
(
"参考资料文件夹"
)
@TableField
(
"ref_material_dir"
)
private
String
refMaterialDir
;
@ApiModelProperty
(
"参考资料URL"
)
@TableField
(
"ref_material_url"
)
private
String
refMaterialUrl
;
@ApiModelProperty
(
"审核状态"
)
@TableField
(
"audit_status"
)
private
String
auditStatus
;
...
...
@@ -108,40 +102,48 @@ public class ExhibitionBoard implements Serializable {
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
"展板
版权方名称
"
)
@ApiModelProperty
(
"展板
音频文件ID列表(添加或更新使用)
"
)
@TableField
(
exist
=
false
)
private
String
boardCopyrightOwnerName
;
private
List
<
String
>
audioIdList
;
@ApiModelProperty
(
"参考资料文件ID列表(添加或更新使用)"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
datumIdList
;
@ApiModelProperty
(
"所属学习内容ID"
)
@TableField
(
exist
=
false
)
private
String
learningContentId
;
@ApiModelProperty
(
"
视频
版权方名称"
)
@ApiModelProperty
(
"
展板
版权方名称"
)
@TableField
(
exist
=
false
)
private
String
asset
CopyrightOwnerName
;
private
String
board
CopyrightOwnerName
;
@ApiModelProperty
(
"展板分类名称"
)
@TableField
(
exist
=
false
)
private
String
exhibitionBoardCatName
;
@ApiModelProperty
(
"
关联视频
名称"
)
@ApiModelProperty
(
"
视频资料-视频内容版权方
名称"
)
@TableField
(
exist
=
false
)
private
String
asset
Name
;
private
String
videoContentCopyrightOwner
Name
;
@ApiModelProperty
(
"
展板视频URL
"
)
@ApiModelProperty
(
"
视频资料-视频内容分类名称
"
)
@TableField
(
exist
=
false
)
private
String
video
Url
;
private
String
video
ContentCatName
;
@ApiModelProperty
(
"
展板视频URL列表
"
)
@ApiModelProperty
(
"
视频资料-视频内容名称
"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
videoUrlList
;
private
String
videoContentName
;
@ApiModelProperty
(
"展板
音频URL列表
"
)
@ApiModelProperty
(
"展板
视频
"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
audioUrl
List
;
private
List
<
Asset
>
video
List
;
@ApiModelProperty
(
"
参考资料URL列表
"
)
@ApiModelProperty
(
"
展板视频
"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
materialUrl
List
;
private
List
<
Asset
>
audio
List
;
@ApiModelProperty
(
"
所属学习内容ID
"
)
@ApiModelProperty
(
"
参考资料列表
"
)
@TableField
(
exist
=
false
)
private
String
learningContentId
;
private
List
<
Asset
>
datumList
;
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/model/VideoContent.java
0 → 100644
View file @
93db1527
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.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* <p>
* 视频
* </p>
*
* @author Danny Lee
* @since 2021-03-16
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"video_content"
)
@ApiModel
(
value
=
"视频内容"
,
description
=
"视频内容"
)
public
class
VideoContent
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"视频内容ID"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"视频内容ID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
@ApiModelProperty
(
"视频内容名称"
)
@TableField
(
"name"
)
@NotBlank
(
message
=
"视频内容名称不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
name
;
@ApiModelProperty
(
"视频内容版权方ID"
)
@TableField
(
"video_content_copyright_owner_id"
)
private
String
videoContentCopyrightOwnerId
;
@ApiModelProperty
(
"视频内容分类ID"
)
@TableField
(
"video_content_cat_id"
)
private
String
videoContentCatId
;
@ApiModelProperty
(
"视频内容缩略图"
)
@TableField
(
"thumbnail"
)
@NotBlank
(
message
=
"视频内容缩略图不能为空"
,
groups
=
{
Add
.
class
})
private
String
thumbnail
;
@ApiModelProperty
(
"审核状态"
)
@TableField
(
"audit_status"
)
private
String
auditStatus
;
@ApiModelProperty
(
"是否上架"
)
@TableField
(
"is_published"
)
private
Boolean
published
;
@ApiModelProperty
(
"是否已删除"
)
@TableField
(
"is_deleted"
)
private
Boolean
deleted
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"修改日期"
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
"视频内容分类名称"
)
@TableField
(
exist
=
false
)
private
String
videoContentCatName
;
@ApiModelProperty
(
"视频内容版权方名称"
)
@TableField
(
exist
=
false
)
private
String
videoContentCopyrightOwnerName
;
@ApiModelProperty
(
"视频ID列表(添加/更新使用)"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
videoIdList
;
@ApiModelProperty
(
"视频文件信息列表"
)
@TableField
(
exist
=
false
)
private
List
<
Asset
>
videoFileList
;
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/model/
AssetType
.java
→
src/main/java/cn/wisenergy/chnmuseum/party/model/
VideoContentCat
.java
View file @
93db1527
...
...
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
/**
* <p>
* 视频分类
* 视频
内容
分类
* </p>
*
* @author Danny Lee
...
...
@@ -27,20 +27,20 @@ import java.time.LocalDateTime;
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"
asset_type
"
)
@ApiModel
(
value
=
"视频
分类"
,
description
=
"视频
分类"
)
public
class
AssetType
implements
Serializable
{
@TableName
(
"
video_content_cat
"
)
@ApiModel
(
value
=
"视频
内容分类"
,
description
=
"视频内容
分类"
)
public
class
VideoContentCat
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"视频分类ID"
)
@ApiModelProperty
(
"视频
内容
分类ID"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"视频
分类IDID
不能为空"
,
groups
=
{
Update
.
class
})
@NotNull
(
message
=
"视频
内容分类
不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
@ApiModelProperty
(
"视频分类名称"
)
@ApiModelProperty
(
"视频
内容
分类名称"
)
@TableField
(
"name"
)
@NotBlank
(
message
=
"视频分类名称不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"视频
内容
分类名称不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
name
;
@ApiModelProperty
(
"备注"
)
...
...
@@ -59,7 +59,7 @@ public class AssetType implements Serializable {
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
"版权方"
)
@ApiModelProperty
(
"版权方
名称
"
)
@TableField
(
exist
=
false
)
private
String
copyrightOwnerName
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/service/LearningContentBoardService.java
View file @
93db1527
...
...
@@ -23,6 +23,6 @@ public interface LearningContentBoardService extends IService<LearningContentBoa
IPage
<
ExhibitionBoard
>
getBoardPageByLearningContentId
(
Page
<
ExhibitionBoard
>
page
,
String
learningContentId
,
String
nameOrCode
);
IPage
<
Asset
>
getAssetPageByOrganCode
(
Page
<
ExhibitionBoard
>
page
,
String
organCode
);
IPage
<
Asset
>
getAssetPageByOrganCode
(
Page
<
Asset
>
page
,
String
organCode
);
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/service/VideoContentCatService.java
0 → 100644
View file @
93db1527
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
;
import
cn.wisenergy.chnmuseum.party.model.VideoContentCat
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 视频内容分类 服务接口
* </p>
*
* @author Danny Lee
* @since 2021-04-01
*/
public
interface
VideoContentCatService
extends
IService
<
VideoContentCat
>
{
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/service/
AssetType
Service.java
→
src/main/java/cn/wisenergy/chnmuseum/party/service/
VideoContent
Service.java
View file @
93db1527
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
;
import
cn.wisenergy.chnmuseum.party.model.
AssetType
;
import
cn.wisenergy.chnmuseum.party.model.
VideoContent
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 视频
分类 服务类
* 视频
内容 服务接口
* </p>
*
* @author Danny Lee
* @since 2021-0
3-16
* @since 2021-0
4-01
*/
public
interface
AssetTypeService
extends
IService
<
AssetType
>
{
public
interface
VideoContentService
extends
IService
<
VideoContent
>
{
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/AssetServiceImpl.java
View file @
93db1527
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
cn.wisenergy.chnmuseum.party.mapper.AssetMapper
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
cn.wisenergy.chnmuseum.party.service.AssetService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/LearningContentBoardServiceImpl.java
View file @
93db1527
...
...
@@ -38,7 +38,7 @@ public class LearningContentBoardServiceImpl extends ServiceImpl<LearningContent
}
@Override
public
IPage
<
Asset
>
getAssetPageByOrganCode
(
Page
<
ExhibitionBoard
>
page
,
String
organCode
)
{
public
IPage
<
Asset
>
getAssetPageByOrganCode
(
Page
<
Asset
>
page
,
String
organCode
)
{
return
learningContentBoardMapper
.
selectAssetPageByOrganCode
(
page
,
organCode
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/
AssetType
ServiceImpl.java
→
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/
VideoContentCat
ServiceImpl.java
View file @
93db1527
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.wisenergy.chnmuseum.party.m
odel.AssetType
;
import
cn.wisenergy.chnmuseum.party.m
apper.AssetTypeMapper
;
import
cn.wisenergy.chnmuseum.party.service.
AssetType
Service
;
import
cn.wisenergy.chnmuseum.party.m
apper.VideoContentCatMapper
;
import
cn.wisenergy.chnmuseum.party.m
odel.VideoContentCat
;
import
cn.wisenergy.chnmuseum.party.service.
VideoContentCat
Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 视频分类 服务实现类
* </p>
* <p
re
>
* 视频
内容
分类 服务实现类
* </p
re
>
*
* @author Danny Lee
* @since 2021-0
3-16
* @since 2021-0
4-01
*/
@Slf4j
@Service
public
class
AssetTypeServiceImpl
extends
ServiceImpl
<
AssetTypeMapper
,
AssetType
>
implements
AssetType
Service
{
public
class
VideoContentCatServiceImpl
extends
ServiceImpl
<
VideoContentCatMapper
,
VideoContentCat
>
implements
VideoContentCat
Service
{
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/VideoContentServiceImpl.java
0 → 100644
View file @
93db1527
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.wisenergy.chnmuseum.party.model.VideoContent
;
import
cn.wisenergy.chnmuseum.party.mapper.VideoContentMapper
;
import
cn.wisenergy.chnmuseum.party.service.VideoContentService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
* <pre>
* 视频内容 服务实现类
* </pre>
*
* @author Danny Lee
* @since 2021-04-01
*/
@Slf4j
@Service
public
class
VideoContentServiceImpl
extends
ServiceImpl
<
VideoContentMapper
,
VideoContent
>
implements
VideoContentService
{
@Autowired
private
VideoContentMapper
videoContentMapper
;
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
93db1527
...
...
@@ -2,21 +2,18 @@ package cn.wisenergy.chnmuseum.party.web.controller;
import
cn.wisenergy.chnmuseum.party.auth.SHA256PasswordEncryptionService
;
import
cn.wisenergy.chnmuseum.party.auth.util.JwtTokenUtil
;
import
cn.wisenergy.chnmuseum.party.common.enums.FileCatEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.FileTypeEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.LanguageEnum
;
import
cn.wisenergy.chnmuseum.party.common.mvc.InterfaceException
;
import
cn.wisenergy.chnmuseum.party.common.util.TimeUtils
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.vo.AudioVo
;
import
cn.wisenergy.chnmuseum.party.common.vo.DatumVo
;
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.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
...
...
@@ -77,6 +74,9 @@ public class ChinaMobileRestApiController extends BaseController {
@Resource
private
AssetServiceImpl
assetService
;
@Resource
private
VideoContentService
videoContentService
;
@Resource
private
TBoxOperationServiceImpl
boxOperationService
;
...
...
@@ -116,12 +116,6 @@ public class ChinaMobileRestApiController extends BaseController {
//用户登录是否被锁定 一小时 redisKey 前缀
private
static
final
String
SHIRO_IS_LOCK
=
"shiro_is_lock_"
;
/**
* 机顶盒激活状态查询
*
* @param
* @return
*/
@ApiOperation
(
value
=
"获取机顶盒密钥"
,
notes
=
"获取机顶盒密钥"
)
@GetMapping
(
"/equitment/key"
)
@RequiresPermissions
(
"equitment:key"
)
...
...
@@ -147,12 +141,6 @@ public class ChinaMobileRestApiController extends BaseController {
return
getFailResult
();
}
/**
* 机顶盒激活状态查询
*
* @param
* @return
*/
@ApiOperation
(
value
=
"机顶盒激活状态查询"
,
notes
=
"机顶盒激活状态查询"
)
@GetMapping
(
"/equitment/activity"
)
@RequiresPermissions
(
"/equitment/activity/"
)
...
...
@@ -174,14 +162,6 @@ public class ChinaMobileRestApiController extends BaseController {
return
getFailResult
();
}
/**
* 管理员ajax登录请求 后端用户登录
*
* @param username
* @param password
* @return
*/
@RequestMapping
(
value
=
"/user/webLogin"
,
method
=
RequestMethod
.
POST
)
public
ResponseEntity
<
JSONObject
>
login
(
@RequestParam
(
value
=
"username"
)
String
username
,
@RequestParam
(
value
=
"password"
)
String
password
,
...
...
@@ -373,22 +353,18 @@ public class ChinaMobileRestApiController extends BaseController {
public
Map
<
String
,
Object
>
getExhibitionBoardPageList
(
@RequestParam
(
value
=
"learningContentId"
)
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
();
exhibitionBoard
.
setLearningContentId
(
learningContentId
);
if
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()
!=
null
)
{
String
name
=
this
.
copyrightOwnerService
.
getById
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()).
getName
();
exhibitionBoard
.
setBoardCopyrightOwnerName
(
name
);
}
if
(
exhibitionBoard
.
getExhibitionBoardCatId
()
!=
null
)
{
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
()));
exhibitionBoard
.
setVideoUrl
(
videoUrl
);
exhibitionBoard
.
setLearningContentId
(
learningContentId
);
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getVideoContentId
()).
eq
(
Asset:
:
getFileType
,
FileTypeEnum
.
VIDEO
.
name
());
List
<
Asset
>
videoList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setVideoList
(
videoList
);
}
return
getResult
(
page
);
}
...
...
@@ -409,29 +385,32 @@ public class ChinaMobileRestApiController extends BaseController {
if
(
boardCopyrightOwnerId
!=
null
)
{
exhibitionBoard
.
setBoardCopyrightOwnerName
(
this
.
copyrightOwnerService
.
getById
(
boardCopyrightOwnerId
).
getName
());
}
if
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()
!=
null
)
{
String
name
=
this
.
copyrightOwnerService
.
getById
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()).
getName
();
exhibitionBoard
.
setVideoContentCopyrightOwnerName
(
name
);
}
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
.
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
()));
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
final
List
<
Asset
>
audioList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setAudioList
(
audioList
);
assetQueryWrapper
.
clear
();
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
Asset
>
datumList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setDatumList
(
datumList
);
final
String
videoContentId
=
exhibitionBoard
.
getVideoContentId
();
if
(
videoContentId
!=
null
)
{
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
);
exhibitionBoard
.
setVideoList
(
videoList
);
}
return
getResult
(
exhibitionBoard
);
}
...
...
@@ -547,11 +526,10 @@ public class ChinaMobileRestApiController extends BaseController {
@ApiOperation
(
value
=
"展板参考资料查询"
,
notes
=
"展板参考资料查询"
)
public
Map
<
String
,
Object
>
getBoardRefMaterial
(
@PathVariable
(
value
=
"boardId"
)
String
boardId
)
{
final
ExhibitionBoard
exhibitionBoard
=
this
.
exhibitionBoardService
.
getById
(
boardId
);
final
String
refMaterialUrl
=
exhibitionBoard
.
getRefMaterialUrl
();
final
List
<
DatumVo
>
datumVoList
=
JSONObject
.
parseObject
(
refMaterialUrl
,
new
TypeReference
<
List
<
DatumVo
>>()
{
},
Feature
.
OrderedField
);
return
getResult
(
datumVoList
);
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
Asset
>
datumList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
return
getResult
(
datumList
);
}
@ApiImplicitParams
(
value
=
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/CopyrightOwnerController.java
View file @
93db1527
...
...
@@ -5,7 +5,7 @@ import cn.wisenergy.chnmuseum.party.common.util.TimeUtils;
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.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.model.
AssetType
;
import
cn.wisenergy.chnmuseum.party.model.
VideoContentCat
;
import
cn.wisenergy.chnmuseum.party.model.CopyrightOwner
;
import
cn.wisenergy.chnmuseum.party.model.CopyrightOwnerAssetType
;
import
cn.wisenergy.chnmuseum.party.model.ExhibitionBoard
;
...
...
@@ -182,8 +182,8 @@ public class CopyrightOwnerController extends BaseController {
List
<
CopyrightOwnerAssetType
>
CopyrightOwnerAssetTypeList
=
this
.
copyrightOwnerAssetTypeService
.
list
(
Wrappers
.<
CopyrightOwnerAssetType
>
lambdaQuery
().
eq
(
CopyrightOwnerAssetType:
:
getCopyrightOwnerId
,
copyrightOwner
.
getId
()));
if
(!
CopyrightOwnerAssetTypeList
.
isEmpty
())
{
Set
<
String
>
idList
=
CopyrightOwnerAssetTypeList
.
stream
().
map
(
CopyrightOwnerAssetType:
:
getAssetTypeId
).
collect
(
Collectors
.
toSet
());
List
<
AssetType
>
assetType
List
=
this
.
assetTypeService
.
listByIds
(
idList
);
String
assetTypeNameList
=
assetTypeList
.
stream
().
map
(
AssetType
:
:
getName
).
collect
(
Collectors
.
joining
(
"、"
));
List
<
VideoContentCat
>
videoContentCat
List
=
this
.
assetTypeService
.
listByIds
(
idList
);
String
assetTypeNameList
=
videoContentCatList
.
stream
().
map
(
VideoContentCat
:
:
getName
).
collect
(
Collectors
.
joining
(
"、"
));
copyrightOwner
.
setAssetTypeNames
(
assetTypeNameList
);
}
}
else
if
(
CopyrightOwnerTypeEnum
.
EXHIBITION_BOARD
.
name
().
equals
(
genericPageParam
.
getOwnerType
()))
{
...
...
@@ -191,8 +191,8 @@ public class CopyrightOwnerController extends BaseController {
List
<
ExhibitionBoard
>
exhibitionBoardList
=
this
.
exhibitionBoardService
.
list
(
lambdaQueryWrapper
);
if
(!
exhibitionBoardList
.
isEmpty
())
{
Set
<
String
>
assetTypeIdList
=
exhibitionBoardList
.
stream
().
map
(
ExhibitionBoard:
:
getAssetTypeId
).
collect
(
Collectors
.
toSet
());
List
<
AssetType
>
assetType
List
=
this
.
assetTypeService
.
listByIds
(
assetTypeIdList
);
String
assetTypeNames
=
assetTypeList
.
stream
().
map
(
AssetType
:
:
getName
).
collect
(
Collectors
.
joining
(
"、"
));
List
<
VideoContentCat
>
videoContentCat
List
=
this
.
assetTypeService
.
listByIds
(
assetTypeIdList
);
String
assetTypeNames
=
videoContentCatList
.
stream
().
map
(
VideoContentCat
:
:
getName
).
collect
(
Collectors
.
joining
(
"、"
));
copyrightOwner
.
setAssetTypeNames
(
assetTypeNames
);
}
}
...
...
@@ -215,9 +215,9 @@ public class CopyrightOwnerController extends BaseController {
if
(!
copyrightOwnerAssetTypeList
.
isEmpty
())
{
List
<
String
>
assetTypeIdArrayList
=
copyrightOwnerAssetTypeList
.
stream
().
map
(
CopyrightOwnerAssetType:
:
getAssetTypeId
).
distinct
().
collect
(
Collectors
.
toList
());
copyrightOwner
.
setAssetTypeIdList
(
assetTypeIdArrayList
);
final
List
<
AssetType
>
assetType
List
=
this
.
assetTypeService
.
listByIds
(
assetTypeIdArrayList
);
if
(!
assetType
List
.
isEmpty
())
{
final
List
<
String
>
assetTypeNameList
=
assetTypeList
.
stream
().
map
(
AssetType
:
:
getName
).
collect
(
Collectors
.
toList
());
final
List
<
VideoContentCat
>
videoContentCat
List
=
this
.
assetTypeService
.
listByIds
(
assetTypeIdArrayList
);
if
(!
videoContentCat
List
.
isEmpty
())
{
final
List
<
String
>
assetTypeNameList
=
videoContentCatList
.
stream
().
map
(
VideoContentCat
:
:
getName
).
collect
(
Collectors
.
toList
());
copyrightOwner
.
setAssetTypeNameList
(
assetTypeNameList
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
93db1527
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/FileUploadController.java
View file @
93db1527
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningContentController.java
View file @
93db1527
...
...
@@ -3,17 +3,13 @@ package cn.wisenergy.chnmuseum.party.web.controller;
import
cn.wisenergy.chnmuseum.party.common.enums.AuditOperationEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.AuditStatusEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.AuditTypeEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.FileCatEnum
;
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.*
;
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.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
...
...
@@ -51,7 +47,9 @@ public class LearningContentController extends BaseController {
@Resource
private
ExhibitionBoardCatService
exhibitionBoardCatService
;
@Resource
private
AssetTypeService
assetTypeService
;
private
VideoContentCatService
videoContentCatService
;
@Resource
private
VideoContentService
videoContentService
;
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
@Resource
...
...
@@ -334,30 +332,32 @@ public class LearningContentController extends BaseController {
if
(
boardCopyrightOwnerId
!=
null
)
{
exhibitionBoard
.
setBoardCopyrightOwnerName
(
this
.
copyrightOwnerService
.
getById
(
boardCopyrightOwnerId
).
getName
());
}
if
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()
!=
null
)
{
String
name
=
this
.
copyrightOwnerService
.
getById
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()).
getName
();
exhibitionBoard
.
setVideoContentCopyrightOwnerName
(
name
);
}
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
.
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
.
setVideoUrl
(
videoUrl
);
exhibitionBoard
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
final
List
<
Asset
>
audioList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setAudioList
(
audioList
);
assetQueryWrapper
.
clear
();
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
Asset
>
datumList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setDatumList
(
datumList
);
String
videoContentId
=
exhibitionBoard
.
getVideoContentId
();
if
(
videoContentId
!=
null
)
{
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
);
exhibitionBoard
.
setVideoList
(
videoList
);
}
}
learningContent
.
setExhibitionBoardList
(
exhibitionBoardList
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/
AssetType
Controller.java
→
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/
VideoContentCat
Controller.java
View file @
93db1527
...
...
@@ -2,12 +2,12 @@ package cn.wisenergy.chnmuseum.party.web.controller;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
cn.wisenergy.chnmuseum.party.model.AssetType
;
import
cn.wisenergy.chnmuseum.party.model.CopyrightOwner
;
import
cn.wisenergy.chnmuseum.party.
service.AssetService
;
import
cn.wisenergy.chnmuseum.party.
service.AssetTypeService
;
import
cn.wisenergy.chnmuseum.party.
model.VideoContent
;
import
cn.wisenergy.chnmuseum.party.
model.VideoContentCat
;
import
cn.wisenergy.chnmuseum.party.service.CopyrightOwnerService
;
import
cn.wisenergy.chnmuseum.party.service.VideoContentCatService
;
import
cn.wisenergy.chnmuseum.party.service.VideoContentService
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -30,7 +30,7 @@ import java.util.stream.Collectors;
/**
* <pre>
* 视频分类 前端控制器
* 视频
内容
分类 前端控制器
* </pre>
*
* @author Danny Lee
...
...
@@ -38,25 +38,25 @@ import java.util.stream.Collectors;
*/
@Slf4j
@RestController
@RequestMapping
(
"/
assetType
"
)
@Api
(
tags
=
{
"视频分类接口"
})
public
class
AssetType
Controller
extends
BaseController
{
@RequestMapping
(
"/
videoContentCat
"
)
@Api
(
tags
=
{
"视频
内容
分类接口"
})
public
class
VideoContentCat
Controller
extends
BaseController
{
@Resource
private
AssetTypeService
assetType
Service
;
private
VideoContentCatService
videoContentCat
Service
;
@Resource
private
AssetService
asse
tService
;
private
VideoContentService
videoConten
tService
;
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
@PostMapping
(
value
=
"/save"
)
@RequiresPermissions
(
"
asset:type
:save"
)
@ApiOperation
(
value
=
"添加视频
分类"
,
notes
=
"添加视频
分类"
)
public
Map
<
String
,
Object
>
save
AssetType
(
@Validated
(
value
=
{
Add
.
class
})
AssetType
assetType
)
{
@RequiresPermissions
(
"
video:content:cat
:save"
)
@ApiOperation
(
value
=
"添加视频
内容分类"
,
notes
=
"添加视频内容
分类"
)
public
Map
<
String
,
Object
>
save
VideoContentCat
(
@Validated
(
value
=
{
Add
.
class
})
VideoContentCat
videoContentCat
)
{
// 保存业务节点信息
boolean
result
=
assetTypeService
.
save
(
assetType
);
boolean
result
=
videoContentCatService
.
save
(
videoContentCat
);
// 返回操作结果
if
(
result
)
{
return
getSuccessResult
();
...
...
@@ -67,31 +67,21 @@ public class AssetTypeController extends BaseController {
}
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
value
=
"修改视频
分类信息"
,
notes
=
"修改视频
分类信息"
)
public
Map
<
String
,
Object
>
update
AssetType
(
@Validated
AssetType
assetType
)
{
boolean
flag
=
assetTypeService
.
updateById
(
assetType
);
@ApiOperation
(
value
=
"修改视频
内容分类信息"
,
notes
=
"修改视频内容
分类信息"
)
public
Map
<
String
,
Object
>
update
VideoContentCat
(
@Validated
VideoContentCat
videoContentCat
)
{
boolean
flag
=
videoContentCatService
.
updateById
(
videoContentCat
);
if
(
flag
)
{
return
getSuccessResult
();
}
return
getFailResult
();
}
@DeleteMapping
(
value
=
"/delete/{id}"
)
@RequiresPermissions
(
"asset:type:delete"
)
@ApiOperation
(
value
=
"根据ID删除视频分类"
,
notes
=
"根据ID删除视频分类"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"path"
,
dataType
=
"String"
)
})
public
Map
<
String
,
Object
>
deleteAssetType
(
@PathVariable
(
"id"
)
String
id
)
{
return
getSuccessResult
();
}
@GetMapping
(
"/getList"
)
@RequiresPermissions
(
"
asset:type
:list"
)
@ApiOperation
(
value
=
"获取视频
分类全部列表(无分页)"
,
notes
=
"获取视频
分类全部列表(无分页)"
)
public
Map
<
String
,
Object
>
get
AssetType
List
()
{
List
<
AssetType
>
assetTypeList
=
assetType
Service
.
list
();
return
getResult
(
assetType
List
);
@RequiresPermissions
(
"
video:content:cat
:list"
)
@ApiOperation
(
value
=
"获取视频
内容分类全部列表(无分页)"
,
notes
=
"获取视频内容
分类全部列表(无分页)"
)
public
Map
<
String
,
Object
>
get
VideoContentCat
List
()
{
List
<
VideoContentCat
>
videoContentCatList
=
videoContentCat
Service
.
list
();
return
getResult
(
videoContentCat
List
);
}
@ApiImplicitParams
(
value
=
{
...
...
@@ -102,51 +92,51 @@ public class AssetTypeController extends BaseController {
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PostMapping
(
"/getPageList"
)
@RequiresPermissions
(
"
asset:type
:page"
)
@ApiOperation
(
value
=
"获取视频
分类分页列表"
,
notes
=
"获取视频
分类分页列表"
)
public
Map
<
String
,
Object
>
get
AssetType
PageList
(
GenericPageParam
genericPageParam
)
{
LambdaQueryWrapper
<
AssetType
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
@RequiresPermissions
(
"
video:content:cat
:page"
)
@ApiOperation
(
value
=
"获取视频
内容分类分页列表"
,
notes
=
"获取视频内容
分类分页列表"
)
public
Map
<
String
,
Object
>
get
VideoContentCat
PageList
(
GenericPageParam
genericPageParam
)
{
LambdaQueryWrapper
<
VideoContentCat
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
queryWrapper
.
like
(
AssetType
:
:
getName
,
genericPageParam
.
getNameOrCode
());
queryWrapper
.
like
(
VideoContentCat
:
:
getName
,
genericPageParam
.
getNameOrCode
());
}
// 根据创建时间区间检索
if
(
genericPageParam
.
getStartDate
()
!=
null
&&
genericPageParam
.
getEndDate
()
!=
null
)
{
queryWrapper
.
ge
(
AssetType
:
:
getCreateTime
,
genericPageParam
.
getStartDate
().
atTime
(
0
,
0
,
0
))
.
le
(
AssetType
:
:
getCreateTime
,
genericPageParam
.
getEndDate
().
atTime
(
23
,
59
,
59
));
queryWrapper
.
ge
(
VideoContentCat
:
:
getCreateTime
,
genericPageParam
.
getStartDate
().
atTime
(
0
,
0
,
0
))
.
le
(
VideoContentCat
:
:
getCreateTime
,
genericPageParam
.
getEndDate
().
atTime
(
23
,
59
,
59
));
}
// 设置排序规则
queryWrapper
.
orderByDesc
(
AssetType
:
:
getCreateTime
);
queryWrapper
.
orderByDesc
(
VideoContentCat
:
:
getCreateTime
);
// 设置查询内容
queryWrapper
.
select
(
AssetType
:
:
getId
,
AssetType
:
:
getName
,
AssetType
:
:
getCreateTime
,
AssetType
:
:
getUpdateTime
);
Page
<
AssetType
>
page
=
this
.
assetType
Service
.
page
(
getPage
(),
queryWrapper
);
for
(
AssetType
assetType
:
page
.
getRecords
())
{
LambdaQueryWrapper
<
Asset
>
lambdaQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getAssetTypeId
,
assetType
.
getId
());
lambdaQueryWrapper
=
lambdaQueryWrapper
.
select
(
Asset:
:
getId
).
select
(
Asset:
:
getAsse
tCopyrightOwnerId
);
List
<
Asset
>
assetList
=
this
.
asse
tService
.
list
(
lambdaQueryWrapper
);
if
(!
asse
tList
.
isEmpty
())
{
final
Set
<
String
>
assetCopyrightOwnerIdList
=
assetList
.
stream
().
map
(
Asset:
:
getAsse
tCopyrightOwnerId
).
collect
(
Collectors
.
toSet
());
VideoContentCat
:
:
getId
,
VideoContentCat
:
:
getName
,
VideoContentCat
:
:
getCreateTime
,
VideoContentCat
:
:
getUpdateTime
);
Page
<
VideoContentCat
>
page
=
this
.
videoContentCat
Service
.
page
(
getPage
(),
queryWrapper
);
for
(
VideoContentCat
videoContentCat
:
page
.
getRecords
())
{
LambdaQueryWrapper
<
VideoContent
>
lambdaQueryWrapper
=
Wrappers
.<
VideoContent
>
lambdaQuery
().
eq
(
VideoContent:
:
getVideoContentCatId
,
videoContentCat
.
getId
());
lambdaQueryWrapper
=
lambdaQueryWrapper
.
select
(
VideoContent:
:
getId
).
select
(
VideoContent:
:
getVideoConten
tCopyrightOwnerId
);
List
<
VideoContent
>
videoContentList
=
this
.
videoConten
tService
.
list
(
lambdaQueryWrapper
);
if
(!
videoConten
tList
.
isEmpty
())
{
final
Set
<
String
>
assetCopyrightOwnerIdList
=
videoContentList
.
stream
().
map
(
VideoContent:
:
getVideoConten
tCopyrightOwnerId
).
collect
(
Collectors
.
toSet
());
List
<
CopyrightOwner
>
copyrightOwnerList
=
this
.
copyrightOwnerService
.
listByIds
(
assetCopyrightOwnerIdList
);
String
copyrightOwnerName
=
copyrightOwnerList
.
stream
().
map
(
CopyrightOwner:
:
getName
).
collect
(
Collectors
.
joining
(
"、"
));
assetType
.
setCopyrightOwnerName
(
copyrightOwnerName
);
videoContentCat
.
setCopyrightOwnerName
(
copyrightOwnerName
);
}
}
return
getResult
(
page
);
}
@ApiOperation
(
value
=
"获取视频
分类详情"
,
notes
=
"获取视频
分类详情"
)
@ApiOperation
(
value
=
"获取视频
内容分类详情"
,
notes
=
"获取视频内容
分类详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
)
})
@GetMapping
(
"/get/{id}"
)
@RequiresPermissions
(
"
asset:type
:get:id"
)
@RequiresPermissions
(
"
video:content:cat
:get:id"
)
public
Map
<
String
,
Object
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
AssetType
assetType
=
assetType
Service
.
getById
(
id
);
return
getResult
(
assetType
);
VideoContentCat
videoContentCat
=
videoContentCat
Service
.
getById
(
id
);
return
getResult
(
videoContentCat
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/
Asse
tController.java
→
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/
VideoConten
tController.java
View file @
93db1527
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/AssetMapper.xml
View file @
93db1527
...
...
@@ -3,23 +3,26 @@
<mapper
namespace=
"cn.wisenergy.chnmuseum.party.mapper.AssetMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.Asset"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"thumbnail"
property=
"thumbnail"
/>
<result
column=
"asset_type_id"
property=
"assetTypeId"
/>
<result
column=
"asset_copyright_owner_id"
property=
"assetCopyrightOwnerId"
/>
<result
column=
"video_url"
property=
"videoUrl"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
<result
column=
"is_published"
property=
"isPublished"
/>
<result
column=
"is_deleted"
property=
"isDeleted"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.VideoContent"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"ref_item_id"
property=
"refItemId"
/>
<result
column=
"file_name"
property=
"fileName"
/>
<result
column=
"file_ext_name"
property=
"fileExtName"
/>
<result
column=
"file_type"
property=
"fileType"
/>
<result
column=
"file_size"
property=
"fileSize"
/>
<result
column=
"file_cat"
property=
"fileCat"
/>
<result
column=
"file_url"
property=
"fileUrl"
/>
<result
column=
"thumbnail"
property=
"thumbnail"
/>
<result
column=
"language"
property=
"language"
/>
<result
column=
"md5"
property=
"md5"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, name, thumbnail, asset_type_id, asset_copyright_owner_id, video_url, audit_status, is_published, is_deleted, create_time, update_time
id, ref_item_id, file_name, file_ext_name, file_type, file_size, file_cat, file_url, thumbnail, language, md5,
create_time, update_time
</sql>
</mapper>
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/AuditMapper.xml
View file @
93db1527
...
...
@@ -54,7 +54,7 @@
a.*,b.`name`,c.user_name AS userName
FROM
t_audit a
LEFT JOIN
asse
t b ON a.ref_item_id = b.id
LEFT JOIN
videoConten
t b ON a.ref_item_id = b.id
LEFT JOIN t_user c ON a.user_id = c.id
${ew.customSqlSegment}
</select>
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/BoardTalkingMapper.xml
View file @
93db1527
...
...
@@ -8,13 +8,13 @@
<result
column=
"board_id"
property=
"boardId"
/>
<result
column=
"real_name"
property=
"realName"
/>
<result
column=
"comment"
property=
"comment"
/>
<result
column=
"
asset"
property=
"asse
t"
/>
<result
column=
"
videoContent"
property=
"videoConten
t"
/>
<result
column=
"create_time"
property=
"createTime"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, board_id, real_name, comment,
asse
t, create_time
id, board_id, real_name, comment,
videoConten
t, create_time
</sql>
</mapper>
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/ExhibitionBoardMapper.xml
View file @
93db1527
...
...
@@ -4,29 +4,29 @@
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.ExhibitionBoard"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"board_copyright_owner_id"
property=
"boardCopyrightOwnerId"
/>
<result
column=
"exhibition_board_cat_id"
property=
"exhibitionBoardCatId"
/>
<result
column=
"cover"
property=
"cover"
/>
<result
column=
"qrcode_url"
property=
"qrcodeUrl"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"asset_copyright_owner_id"
property=
"assetCopyrightOwnerId"
/>
<result
column=
"asset_type_id"
property=
"assetTypeId"
/>
<result
column=
"asset_id"
property=
"assetId"
/>
<result
column=
"guide_audio_url"
property=
"guideAudioUrl"
/>
<result
column=
"ref_material_dir"
property=
"refMaterialDir"
/>
<result
column=
"ref_material_url"
property=
"refMaterialUrl"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
<result
column=
"is_published"
property=
"isPublished"
/>
<result
column=
"is_deleted"
property=
"isDeleted"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"board_copyright_owner_id"
property=
"boardCopyrightOwnerId"
/>
<result
column=
"exhibition_board_cat_id"
property=
"exhibitionBoardCatId"
/>
<result
column=
"cover"
property=
"cover"
/>
<result
column=
"qrcode_url"
property=
"qrcodeUrl"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"video_content_copyright_owner_id"
property=
"videoContentCopyrightOwnerId"
/>
<result
column=
"video_content_cat_id"
property=
"videoContentCatId"
/>
<result
column=
"video_content_id"
property=
"videoContentId"
/>
<result
column=
"ref_material_dir"
property=
"refMaterialDir"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
<result
column=
"is_published"
property=
"isPublished"
/>
<result
column=
"is_deleted"
property=
"isDeleted"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, name, board_copyright_owner_id, exhibition_board_cat_id, cover, qrcode_url, remarks, asset_copyright_owner_id, asset_type_id, asset_id, guide_audio_url, ref_material_dir, ref_material_url, audit_status, is_published, is_deleted, create_time, update_time
id, name, board_copyright_owner_id, exhibition_board_cat_id, cover, qrcode_url, remarks,
video_content_copyright_owner_id, video_content_cat_id, video_content_id, ref_material_dir,
audit_status, is_published, is_deleted, create_time, update_time
</sql>
</mapper>
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/
AssetType
Mapper.xml
→
src/main/resources/mapper/
VideoContentCat
Mapper.xml
View file @
93db1527
<?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.
AssetType
Mapper"
>
<mapper
namespace=
"cn.wisenergy.chnmuseum.party.mapper.
VideoContentCat
Mapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.
AssetType
"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.
VideoContentCat
"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/VideoContentMapper.xml
0 → 100644
View file @
93db1527
<?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.VideoContentMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.VideoContent"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"video_content_copyright_owner_id"
property=
"videoContentCopyrightOwnerId"
/>
<result
column=
"video_content_cat_id"
property=
"videoContentCatId"
/>
<result
column=
"thumbnail"
property=
"thumbnail"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
<result
column=
"is_published"
property=
"published"
/>
<result
column=
"is_deleted"
property=
"deleted"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, name, video_content_copyright_owner_id, video_content_cat_id, thumbnail, audit_status, is_published, is_deleted, create_time, update_time
</sql>
</mapper>
This diff is collapsed.
Click to expand it.
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