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
bc8b34d2
Commit
bc8b34d2
authored
Apr 19, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
97bdfe9a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
1406 additions
and
136 deletions
+1406
-136
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
ExhibitionBoardTmpMapper.java
...ergy/chnmuseum/party/mapper/ExhibitionBoardTmpMapper.java
+16
-0
LearningContentTmpMapper.java
...ergy/chnmuseum/party/mapper/LearningContentTmpMapper.java
+16
-0
VideoContentTmpMapper.java
...senergy/chnmuseum/party/mapper/VideoContentTmpMapper.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
ExhibitionBoardTmp.java
...n/wisenergy/chnmuseum/party/model/ExhibitionBoardTmp.java
+40
-0
LearningContentTmp.java
...n/wisenergy/chnmuseum/party/model/LearningContentTmp.java
+40
-0
VideoContent.java
...java/cn/wisenergy/chnmuseum/party/model/VideoContent.java
+4
-0
VideoContentTmp.java
...a/cn/wisenergy/chnmuseum/party/model/VideoContentTmp.java
+40
-0
AssetTmpService.java
...cn/wisenergy/chnmuseum/party/service/AssetTmpService.java
+16
-0
ExhibitionBoardTmpService.java
...gy/chnmuseum/party/service/ExhibitionBoardTmpService.java
+16
-0
LearningContentTmpService.java
...gy/chnmuseum/party/service/LearningContentTmpService.java
+16
-0
VideoContentTmpService.java
...nergy/chnmuseum/party/service/VideoContentTmpService.java
+16
-0
AssetTmpServiceImpl.java
...rgy/chnmuseum/party/service/impl/AssetTmpServiceImpl.java
+22
-0
AuditServiceImpl.java
...energy/chnmuseum/party/service/impl/AuditServiceImpl.java
+134
-11
ExhibitionBoardTmpServiceImpl.java
...eum/party/service/impl/ExhibitionBoardTmpServiceImpl.java
+22
-0
LearningContentTmpServiceImpl.java
...eum/party/service/impl/LearningContentTmpServiceImpl.java
+22
-0
VideoContentTmpServiceImpl.java
...museum/party/service/impl/VideoContentTmpServiceImpl.java
+22
-0
ExhibitionBoardCatController.java
...um/party/web/controller/ExhibitionBoardCatController.java
+6
-0
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+63
-43
FileUploadController.java
.../chnmuseum/party/web/controller/FileUploadController.java
+456
-0
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+103
-48
TAppVersionController.java
...chnmuseum/party/web/controller/TAppVersionController.java
+7
-6
VideoContentCatController.java
...useum/party/web/controller/VideoContentCatController.java
+5
-0
VideoContentController.java
...hnmuseum/party/web/controller/VideoContentController.java
+61
-27
AssetTmpMapper.xml
src/main/resources/mapper/AssetTmpMapper.xml
+32
-0
ExhibitionBoardTmpMapper.xml
src/main/resources/mapper/ExhibitionBoardTmpMapper.xml
+33
-0
LearningContentTmpMapper.xml
src/main/resources/mapper/LearningContentTmpMapper.xml
+27
-0
VideoContentTmpMapper.xml
src/main/resources/mapper/VideoContentTmpMapper.xml
+24
-0
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/mybatis/MysqlGenerator.java
View file @
bc8b34d2
...
@@ -3,7 +3,7 @@ package cn.wisenergy.chnmuseum.party.common.mybatis;
...
@@ -3,7 +3,7 @@ package cn.wisenergy.chnmuseum.party.common.mybatis;
public
class
MysqlGenerator
{
public
class
MysqlGenerator
{
private
static
final
String
[]
tableNames
=
new
String
[]{
private
static
final
String
[]
tableNames
=
new
String
[]{
"asset"
"asset
_tmp
"
};
};
// 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"
;
private
static
final
String
projectPath
=
"/opt/ss"
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/BatchUploadResVO.java
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
vo
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
vo
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
cn.wisenergy.chnmuseum.party.model.AssetTmp
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -37,6 +38,9 @@ public class BatchUploadResVO {
...
@@ -37,6 +38,9 @@ public class BatchUploadResVO {
@ApiModelProperty
(
"成功上传的文件集合"
)
@ApiModelProperty
(
"成功上传的文件集合"
)
private
Set
<
Asset
>
fileList
;
private
Set
<
Asset
>
fileList
;
@ApiModelProperty
(
"成功上传的文件集合(修改时使用)"
)
private
Set
<
AssetTmp
>
fileTmpList
;
@Data
@Data
public
static
class
HandleResult
{
public
static
class
HandleResult
{
...
...
src/main/java/cn/wisenergy/chnmuseum/party/mapper/AssetTmpMapper.java
0 → 100644
View file @
bc8b34d2
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/mapper/ExhibitionBoardTmpMapper.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.wisenergy.chnmuseum.party.model.ExhibitionBoardTmp
;
/**
* <pre>
* 展板临时 Mapper 接口
* </pre>
*
* @author Danny Lee
* @since 2021-04-17
*/
public
interface
ExhibitionBoardTmpMapper
extends
BaseMapper
<
ExhibitionBoardTmp
>
{
}
src/main/java/cn/wisenergy/chnmuseum/party/mapper/LearningContentTmpMapper.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.wisenergy.chnmuseum.party.model.LearningContentTmp
;
/**
* <pre>
* 学习内容临时 Mapper 接口
* </pre>
*
* @author Danny Lee
* @since 2021-04-17
*/
public
interface
LearningContentTmpMapper
extends
BaseMapper
<
LearningContentTmp
>
{
}
src/main/java/cn/wisenergy/chnmuseum/party/mapper/VideoContentTmpMapper.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.wisenergy.chnmuseum.party.model.VideoContentTmp
;
/**
* <pre>
* 视频内容临时 Mapper 接口
* </pre>
*
* @author Danny Lee
* @since 2021-04-17
*/
public
interface
VideoContentTmpMapper
extends
BaseMapper
<
VideoContentTmp
>
{
}
src/main/java/cn/wisenergy/chnmuseum/party/model/AssetTmp.java
0 → 100644
View file @
bc8b34d2
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 @
bc8b34d2
...
@@ -158,10 +158,18 @@ public class ExhibitionBoard implements Serializable {
...
@@ -158,10 +158,18 @@ public class ExhibitionBoard implements Serializable {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
Asset
>
audioList
;
private
List
<
Asset
>
audioList
;
@ApiModelProperty
(
"展板视频(审核详情使用)"
)
@TableField
(
exist
=
false
)
private
List
<
AssetTmp
>
audioTmpList
;
@ApiModelProperty
(
"参考资料列表"
)
@ApiModelProperty
(
"参考资料列表"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
Asset
>
datumList
;
private
List
<
Asset
>
datumList
;
@ApiModelProperty
(
"参考资料列表(审核详情使用)"
)
@TableField
(
exist
=
false
)
private
List
<
AssetTmp
>
datumTmpList
;
@ApiModelProperty
(
"审核意见记录"
)
@ApiModelProperty
(
"审核意见记录"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
Audit
>
auditHistoryList
;
private
List
<
Audit
>
auditHistoryList
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/ExhibitionBoardTmp.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
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.ApiModelProperty
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
/**
* <p>
* 展板临时
* </p>
*
* @author Danny Lee
* @since 2021-04-17
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"exhibition_board_tmp"
)
public
class
ExhibitionBoardTmp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
hidden
=
true
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
INPUT
)
private
String
id
;
@ApiModelProperty
(
hidden
=
true
)
@TableField
(
"data"
)
private
String
data
;
}
src/main/java/cn/wisenergy/chnmuseum/party/model/LearningContentTmp.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
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.ApiModelProperty
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
/**
* <p>
* 学习内容临时
* </p>
*
* @author Danny Lee
* @since 2021-04-17
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"learning_content_tmp"
)
public
class
LearningContentTmp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
hidden
=
true
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
INPUT
)
private
String
id
;
@ApiModelProperty
(
hidden
=
true
)
@TableField
(
"data"
)
private
String
data
;
}
src/main/java/cn/wisenergy/chnmuseum/party/model/VideoContent.java
View file @
bc8b34d2
...
@@ -93,6 +93,10 @@ public class VideoContent implements Serializable {
...
@@ -93,6 +93,10 @@ public class VideoContent implements Serializable {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
Asset
>
videoFileList
;
private
List
<
Asset
>
videoFileList
;
@ApiModelProperty
(
"视频文件信息列表(审核详情使用)"
)
@TableField
(
exist
=
false
)
private
List
<
AssetTmp
>
videoFileTmpList
;
@ApiModelProperty
(
"审核意见记录"
)
@ApiModelProperty
(
"审核意见记录"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
Audit
>
auditHistoryList
;
private
List
<
Audit
>
auditHistoryList
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/VideoContentTmp.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
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.ApiModelProperty
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
/**
* <p>
* 视频内容临时
* </p>
*
* @author Danny Lee
* @since 2021-04-17
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"video_content_tmp"
)
public
class
VideoContentTmp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
hidden
=
true
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
INPUT
)
private
String
id
;
@ApiModelProperty
(
hidden
=
true
)
@TableField
(
"data"
)
private
String
data
;
}
src/main/java/cn/wisenergy/chnmuseum/party/service/AssetTmpService.java
0 → 100644
View file @
bc8b34d2
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/ExhibitionBoardTmpService.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
;
import
cn.wisenergy.chnmuseum.party.model.ExhibitionBoardTmp
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 展板临时 服务接口
* </p>
*
* @author Danny Lee
* @since 2021-04-17
*/
public
interface
ExhibitionBoardTmpService
extends
IService
<
ExhibitionBoardTmp
>
{
}
src/main/java/cn/wisenergy/chnmuseum/party/service/LearningContentTmpService.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
;
import
cn.wisenergy.chnmuseum.party.model.LearningContentTmp
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 学习内容临时 服务接口
* </p>
*
* @author Danny Lee
* @since 2021-04-17
*/
public
interface
LearningContentTmpService
extends
IService
<
LearningContentTmp
>
{
}
src/main/java/cn/wisenergy/chnmuseum/party/service/VideoContentTmpService.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
;
import
cn.wisenergy.chnmuseum.party.model.VideoContentTmp
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 视频内容临时 服务接口
* </p>
*
* @author Danny Lee
* @since 2021-04-17
*/
public
interface
VideoContentTmpService
extends
IService
<
VideoContentTmp
>
{
}
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/AssetTmpServiceImpl.java
0 → 100644
View file @
bc8b34d2
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 @
bc8b34d2
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/ExhibitionBoardTmpServiceImpl.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.wisenergy.chnmuseum.party.mapper.ExhibitionBoardTmpMapper
;
import
cn.wisenergy.chnmuseum.party.model.ExhibitionBoardTmp
;
import
cn.wisenergy.chnmuseum.party.service.ExhibitionBoardTmpService
;
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-17
*/
@Slf4j
@Service
public
class
ExhibitionBoardTmpServiceImpl
extends
ServiceImpl
<
ExhibitionBoardTmpMapper
,
ExhibitionBoardTmp
>
implements
ExhibitionBoardTmpService
{
}
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/LearningContentTmpServiceImpl.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.wisenergy.chnmuseum.party.mapper.LearningContentTmpMapper
;
import
cn.wisenergy.chnmuseum.party.model.LearningContentTmp
;
import
cn.wisenergy.chnmuseum.party.service.LearningContentTmpService
;
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-17
*/
@Slf4j
@Service
public
class
LearningContentTmpServiceImpl
extends
ServiceImpl
<
LearningContentTmpMapper
,
LearningContentTmp
>
implements
LearningContentTmpService
{
}
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/VideoContentTmpServiceImpl.java
0 → 100644
View file @
bc8b34d2
package
cn
.
wisenergy
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.wisenergy.chnmuseum.party.mapper.VideoContentTmpMapper
;
import
cn.wisenergy.chnmuseum.party.model.VideoContentTmp
;
import
cn.wisenergy.chnmuseum.party.service.VideoContentTmpService
;
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-17
*/
@Slf4j
@Service
public
class
VideoContentTmpServiceImpl
extends
ServiceImpl
<
VideoContentTmpMapper
,
VideoContentTmp
>
implements
VideoContentTmpService
{
}
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardCatController.java
View file @
bc8b34d2
...
@@ -50,6 +50,8 @@ public class ExhibitionBoardCatController extends BaseController {
...
@@ -50,6 +50,8 @@ public class ExhibitionBoardCatController extends BaseController {
@Resource
@Resource
private
ExhibitionBoardService
exhibitionBoardService
;
private
ExhibitionBoardService
exhibitionBoardService
;
@Resource
@Resource
private
ExhibitionBoardTmpService
exhibitionBoardTmpService
;
@Resource
private
ExhibitionBoardCatService
exhibitionBoardCatService
;
private
ExhibitionBoardCatService
exhibitionBoardCatService
;
@Resource
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
private
CopyrightOwnerService
copyrightOwnerService
;
...
@@ -221,6 +223,10 @@ public class ExhibitionBoardCatController extends BaseController {
...
@@ -221,6 +223,10 @@ public class ExhibitionBoardCatController extends BaseController {
LambdaUpdateWrapper
<
LearningContentBoard
>
deleteWrapper2
=
Wrappers
.<
LearningContentBoard
>
lambdaUpdate
().
eq
(
LearningContentBoard:
:
getExhibitionBoardCatId
,
id
);
LambdaUpdateWrapper
<
LearningContentBoard
>
deleteWrapper2
=
Wrappers
.<
LearningContentBoard
>
lambdaUpdate
().
eq
(
LearningContentBoard:
:
getExhibitionBoardCatId
,
id
);
this
.
learningContentBoardService
.
remove
(
deleteWrapper2
);
this
.
learningContentBoardService
.
remove
(
deleteWrapper2
);
final
LambdaQueryWrapper
<
ExhibitionBoard
>
exhibitionBoardLambdaQueryWrapper
=
Wrappers
.<
ExhibitionBoard
>
lambdaQuery
().
eq
(
ExhibitionBoard:
:
getExhibitionBoardCatId
,
id
).
select
(
ExhibitionBoard:
:
getId
);
final
List
<
String
>
exhibitionBoardIdList
=
this
.
exhibitionBoardService
.
listObjs
(
exhibitionBoardLambdaQueryWrapper
,
Object:
:
toString
);
this
.
exhibitionBoardTmpService
.
removeByIds
(
exhibitionBoardIdList
);
// final LambdaUpdateWrapper<VideoContent> updateWrapper = Wrappers.<VideoContent>lambdaUpdate().eq(VideoContent::getVideoContentCopyrightOwnerId, id);
// final LambdaUpdateWrapper<VideoContent> updateWrapper = Wrappers.<VideoContent>lambdaUpdate().eq(VideoContent::getVideoContentCopyrightOwnerId, id);
// updateWrapper.set(VideoContent::getDeleted, true);
// updateWrapper.set(VideoContent::getDeleted, true);
// this.videoContentService.update(updateWrapper);
// this.videoContentService.update(updateWrapper);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
bc8b34d2
...
@@ -10,6 +10,7 @@ import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
...
@@ -10,6 +10,7 @@ import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
import
cn.wisenergy.chnmuseum.party.model.*
;
import
cn.wisenergy.chnmuseum.party.model.*
;
import
cn.wisenergy.chnmuseum.party.service.*
;
import
cn.wisenergy.chnmuseum.party.service.*
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -46,6 +47,8 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -46,6 +47,8 @@ public class ExhibitionBoardController extends BaseController {
@Resource
@Resource
private
ExhibitionBoardService
exhibitionBoardService
;
private
ExhibitionBoardService
exhibitionBoardService
;
@Resource
@Resource
private
ExhibitionBoardTmpService
exhibitionBoardTmpService
;
@Resource
private
ExhibitionBoardCatService
exhibitionBoardCatService
;
private
ExhibitionBoardCatService
exhibitionBoardCatService
;
@Resource
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
private
CopyrightOwnerService
copyrightOwnerService
;
...
@@ -55,6 +58,8 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -55,6 +58,8 @@ public class ExhibitionBoardController extends BaseController {
private
AuditService
auditService
;
private
AuditService
auditService
;
@Resource
@Resource
private
AssetService
assetService
;
private
AssetService
assetService
;
@Resource
private
AssetTmpService
assetTmpService
;
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
@RequiresAuthentication
//@RequiresPermissions("exhibition:board:save")
@RequiresAuthentication
//@RequiresPermissions("exhibition:board:save")
...
@@ -114,49 +119,16 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -114,49 +119,16 @@ public class ExhibitionBoardController extends BaseController {
@ApiOperation
(
value
=
"修改展板信息"
,
notes
=
"修改展板信息"
)
@ApiOperation
(
value
=
"修改展板信息"
,
notes
=
"修改展板信息"
)
@MethodLog
(
operModule
=
OperModule
.
DISPLAYCONTENT
,
operType
=
OperType
.
UPDATE
)
@MethodLog
(
operModule
=
OperModule
.
DISPLAYCONTENT
,
operType
=
OperType
.
UPDATE
)
public
Map
<
String
,
Object
>
updateExhibitionBoard
(
@Validated
(
value
=
{
Update
.
class
})
ExhibitionBoard
exhibitionBoard
)
{
public
Map
<
String
,
Object
>
updateExhibitionBoard
(
@Validated
(
value
=
{
Update
.
class
})
ExhibitionBoard
exhibitionBoard
)
{
TUser
user
=
getcurUser
();
final
boolean
flag
=
this
.
exhibitionBoardTmpService
.
save
(
ExhibitionBoardTmp
.
builder
().
id
(
exhibitionBoard
.
getId
()).
data
(
JSONObject
.
toJSONString
(
exhibitionBoard
)).
build
());
final
VideoContent
videoContent
=
this
.
videoContentService
.
getById
(
exhibitionBoard
.
getVideoContentId
());
exhibitionBoard
.
setVideoContentName
(
videoContent
.
getName
());
exhibitionBoard
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
boolean
flag
=
exhibitionBoardService
.
updateById
(
exhibitionBoard
);
if
(
flag
)
{
if
(
flag
)
{
final
List
<
String
>
audioIdList
=
exhibitionBoard
.
getAudioIdList
();
final
ExhibitionBoard
one
=
this
.
exhibitionBoardService
.
getById
(
exhibitionBoard
.
getId
());
if
(
audioIdList
!=
null
&&
!
audioIdList
.
isEmpty
())
{
one
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
this
.
exhibitionBoardService
.
updateById
(
one
);
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
);
asset
.
setFileType
(
FileTypeEnum
.
AUDIO
.
name
());
asset
.
setFileCat
(
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
asset
.
setRefItemId
(
exhibitionBoard
.
getId
());
this
.
assetService
.
updateById
(
asset
);
collect
.
remove
(
audioId
);
}
collect
.
forEach
((
k
,
v
)
->
this
.
assetService
.
removeById
(
k
));
}
final
List
<
String
>
datumIdList
=
exhibitionBoard
.
getDatumIdList
();
if
(
datumIdList
!=
null
&&
!
datumIdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
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
);
asset
.
setFileCat
(
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
asset
.
setRefItemId
(
exhibitionBoard
.
getId
());
this
.
assetService
.
updateById
(
asset
);
collect
.
remove
(
datumId
);
}
collect
.
forEach
((
k
,
v
)
->
this
.
assetService
.
removeById
(
k
));
}
final
Audit
audit
=
Audit
.
builder
()
final
Audit
audit
=
Audit
.
builder
()
.
content
(
exhibitionBoard
.
getName
())
.
content
(
exhibitionBoard
.
getName
())
.
refItemId
(
exhibitionBoard
.
getId
())
.
refItemId
(
exhibitionBoard
.
getId
())
.
userId
(
user
.
getId
())
.
userId
(
getcurUser
()
.
getId
())
.
type
(
AuditTypeEnum
.
EXHIBITION_BOARD
.
name
())
.
type
(
AuditTypeEnum
.
EXHIBITION_BOARD
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
.
status
(
AuditStatusEnum
.
TBC
.
name
())
.
status
(
AuditStatusEnum
.
TBC
.
name
())
...
@@ -166,7 +138,7 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -166,7 +138,7 @@ public class ExhibitionBoardController extends BaseController {
this
.
auditService
.
save
(
audit
);
this
.
auditService
.
save
(
audit
);
return
getSuccessResult
();
return
getSuccessResult
();
}
}
return
getFailResult
();
return
getFailResult
(
"提交失败!上次提交的修改申请已经在审核中"
);
}
}
@PostMapping
(
"/getList"
)
@PostMapping
(
"/getList"
)
...
@@ -349,6 +321,55 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -349,6 +321,55 @@ public class ExhibitionBoardController extends BaseController {
exhibitionBoard
.
setDatumList
(
datumList
);
exhibitionBoard
.
setDatumList
(
datumList
);
exhibitionBoard
.
setDatumIdList
(
datumList
.
stream
().
map
(
Asset:
:
getId
).
collect
(
Collectors
.
toList
()));
exhibitionBoard
.
setDatumIdList
(
datumList
.
stream
().
map
(
Asset:
:
getId
).
collect
(
Collectors
.
toList
()));
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
);
}
@ApiOperation
(
value
=
"获取展板详情(审核详情使用)"
,
notes
=
"获取展板详情(审核详情使用)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
,
required
=
true
)
})
@GetMapping
(
"/getAudit/{id}"
)
@RequiresAuthentication
//@RequiresPermissions("video:content:get:id")
@MethodLog
(
operModule
=
OperModule
.
VIDEOCONTENT
,
operType
=
OperType
.
SELECT
)
public
Map
<
String
,
Object
>
getAuditInfoById
(
@PathVariable
(
"id"
)
String
id
)
{
final
ExhibitionBoard
exhibitionBoard
=
JSONObject
.
parseObject
(
exhibitionBoardTmpService
.
getById
(
id
).
getData
(),
ExhibitionBoard
.
class
);
String
exhibitionBoardCatId
=
exhibitionBoard
.
getExhibitionBoardCatId
();
if
(
exhibitionBoardCatId
!=
null
)
{
exhibitionBoard
.
setExhibitionBoardCatName
(
this
.
exhibitionBoardCatService
.
getById
(
exhibitionBoardCatId
).
getName
());
}
String
boardCopyrightOwnerId
=
exhibitionBoard
.
getBoardCopyrightOwnerId
();
if
(
boardCopyrightOwnerId
!=
null
)
{
exhibitionBoard
.
setBoardCopyrightOwnerName
(
this
.
copyrightOwnerService
.
getById
(
boardCopyrightOwnerId
).
getName
());
}
if
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()
!=
null
)
{
String
name
=
this
.
copyrightOwnerService
.
getById
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()).
getName
();
exhibitionBoard
.
setVideoContentCopyrightOwnerName
(
name
);
}
LambdaQueryWrapper
<
AssetTmp
>
assetTmpQueryWrapper
=
Wrappers
.<
AssetTmp
>
lambdaQuery
().
eq
(
AssetTmp:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetTmpQueryWrapper
.
eq
(
AssetTmp:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
final
List
<
AssetTmp
>
audioTmpList
=
this
.
assetTmpService
.
list
(
assetTmpQueryWrapper
);
exhibitionBoard
.
setAudioTmpList
(
audioTmpList
);
exhibitionBoard
.
setAudioIdList
(
audioTmpList
.
stream
().
map
(
AssetTmp:
:
getId
).
collect
(
Collectors
.
toList
()));
assetTmpQueryWrapper
.
clear
();
assetTmpQueryWrapper
=
Wrappers
.<
AssetTmp
>
lambdaQuery
().
eq
(
AssetTmp:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetTmpQueryWrapper
.
eq
(
AssetTmp:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
AssetTmp
>
datumTmpList
=
this
.
assetTmpService
.
list
(
assetTmpQueryWrapper
);
exhibitionBoard
.
setDatumTmpList
(
datumTmpList
);
exhibitionBoard
.
setDatumIdList
(
datumTmpList
.
stream
().
map
(
AssetTmp:
:
getId
).
collect
(
Collectors
.
toList
()));
final
LambdaQueryWrapper
<
Audit
>
auditQueryWrapper
=
Wrappers
.<
Audit
>
lambdaQuery
().
eq
(
Audit:
:
getRefItemId
,
id
);
final
LambdaQueryWrapper
<
Audit
>
auditQueryWrapper
=
Wrappers
.<
Audit
>
lambdaQuery
().
eq
(
Audit:
:
getRefItemId
,
id
);
auditQueryWrapper
.
select
(
Audit:
:
getContent
);
auditQueryWrapper
.
select
(
Audit:
:
getContent
);
auditQueryWrapper
.
select
(
Audit:
:
getType
);
auditQueryWrapper
.
select
(
Audit:
:
getType
);
...
@@ -367,10 +388,9 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -367,10 +388,9 @@ public class ExhibitionBoardController extends BaseController {
final
VideoContent
videoContent
=
this
.
videoContentService
.
getById
(
videoContentId
);
final
VideoContent
videoContent
=
this
.
videoContentService
.
getById
(
videoContentId
);
exhibitionBoard
.
setVideoContentName
(
videoContent
.
getName
());
exhibitionBoard
.
setVideoContentName
(
videoContent
.
getName
());
assetQueryWrapper
.
clear
();
final
LambdaQueryWrapper
<
Asset
>
lambdaQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
);
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
);
lambdaQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
VIDEO_CONTENT
.
name
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
VIDEO_CONTENT
.
name
());
final
List
<
Asset
>
videoList
=
this
.
assetService
.
list
(
lambdaQueryWrapper
);
final
List
<
Asset
>
videoList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setVideoList
(
videoList
);
exhibitionBoard
.
setVideoList
(
videoList
);
}
}
return
getResult
(
exhibitionBoard
);
return
getResult
(
exhibitionBoard
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/FileUploadController.java
View file @
bc8b34d2
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningContentController.java
View file @
bc8b34d2
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TAppVersionController.java
View file @
bc8b34d2
...
@@ -3,25 +3,26 @@ package cn.wisenergy.chnmuseum.party.web.controller;
...
@@ -3,25 +3,26 @@ package cn.wisenergy.chnmuseum.party.web.controller;
import
cn.wisenergy.chnmuseum.party.common.log.MethodLog
;
import
cn.wisenergy.chnmuseum.party.common.log.MethodLog
;
import
cn.wisenergy.chnmuseum.party.common.log.OperModule
;
import
cn.wisenergy.chnmuseum.party.common.log.OperModule
;
import
cn.wisenergy.chnmuseum.party.common.log.OperType
;
import
cn.wisenergy.chnmuseum.party.common.log.OperType
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
cn.wisenergy.chnmuseum.party.model.TAppVersion
;
import
cn.wisenergy.chnmuseum.party.model.TUser
;
import
cn.wisenergy.chnmuseum.party.model.TUser
;
import
cn.wisenergy.chnmuseum.party.service.TAppVersionService
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.model.TAppVersion
;
import
cn.wisenergy.chnmuseum.party.service.TAppVersionService
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresAuthentication
;
import
org.apache.shiro.authz.annotation.RequiresAuthentication
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.util.List
;
import
java.util.List
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/VideoContentCatController.java
View file @
bc8b34d2
...
@@ -52,6 +52,9 @@ public class VideoContentCatController extends BaseController {
...
@@ -52,6 +52,9 @@ public class VideoContentCatController extends BaseController {
@Resource
@Resource
private
VideoContentService
videoContentService
;
private
VideoContentService
videoContentService
;
@Resource
private
VideoContentTmpService
videoContentTmpService
;
@Resource
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
private
CopyrightOwnerService
copyrightOwnerService
;
...
@@ -181,6 +184,8 @@ public class VideoContentCatController extends BaseController {
...
@@ -181,6 +184,8 @@ public class VideoContentCatController extends BaseController {
final
LambdaQueryWrapper
<
VideoContent
>
lambdaQueryWrapper
=
Wrappers
.<
VideoContent
>
lambdaQuery
().
eq
(
VideoContent:
:
getVideoContentCatId
,
id
).
select
(
VideoContent:
:
getId
);
final
LambdaQueryWrapper
<
VideoContent
>
lambdaQueryWrapper
=
Wrappers
.<
VideoContent
>
lambdaQuery
().
eq
(
VideoContent:
:
getVideoContentCatId
,
id
).
select
(
VideoContent:
:
getId
);
final
List
<
String
>
videoContentIdList
=
this
.
videoContentService
.
listObjs
(
lambdaQueryWrapper
,
Object:
:
toString
);
final
List
<
String
>
videoContentIdList
=
this
.
videoContentService
.
listObjs
(
lambdaQueryWrapper
,
Object:
:
toString
);
this
.
videoContentTmpService
.
removeByIds
(
videoContentIdList
);
final
LambdaQueryWrapper
<
ExhibitionBoard
>
queryWrapper
=
Wrappers
.<
ExhibitionBoard
>
lambdaQuery
().
in
(
ExhibitionBoard:
:
getVideoContentId
,
videoContentIdList
).
select
(
ExhibitionBoard:
:
getId
);
final
LambdaQueryWrapper
<
ExhibitionBoard
>
queryWrapper
=
Wrappers
.<
ExhibitionBoard
>
lambdaQuery
().
in
(
ExhibitionBoard:
:
getVideoContentId
,
videoContentIdList
).
select
(
ExhibitionBoard:
:
getId
);
final
List
<
String
>
ExhibitionBoardIdList
=
this
.
exhibitionBoardService
.
listObjs
(
queryWrapper
,
Object:
:
toString
);
final
List
<
String
>
ExhibitionBoardIdList
=
this
.
exhibitionBoardService
.
listObjs
(
queryWrapper
,
Object:
:
toString
);
this
.
exhibitionBoardService
.
removeByIds
(
ExhibitionBoardIdList
);
this
.
exhibitionBoardService
.
removeByIds
(
ExhibitionBoardIdList
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/VideoContentController.java
View file @
bc8b34d2
...
@@ -10,6 +10,7 @@ import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
...
@@ -10,6 +10,7 @@ import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
import
cn.wisenergy.chnmuseum.party.model.*
;
import
cn.wisenergy.chnmuseum.party.model.*
;
import
cn.wisenergy.chnmuseum.party.service.*
;
import
cn.wisenergy.chnmuseum.party.service.*
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -44,14 +45,25 @@ public class VideoContentController extends BaseController {
...
@@ -44,14 +45,25 @@ public class VideoContentController extends BaseController {
@Resource
@Resource
private
ExhibitionBoardService
exhibitionBoardService
;
private
ExhibitionBoardService
exhibitionBoardService
;
@Resource
@Resource
private
VideoContentService
videoContentService
;
private
VideoContentService
videoContentService
;
@Resource
private
VideoContentTmpService
videoContentTmpService
;
@Resource
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
private
CopyrightOwnerService
copyrightOwnerService
;
@Resource
@Resource
private
VideoContentCatService
videoContentCatService
;
private
VideoContentCatService
videoContentCatService
;
@Resource
@Resource
private
AssetService
assetService
;
private
AssetService
assetService
;
@Resource
private
AssetTmpService
assetTmpService
;
@Resource
@Resource
private
AuditService
auditService
;
private
AuditService
auditService
;
...
@@ -107,36 +119,15 @@ public class VideoContentController extends BaseController {
...
@@ -107,36 +119,15 @@ public class VideoContentController extends BaseController {
@ApiOperation
(
value
=
"修改视频内容信息"
,
notes
=
"修改视频内容信息"
)
@ApiOperation
(
value
=
"修改视频内容信息"
,
notes
=
"修改视频内容信息"
)
@MethodLog
(
operModule
=
OperModule
.
VIDEOCONTENT
,
operType
=
OperType
.
UPDATE
)
@MethodLog
(
operModule
=
OperModule
.
VIDEOCONTENT
,
operType
=
OperType
.
UPDATE
)
public
Map
<
String
,
Object
>
updateVideoContent
(
@Validated
(
value
=
{
Update
.
class
})
VideoContent
videoContent
)
{
public
Map
<
String
,
Object
>
updateVideoContent
(
@Validated
(
value
=
{
Update
.
class
})
VideoContent
videoContent
)
{
TUser
user
=
getcurUser
();
final
boolean
flag
=
this
.
videoContentTmpService
.
save
(
VideoContentTmp
.
builder
().
id
(
videoContent
.
getId
()).
data
(
JSONObject
.
toJSONString
(
videoContent
)).
build
());
videoContent
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
boolean
flag
=
videoContentService
.
updateById
(
videoContent
);
if
(
flag
)
{
if
(
flag
)
{
final
List
<
String
>
videoFileIdList
=
videoContent
.
getVideoFileIdList
();
final
VideoContent
one
=
this
.
videoContentService
.
getById
(
videoContent
.
getId
());
if
(
videoFileIdList
!=
null
&&
!
videoFileIdList
.
isEmpty
())
{
one
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContent
.
getId
());
this
.
videoContentService
.
updateById
(
one
);
final
List
<
Asset
>
assetList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
final
Map
<
String
,
String
>
collect
=
assetList
.
stream
().
collect
(
Collectors
.
toMap
(
Asset:
:
getId
,
Asset:
:
getFileUrl
));
for
(
String
videoFileId
:
videoFileIdList
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
videoFileId
);
asset
.
setThumbnail
(
videoContent
.
getThumbnail
());
asset
.
setFileType
(
FileTypeEnum
.
VIDEO
.
name
());
asset
.
setFileCat
(
FileCatEnum
.
VIDEO_CONTENT
.
name
());
asset
.
setRefItemId
(
videoContent
.
getId
());
this
.
assetService
.
updateById
(
asset
);
if
(
StringUtils
.
isBlank
(
videoContent
.
getName
()))
{
videoContent
.
setName
(
asset
.
getVideoContentName
());
this
.
videoContentService
.
updateById
(
videoContent
);
}
collect
.
remove
(
videoFileId
);
}
collect
.
forEach
((
k
,
v
)
->
this
.
assetService
.
removeById
(
k
));
}
final
Audit
audit
=
Audit
.
builder
()
final
Audit
audit
=
Audit
.
builder
()
.
content
(
videoContent
.
getName
())
.
content
(
videoContent
.
getName
())
.
userId
(
user
.
getId
())
.
userId
(
getcurUser
()
.
getId
())
.
refItemId
(
videoContent
.
getId
())
.
refItemId
(
videoContent
.
getId
())
.
type
(
AuditTypeEnum
.
VIDEO_CONTENT
.
name
())
.
type
(
AuditTypeEnum
.
VIDEO_CONTENT
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
...
@@ -147,7 +138,7 @@ public class VideoContentController extends BaseController {
...
@@ -147,7 +138,7 @@ public class VideoContentController extends BaseController {
this
.
auditService
.
save
(
audit
);
this
.
auditService
.
save
(
audit
);
return
getSuccessResult
();
return
getSuccessResult
();
}
}
return
getFailResult
();
return
getFailResult
(
"提交失败!上次提交的修改申请已经在审核中"
);
}
}
@GetMapping
(
"/getExhibitionBoardById/{id}"
)
@GetMapping
(
"/getExhibitionBoardById/{id}"
)
...
@@ -299,6 +290,49 @@ public class VideoContentController extends BaseController {
...
@@ -299,6 +290,49 @@ public class VideoContentController extends BaseController {
return
getResult
(
videoContent
);
return
getResult
(
videoContent
);
}
}
@ApiOperation
(
value
=
"获取视频内容详情(审核详情使用)"
,
notes
=
"获取视频内容详情(审核详情使用)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
,
required
=
true
)
})
@GetMapping
(
"/getAudit/{id}"
)
@RequiresAuthentication
//@RequiresPermissions("video:content:get:id")
@MethodLog
(
operModule
=
OperModule
.
VIDEOCONTENT
,
operType
=
OperType
.
SELECT
)
public
Map
<
String
,
Object
>
getAuditInfoById
(
@PathVariable
(
"id"
)
String
id
)
{
final
VideoContent
videoContent
=
JSONObject
.
parseObject
(
videoContentTmpService
.
getById
(
id
).
getData
(),
VideoContent
.
class
);
if
(
videoContent
.
getVideoContentCatId
()
!=
null
)
{
VideoContentCat
videoContentCat
=
this
.
videoContentCatService
.
getById
(
videoContent
.
getVideoContentCatId
());
if
(
videoContentCat
!=
null
)
{
videoContent
.
setVideoContentCatName
(
videoContentCat
.
getName
());
}
}
if
(
videoContent
.
getVideoContentCopyrightOwnerId
()
!=
null
)
{
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
videoContent
.
getVideoContentCopyrightOwnerId
());
if
(
copyrightOwner
!=
null
)
{
videoContent
.
setVideoContentCopyrightOwnerName
(
copyrightOwner
.
getName
());
}
}
final
LambdaQueryWrapper
<
AssetTmp
>
assetQueryWrapper
=
Wrappers
.<
AssetTmp
>
lambdaQuery
().
eq
(
AssetTmp:
:
getRefItemId
,
id
);
assetQueryWrapper
.
eq
(
AssetTmp:
:
getFileCat
,
FileCatEnum
.
VIDEO_CONTENT
.
name
());
final
List
<
AssetTmp
>
videoFileList
=
this
.
assetTmpService
.
list
(
assetQueryWrapper
);
videoContent
.
setVideoFileTmpList
(
videoFileList
);
videoContent
.
setVideoFileIdList
(
videoFileList
.
stream
().
map
(
AssetTmp:
:
getId
).
collect
(
Collectors
.
toList
()));
final
LambdaQueryWrapper
<
Audit
>
auditQueryWrapper
=
Wrappers
.<
Audit
>
lambdaQuery
().
eq
(
Audit:
:
getRefItemId
,
id
);
auditQueryWrapper
.
select
(
Audit:
:
getContent
);
auditQueryWrapper
.
select
(
Audit:
:
getType
);
auditQueryWrapper
.
select
(
Audit:
:
getOperation
);
auditQueryWrapper
.
select
(
Audit:
:
getStatus
);
auditQueryWrapper
.
select
(
Audit:
:
getFirstTime
);
auditQueryWrapper
.
select
(
Audit:
:
getFirstRemarks
);
auditQueryWrapper
.
select
(
Audit:
:
getSecondTime
);
auditQueryWrapper
.
select
(
Audit:
:
getSecondTime
);
auditQueryWrapper
.
select
(
Audit:
:
getLevel
);
final
List
<
Audit
>
auditList
=
this
.
auditService
.
list
(
auditQueryWrapper
);
videoContent
.
setAuditHistoryList
(
auditList
);
return
getResult
(
videoContent
);
}
@DeleteMapping
(
"/delete/{id}"
)
@DeleteMapping
(
"/delete/{id}"
)
@RequiresAuthentication
//@RequiresPermissions("video:content:delete")
@RequiresAuthentication
//@RequiresPermissions("video:content:delete")
@ApiOperation
(
value
=
"根据ID删除视频内容"
,
notes
=
"根据ID删除视频内容"
)
@ApiOperation
(
value
=
"根据ID删除视频内容"
,
notes
=
"根据ID删除视频内容"
)
...
...
src/main/resources/mapper/AssetTmpMapper.xml
0 → 100644
View file @
bc8b34d2
<?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>
src/main/resources/mapper/ExhibitionBoardTmpMapper.xml
0 → 100644
View file @
bc8b34d2
<?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.ExhibitionBoardTmpMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.ExhibitionBoardTmp"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"serial_no"
property=
"serialNo"
/>
<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, serial_no, 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>
src/main/resources/mapper/LearningContentTmpMapper.xml
0 → 100644
View file @
bc8b34d2
<?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.LearningContentTmpMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.LearningContentTmp"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"cover"
property=
"cover"
/>
<result
column=
"applicable_scope"
property=
"applicableScope"
/>
<result
column=
"organ_code"
property=
"organCode"
/>
<result
column=
"learning_project_id"
property=
"learningProjectId"
/>
<result
column=
"creator_name"
property=
"creatorName"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
<result
column=
"is_published"
property=
"isPublished"
/>
<result
column=
"is_deleted"
property=
"isDeleted"
/>
<result
column=
"sortorder"
property=
"sortorder"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, name, cover, applicable_scope, organ_code, learning_project_id, creator_name, audit_status, is_published, is_deleted, sortorder, create_time, update_time
</sql>
</mapper>
src/main/resources/mapper/VideoContentTmpMapper.xml
0 → 100644
View file @
bc8b34d2
<?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.VideoContentTmpMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.VideoContentTmp"
>
<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=
"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, video_content_copyright_owner_id, video_content_cat_id, thumbnail, audit_status, is_published, is_deleted, 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