Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liqin
chnmuseum-party
Commits
bae61124
Commit
bae61124
authored
Apr 02, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
4e1ccb17
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
24 deletions
+21
-24
Audit.java
src/main/java/cn/wisenergy/chnmuseum/party/model/Audit.java
+2
-2
CopyrightOwnerVideoContentCat.java
.../chnmuseum/party/model/CopyrightOwnerVideoContentCat.java
+6
-9
ExhibitionBoard.java
...a/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
+2
-2
VideoContent.java
...java/cn/wisenergy/chnmuseum/party/model/VideoContent.java
+2
-2
VideoContentController.java
...hnmuseum/party/web/controller/VideoContentController.java
+9
-9
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/model/Audit.java
View file @
bae61124
...
...
@@ -56,9 +56,9 @@ public class Audit implements Serializable {
@NotBlank
(
message
=
"提交人员不能为空"
,
groups
=
{
Add
.
class
})
private
String
userId
;
@ApiModelProperty
(
value
=
"审核内容"
,
allowableValues
=
"
ASSE
T,EXHIBITION_BOARD,LEARNING_CONTENT,ACCOUNT"
)
@ApiModelProperty
(
value
=
"审核内容"
,
allowableValues
=
"
VIDEO_CONTEN
T,EXHIBITION_BOARD,LEARNING_CONTENT,ACCOUNT"
)
@TableField
(
"type"
)
@NotBlank
(
message
=
"0,看板;1 视频;2 学习内容;3 账号禁用不能为空"
,
groups
=
{
Add
.
class
})
@NotBlank
(
message
=
"0,看板;1 视频
内容
;2 学习内容;3 账号禁用不能为空"
,
groups
=
{
Add
.
class
})
private
String
type
;
@ApiModelProperty
(
"操作类型"
)
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/CopyrightOwnerVideoContentCat.java
View file @
bae61124
...
...
@@ -30,7 +30,7 @@ import java.io.Serializable;
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"copyright_owner_video_content_cat"
)
@ApiModel
(
value
=
"版权方视频
分类"
,
description
=
"版权方视频
分类"
)
@ApiModel
(
value
=
"版权方视频
内容分类"
,
description
=
"版权方视频内容
分类"
)
public
class
CopyrightOwnerVideoContentCat
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -50,7 +50,4 @@ public class CopyrightOwnerVideoContentCat implements Serializable {
@NotBlank
(
message
=
"视频内容分类ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
videoContentCatId
;
}
src/main/java/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
View file @
bae61124
...
...
@@ -72,9 +72,9 @@ public class ExhibitionBoard implements Serializable {
@NotBlank
(
message
=
"视频内容版权方ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
videoContentCopyrightOwnerId
;
@ApiModelProperty
(
"视频类别ID"
)
@ApiModelProperty
(
"视频
内容
类别ID"
)
@TableField
(
"video_content_cat_id"
)
@NotBlank
(
message
=
"视频类别ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"视频
内容
类别ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
videoContentCatId
;
@ApiModelProperty
(
"视频内容ID"
)
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/VideoContent.java
View file @
bae61124
...
...
@@ -85,9 +85,9 @@ public class VideoContent implements Serializable {
@TableField
(
exist
=
false
)
private
String
videoContentCopyrightOwnerName
;
@ApiModelProperty
(
"视频ID列表(添加/更新使用)"
)
@ApiModelProperty
(
"视频
文件
ID列表(添加/更新使用)"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
videoIdList
;
private
List
<
String
>
video
File
IdList
;
@ApiModelProperty
(
"视频文件信息列表"
)
@TableField
(
exist
=
false
)
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/VideoContentController.java
View file @
bae61124
...
...
@@ -55,8 +55,8 @@ public class VideoContentController extends BaseController {
@RequiresPermissions
(
"video:content:save"
)
@ApiOperation
(
value
=
"添加视频内容"
,
notes
=
"添加视频内容"
)
public
Map
<
String
,
Object
>
saveAsset
(
@Validated
(
value
=
{
Add
.
class
})
VideoContent
videoContent
)
{
final
List
<
String
>
video
IdList
=
videoContent
.
getVideo
IdList
();
if
(
video
IdList
==
null
||
video
IdList
.
isEmpty
())
{
final
List
<
String
>
video
FileIdList
=
videoContent
.
getVideoFile
IdList
();
if
(
video
FileIdList
==
null
||
videoFile
IdList
.
isEmpty
())
{
return
getFailResult
(
"400"
,
"视频文件必须上传"
);
}
videoContent
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
...
...
@@ -66,8 +66,8 @@ public class VideoContentController extends BaseController {
boolean
result
=
videoContentService
.
save
(
videoContent
);
// 返回操作结果
if
(
result
)
{
for
(
String
video
Id
:
video
IdList
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
videoId
);
for
(
String
video
FileId
:
videoFile
IdList
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
video
File
Id
);
asset
.
setThumbnail
(
videoContent
.
getThumbnail
());
asset
.
setFileType
(
FileTypeEnum
.
VIDEO
.
name
());
asset
.
setFileCat
(
FileCatEnum
.
VIDEO_CONTENT
.
name
());
...
...
@@ -96,19 +96,19 @@ public class VideoContentController extends BaseController {
videoContent
.
setDeleted
(
false
);
boolean
flag
=
videoContentService
.
updateById
(
videoContent
);
if
(
flag
)
{
final
List
<
String
>
video
IdList
=
videoContent
.
getVideo
IdList
();
if
(
video
IdList
!=
null
&&
!
video
IdList
.
isEmpty
())
{
final
List
<
String
>
video
FileIdList
=
videoContent
.
getVideoFile
IdList
();
if
(
video
FileIdList
!=
null
&&
!
videoFile
IdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContent
.
getId
());
final
List
<
Asset
>
assetList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
final
Map
<
String
,
String
>
collect
=
assetList
.
stream
().
collect
(
Collectors
.
toMap
(
Asset:
:
getId
,
Asset:
:
getFileUrl
));
for
(
String
video
Id
:
video
IdList
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
videoId
);
for
(
String
video
FileId
:
videoFile
IdList
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
video
File
Id
);
asset
.
setThumbnail
(
videoContent
.
getThumbnail
());
asset
.
setFileType
(
FileTypeEnum
.
VIDEO
.
name
());
asset
.
setFileCat
(
FileCatEnum
.
VIDEO_CONTENT
.
name
());
asset
.
setRefItemId
(
videoContent
.
getId
());
this
.
assetService
.
updateById
(
asset
);
collect
.
remove
(
videoId
);
collect
.
remove
(
video
File
Id
);
}
collect
.
forEach
((
k
,
v
)
->
{
final
boolean
deleted
=
this
.
assetService
.
removeById
(
k
);
...
...
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