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
849abb9c
Commit
849abb9c
authored
Apr 23, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
f7d53dcb
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
281 additions
and
380 deletions
+281
-380
MysqlGenerator.java
...ava/cn/chnmuseum/party/common/mybatis/MysqlGenerator.java
+1
-1
BatchUploadResVO.java
...n/java/cn/chnmuseum/party/common/vo/BatchUploadResVO.java
+0
-4
AssetMapper.java
src/main/java/cn/chnmuseum/party/mapper/AssetMapper.java
+1
-0
AssetTmpMapper.java
src/main/java/cn/chnmuseum/party/mapper/AssetTmpMapper.java
+0
-16
ExhibitionBoardTmpMapper.java
...a/cn/chnmuseum/party/mapper/ExhibitionBoardTmpMapper.java
+0
-16
LearningContentBoardMapper.java
...cn/chnmuseum/party/mapper/LearningContentBoardMapper.java
+6
-0
LearningContentTmpMapper.java
...a/cn/chnmuseum/party/mapper/LearningContentTmpMapper.java
+0
-16
VideoContentTmpMapper.java
...java/cn/chnmuseum/party/mapper/VideoContentTmpMapper.java
+0
-16
Asset.java
src/main/java/cn/chnmuseum/party/model/Asset.java
+4
-0
EmployeeRole.java
src/main/java/cn/chnmuseum/party/model/EmployeeRole.java
+1
-1
VideoContent.java
src/main/java/cn/chnmuseum/party/model/VideoContent.java
+0
-4
AssetTmpService.java
...main/java/cn/chnmuseum/party/service/AssetTmpService.java
+0
-16
ExhibitionBoardTmpService.java
...cn/chnmuseum/party/service/ExhibitionBoardTmpService.java
+0
-16
LearningContentTmpService.java
...cn/chnmuseum/party/service/LearningContentTmpService.java
+0
-16
VideoContentTmpService.java
...va/cn/chnmuseum/party/service/VideoContentTmpService.java
+0
-16
AssetTmpServiceImpl.java
.../cn/chnmuseum/party/service/impl/AssetTmpServiceImpl.java
+0
-22
AuditServiceImpl.java
...ava/cn/chnmuseum/party/service/impl/AuditServiceImpl.java
+110
-9
ExhibitionBoardTmpServiceImpl.java
...eum/party/service/impl/ExhibitionBoardTmpServiceImpl.java
+0
-22
LearningContentTmpServiceImpl.java
...eum/party/service/impl/LearningContentTmpServiceImpl.java
+0
-22
VideoContentTmpServiceImpl.java
...museum/party/service/impl/VideoContentTmpServiceImpl.java
+0
-22
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+11
-11
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+20
-0
FileUploadController.java
.../chnmuseum/party/web/controller/FileUploadController.java
+0
-3
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+127
-15
AssetTmpMapper.xml
src/main/resources/mapper/AssetTmpMapper.xml
+0
-32
ExhibitionBoardTmpMapper.xml
src/main/resources/mapper/ExhibitionBoardTmpMapper.xml
+0
-33
LearningContentTmpMapper.xml
src/main/resources/mapper/LearningContentTmpMapper.xml
+0
-27
VideoContentTmpMapper.xml
src/main/resources/mapper/VideoContentTmpMapper.xml
+0
-24
No files found.
src/main/java/cn/chnmuseum/party/common/mybatis/MysqlGenerator.java
View file @
849abb9c
...
...
@@ -3,7 +3,7 @@ package cn.chnmuseum.party.common.mybatis;
public
class
MysqlGenerator
{
private
static
final
String
[]
tableNames
=
new
String
[]{
"
t_audit
"
"
asset_tmp
"
};
// private static final String projectPath = "D:\\develop\\Project\\chnmuseum-party";
private
static
final
String
projectPath
=
"/opt/ss"
;
...
...
src/main/java/cn/chnmuseum/party/common/vo/BatchUploadResVO.java
View file @
849abb9c
package
cn
.
chnmuseum
.
party
.
common
.
vo
;
import
cn.chnmuseum.party.model.Asset
;
import
cn.chnmuseum.party.model.AssetTmp
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -38,9 +37,6 @@ public class BatchUploadResVO {
@ApiModelProperty
(
"成功上传的文件集合"
)
private
Set
<
Asset
>
fileList
;
@ApiModelProperty
(
"成功上传的文件集合(修改时使用)"
)
private
Set
<
AssetTmp
>
fileTmpList
;
@Data
public
static
class
HandleResult
{
...
...
src/main/java/cn/chnmuseum/party/mapper/AssetMapper.java
View file @
849abb9c
...
...
@@ -23,6 +23,7 @@ public interface AssetMapper extends BaseMapper<Asset> {
"FROM asset a, video_content vc, copyright_owner co, video_content_cat vcc "
+
"where a.ref_item_id = vc.id "
+
"and vc.video_content_cat_id = vcc.id "
+
"and a.is_published = 1 "
+
"and vc.video_content_copyright_owner_id = co.id "
+
"and vc.is_published = 1 and vc.is_deleted = 0 "
+
"<![CDATA[and co.expire_date_start <= DATE_FORMAT(now(), '%Y-%m-%d') ]]>"
+
...
...
src/main/java/cn/chnmuseum/party/mapper/AssetTmpMapper.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.chnmuseum.party.model.AssetTmp
;
/**
* <pre>
* 文件资产临时 Mapper 接口
* </pre>
*
* @author Danny Lee
* @since 2021-04-18
*/
public
interface
AssetTmpMapper
extends
BaseMapper
<
AssetTmp
>
{
}
src/main/java/cn/chnmuseum/party/mapper/ExhibitionBoardTmpMapper.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.chnmuseum.party.model.ExhibitionBoardTmp
;
/**
* <pre>
* 展板临时 Mapper 接口
* </pre>
*
* @author Danny Lee
* @since 2021-04-17
*/
public
interface
ExhibitionBoardTmpMapper
extends
BaseMapper
<
ExhibitionBoardTmp
>
{
}
src/main/java/cn/chnmuseum/party/mapper/LearningContentBoardMapper.java
View file @
849abb9c
...
...
@@ -47,6 +47,7 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
+
"and eb.video_content_id = vc.id "
+
"and vc.id = a.ref_item_id "
+
"and lc.is_published = 1 and eb.is_published = 1 and eb.is_deleted = 0 and vc.is_deleted = 0 "
+
"and a.is_published = 1 "
+
"and a.file_type = 'VIDEO' "
+
"and lc.applicable_scope = 'THIS_ORGAN' "
+
"and lc.organ_code = #{organCode} "
...
...
@@ -56,6 +57,7 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
+
"and lcb.exhibition_board_id = eb.id "
+
"and eb.id = a.ref_item_id "
+
"and lc.is_published = 1 and eb.is_published = 1 and eb.is_deleted = 0 "
+
"and a.is_published = 1 "
+
"and a.file_cat = 'EXHIBITION_BOARD_DATUM' "
+
"and a.file_type = 'VIDEO' "
+
"and lc.applicable_scope = 'THIS_ORGAN' "
...
...
@@ -70,6 +72,7 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
+
"and eb.video_content_id = vc.id "
+
"and vc.id = a.ref_item_id "
+
"and lc.is_published = 1 and eb.is_published = 1 and eb.is_deleted = 0 and vc.is_deleted = 0 "
+
"and a.is_published = 1 "
+
"and a.file_type = 'VIDEO' "
+
"and lc.applicable_scope = 'THIS_ORGAN_SUB'"
+
"and lc.organ_code like CONCAT(#{organCode},'%') "
...
...
@@ -79,6 +82,7 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
+
"and lcb.exhibition_board_id = eb.id "
+
"and eb.id = a.ref_item_id "
+
"and lc.is_published = 1 and eb.is_published = 1 and eb.is_deleted = 0 "
+
"and a.is_published = 1 "
+
"and a.file_cat = 'EXHIBITION_BOARD_DATUM' "
+
"and a.file_type = 'VIDEO' "
+
"and lc.applicable_scope = 'THIS_ORGAN_SUB' "
...
...
@@ -92,6 +96,7 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
+
"and eb.video_content_id = vc.id "
+
"and vc.id = a.ref_item_id "
+
"and lc.is_published = 1 and eb.is_published = 1 and eb.is_deleted = 0 and vc.is_deleted = 0 "
+
"and a.is_published = 1 "
+
"and a.file_type = 'VIDEO' "
+
"and lc.applicable_scope = 'ALL_PLAT'"
+
"UNION "
...
...
@@ -101,6 +106,7 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
+
"and lcb.exhibition_board_id = eb.id "
+
"and eb.id = a.ref_item_id "
+
"and lc.is_published = 1 and eb.is_published = 1 and eb.is_deleted = 0 "
+
"and a.is_published = 1 "
+
"and a.file_cat = 'EXHIBITION_BOARD_DATUM' "
+
"and a.file_type = 'VIDEO' "
+
"and lc.applicable_scope = 'ALL_PLAT'"
+
...
...
src/main/java/cn/chnmuseum/party/mapper/LearningContentTmpMapper.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.chnmuseum.party.model.LearningContentTmp
;
/**
* <pre>
* 学习内容临时 Mapper 接口
* </pre>
*
* @author Danny Lee
* @since 2021-04-17
*/
public
interface
LearningContentTmpMapper
extends
BaseMapper
<
LearningContentTmp
>
{
}
src/main/java/cn/chnmuseum/party/mapper/VideoContentTmpMapper.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.chnmuseum.party.model.VideoContentTmp
;
/**
* <pre>
* 视频内容临时 Mapper 接口
* </pre>
*
* @author Danny Lee
* @since 2021-04-17
*/
public
interface
VideoContentTmpMapper
extends
BaseMapper
<
VideoContentTmp
>
{
}
src/main/java/cn/chnmuseum/party/model/Asset.java
View file @
849abb9c
...
...
@@ -85,6 +85,10 @@ public class Asset implements Serializable {
@TableField
(
"crc32"
)
private
Long
crc32
;
@ApiModelProperty
(
"是否上架"
)
@TableField
(
"is_published"
)
private
Boolean
published
;
@ApiModelProperty
(
hidden
=
true
)
@TableField
(
"video_content_name"
)
private
String
videoContentName
;
...
...
src/main/java/cn/chnmuseum/party/model/EmployeeRole.java
View file @
849abb9c
...
...
@@ -22,7 +22,7 @@ public class EmployeeRole extends Model<EmployeeRole> {
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
UUID
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_
UUID
)
private
String
id
;
@TableField
(
"employee_id"
)
private
String
employeeId
;
...
...
src/main/java/cn/chnmuseum/party/model/VideoContent.java
View file @
849abb9c
...
...
@@ -93,10 +93,6 @@ public class VideoContent implements Serializable {
@TableField
(
exist
=
false
)
private
List
<
Asset
>
videoFileList
;
@ApiModelProperty
(
"视频文件信息列表(审核详情使用)"
)
@TableField
(
exist
=
false
)
private
List
<
AssetTmp
>
videoFileTmpList
;
@ApiModelProperty
(
"审核意见记录"
)
@TableField
(
exist
=
false
)
private
List
<
Audit
>
auditHistoryList
;
...
...
src/main/java/cn/chnmuseum/party/service/AssetTmpService.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
service
;
import
cn.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/chnmuseum/party/service/ExhibitionBoardTmpService.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
service
;
import
cn.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/chnmuseum/party/service/LearningContentTmpService.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
service
;
import
cn.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/chnmuseum/party/service/VideoContentTmpService.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
service
;
import
cn.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/chnmuseum/party/service/impl/AssetTmpServiceImpl.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.chnmuseum.party.mapper.AssetTmpMapper
;
import
cn.chnmuseum.party.model.AssetTmp
;
import
cn.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/chnmuseum/party/service/impl/AuditServiceImpl.java
View file @
849abb9c
package
cn
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.chnmuseum.party.common.enums.AuditOperationEnum
;
import
cn.chnmuseum.party.common.enums.AuditStatusEnum
;
import
cn.chnmuseum.party.common.enums.AuditTypeEnum
;
import
cn.chnmuseum.party.common.enums.*
;
import
cn.chnmuseum.party.common.mvc.InterfaceException
;
import
cn.chnmuseum.party.mapper.AssetMapper
;
import
cn.chnmuseum.party.mapper.AuditMapper
;
import
cn.chnmuseum.party.model.*
;
import
cn.chnmuseum.party.service.*
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
...
...
@@ -280,12 +279,38 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
update
=
this
.
videoContentService
.
removeById
(
videoContentId
);
break
;
case
ADD:
this
.
assetMapper
.
update
(
Asset
.
builder
().
published
(
true
).
build
(),
Wrappers
.<
Asset
>
lambdaUpdate
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
));
videoContent
.
setPublished
(
true
);
update
=
this
.
videoContentService
.
updateById
(
videoContent
);
break
;
case
EDIT:
videoContent
.
setPublished
(
true
);
update
=
this
.
videoContentService
.
updateById
(
videoContent
);
final
String
data
=
this
.
auditMapper
.
selectById
(
audit
.
getId
()).
getModelData
();
final
VideoContent
one
=
JSONObject
.
parseObject
(
data
,
VideoContent
.
class
);
final
List
<
String
>
videoFileIdList
=
one
.
getVideoFileIdList
();
if
(
videoFileIdList
!=
null
&&
!
videoFileIdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
);
assetQueryWrapper
.
eq
(
Asset:
:
getPublished
,
true
);
final
List
<
Asset
>
assetList
=
this
.
assetMapper
.
selectList
(
assetQueryWrapper
);
final
Map
<
String
,
String
>
collect
=
assetList
.
stream
().
collect
(
Collectors
.
toMap
(
Asset:
:
getId
,
Asset:
:
getFileUrl
));
for
(
String
videoFileId
:
videoFileIdList
)
{
final
Asset
asset
=
this
.
assetMapper
.
selectById
(
videoFileId
);
asset
.
setThumbnail
(
videoContent
.
getThumbnail
());
asset
.
setFileType
(
FileTypeEnum
.
VIDEO
.
name
());
asset
.
setFileCat
(
FileCatEnum
.
VIDEO_CONTENT
.
name
());
asset
.
setRefItemId
(
videoContentId
);
asset
.
setPublished
(
true
);
this
.
assetMapper
.
updateById
(
asset
);
if
(
StringUtils
.
isBlank
(
videoContent
.
getName
()))
{
videoContent
.
setName
(
asset
.
getVideoContentName
());
this
.
videoContentService
.
updateById
(
videoContent
);
}
collect
.
remove
(
videoFileId
);
}
this
.
assetMapper
.
deleteBatchIds
(
collect
.
keySet
());
}
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setPublished
(
true
);
update
=
this
.
videoContentService
.
updateById
(
one
);
break
;
default
:
}
...
...
@@ -337,12 +362,51 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
update
=
this
.
exhibitionBoardService
.
removeById
(
exhibitionBoardId
);
break
;
case
ADD:
this
.
assetMapper
.
update
(
Asset
.
builder
().
published
(
true
).
build
(),
Wrappers
.<
Asset
>
lambdaUpdate
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoardId
));
exhibitionBoard
.
setPublished
(
true
);
update
=
this
.
exhibitionBoardService
.
updateById
(
exhibitionBoard
);
break
;
case
EDIT:
exhibitionBoard
.
setPublished
(
true
);
update
=
this
.
exhibitionBoardService
.
updateById
(
exhibitionBoard
);
final
String
data
=
this
.
auditMapper
.
selectById
(
audit
.
getId
()).
getModelData
();
final
ExhibitionBoard
one
=
JSONObject
.
parseObject
(
data
,
ExhibitionBoard
.
class
);
final
List
<
String
>
audioIdList
=
one
.
getAudioIdList
();
if
(
audioIdList
!=
null
&&
!
audioIdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoardId
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
assetQueryWrapper
.
eq
(
Asset:
:
getPublished
,
true
);
final
List
<
Asset
>
assetList
=
this
.
assetMapper
.
selectList
(
assetQueryWrapper
);
final
Map
<
String
,
String
>
collect
=
assetList
.
stream
().
collect
(
Collectors
.
toMap
(
Asset:
:
getId
,
Asset:
:
getFileUrl
));
for
(
String
audioId
:
audioIdList
)
{
final
Asset
asset
=
this
.
assetMapper
.
selectById
(
audioId
);
asset
.
setFileType
(
FileTypeEnum
.
AUDIO
.
name
());
asset
.
setFileCat
(
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
asset
.
setRefItemId
(
exhibitionBoardId
);
asset
.
setPublished
(
true
);
this
.
assetMapper
.
updateById
(
asset
);
collect
.
remove
(
audioId
);
}
this
.
assetMapper
.
deleteBatchIds
(
collect
.
keySet
());
}
final
List
<
String
>
datumIdList
=
one
.
getDatumIdList
();
if
(
datumIdList
!=
null
&&
!
datumIdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoardId
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
assetQueryWrapper
.
eq
(
Asset:
:
getPublished
,
true
);
final
List
<
Asset
>
assetList
=
this
.
assetMapper
.
selectList
(
assetQueryWrapper
);
final
Map
<
String
,
String
>
collect
=
assetList
.
stream
().
collect
(
Collectors
.
toMap
(
Asset:
:
getId
,
Asset:
:
getFileUrl
));
for
(
String
datumId
:
datumIdList
)
{
final
Asset
asset
=
this
.
assetMapper
.
selectById
(
datumId
);
asset
.
setFileCat
(
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
asset
.
setRefItemId
(
exhibitionBoardId
);
asset
.
setPublished
(
true
);
this
.
assetMapper
.
updateById
(
asset
);
collect
.
remove
(
datumId
);
}
this
.
assetMapper
.
deleteBatchIds
(
collect
.
keySet
());
}
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setPublished
(
true
);
update
=
this
.
exhibitionBoardService
.
updateById
(
one
);
break
;
default
:
}
...
...
@@ -385,8 +449,45 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
update
=
this
.
learningContentService
.
updateById
(
learningContent
);
break
;
case
EDIT:
learningContent
.
setPublished
(
true
);
update
=
this
.
learningContentService
.
updateById
(
learningContent
);
final
String
data
=
this
.
auditMapper
.
selectById
(
audit
.
getId
()).
getModelData
();
final
LearningContent
one
=
JSONObject
.
parseObject
(
data
,
LearningContent
.
class
);
final
List
<
String
>
exhibitionBoardCatIdList
=
one
.
getExhibitionBoardCatIdList
();
if
(
exhibitionBoardCatIdList
!=
null
&&
!
exhibitionBoardCatIdList
.
isEmpty
())
{
LambdaUpdateWrapper
<
LearningContentBoardCat
>
lambdaUpdateWrapper
=
Wrappers
.<
LearningContentBoardCat
>
lambdaUpdate
().
eq
(
LearningContentBoardCat:
:
getLearningContentId
,
learningContentId
);
this
.
learningContentBoardCatService
.
remove
(
lambdaUpdateWrapper
);
for
(
String
exhibitionBoardCatId
:
exhibitionBoardCatIdList
)
{
LearningContentBoardCat
learningContentBoardCat
=
LearningContentBoardCat
.
builder
().
exhibitionBoardCatId
(
exhibitionBoardCatId
).
learningContentId
(
learningContentId
).
build
();
this
.
learningContentBoardCatService
.
save
(
learningContentBoardCat
);
}
}
final
List
<
String
>
copyrightOwnerIdList
=
one
.
getCopyrightOwnerIdList
();
if
(
copyrightOwnerIdList
!=
null
&&
!
copyrightOwnerIdList
.
isEmpty
())
{
LambdaUpdateWrapper
<
LearningContentCopyrightOwner
>
lambdaUpdateWrapper
=
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaUpdate
().
eq
(
LearningContentCopyrightOwner:
:
getLearningContentId
,
learningContentId
);
this
.
learningContentCopyrightOwnerService
.
remove
(
lambdaUpdateWrapper
);
for
(
String
copyrightOwnerId
:
copyrightOwnerIdList
)
{
LearningContentCopyrightOwner
contentCopyrightOwner
=
LearningContentCopyrightOwner
.
builder
().
copyrightOwnerId
(
copyrightOwnerId
).
learningContentId
(
learningContentId
).
build
();
this
.
learningContentCopyrightOwnerService
.
save
(
contentCopyrightOwner
);
}
}
final
List
<
String
>
exhibitionBoardIdList
=
one
.
getExhibitionBoardIdList
();
if
(
exhibitionBoardIdList
!=
null
&&
!
exhibitionBoardIdList
.
isEmpty
())
{
LambdaUpdateWrapper
<
LearningContentBoard
>
lambdaUpdateWrapper
=
Wrappers
.<
LearningContentBoard
>
lambdaUpdate
().
eq
(
LearningContentBoard:
:
getLearningContentId
,
learningContentId
);
this
.
learningContentBoardService
.
remove
(
lambdaUpdateWrapper
);
for
(
String
exhibitionBoardId
:
exhibitionBoardIdList
)
{
LearningContentBoard
learningContentBoard
=
LearningContentBoard
.
builder
()
.
learningContentId
(
learningContentId
)
.
exhibitionBoardCatId
(
this
.
exhibitionBoardService
.
getById
(
exhibitionBoardId
).
getExhibitionBoardCatId
())
.
exhibitionBoardId
(
exhibitionBoardId
)
.
build
();
this
.
learningContentBoardService
.
save
(
learningContentBoard
);
}
}
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setPublished
(
true
);
update
=
this
.
learningContentService
.
updateById
(
one
);
break
;
default
:
}
...
...
src/main/java/cn/chnmuseum/party/service/impl/ExhibitionBoardTmpServiceImpl.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.chnmuseum.party.mapper.ExhibitionBoardTmpMapper
;
import
cn.chnmuseum.party.model.ExhibitionBoardTmp
;
import
cn.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/chnmuseum/party/service/impl/LearningContentTmpServiceImpl.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.chnmuseum.party.mapper.LearningContentTmpMapper
;
import
cn.chnmuseum.party.model.LearningContentTmp
;
import
cn.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/chnmuseum/party/service/impl/VideoContentTmpServiceImpl.java
deleted
100644 → 0
View file @
f7d53dcb
package
cn
.
chnmuseum
.
party
.
service
.
impl
;
import
cn.chnmuseum.party.mapper.VideoContentTmpMapper
;
import
cn.chnmuseum.party.model.VideoContentTmp
;
import
cn.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/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
849abb9c
...
...
@@ -440,11 +440,14 @@ public class ChinaMobileRestApiController extends BaseController {
@ApiOperation
(
value
=
"展板详情查询"
,
notes
=
"展板详情查询"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"boardId"
,
value
=
"展板ID"
,
dataType
=
"String"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"language"
,
value
=
"语言"
,
dataType
=
"String"
,
paramType
=
"query"
)
@ApiImplicitParam
(
name
=
"videoLanguage"
,
value
=
"语言"
,
dataType
=
"String"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"audioLanguage"
,
value
=
"语言"
,
dataType
=
"String"
,
paramType
=
"query"
)
})
@GetMapping
(
"/exhibitionBoard/getBoardInfo"
)
@RequiresAuthentication
public
Map
<
String
,
Object
>
getById
(
@RequestParam
(
value
=
"boardId"
)
String
id
,
@RequestParam
(
value
=
"language"
,
required
=
false
)
LanguageEnum
language
)
{
public
Map
<
String
,
Object
>
getById
(
@RequestParam
(
value
=
"boardId"
)
String
id
,
@RequestParam
(
value
=
"videoLanguage"
,
required
=
false
)
LanguageEnum
videoLanguage
,
@RequestParam
(
value
=
"audioLanguage"
,
required
=
false
)
LanguageEnum
audioLanguage
)
{
ExhibitionBoard
exhibitionBoard
=
exhibitionBoardService
.
getById
(
id
);
String
exhibitionBoardCatId
=
exhibitionBoard
.
getExhibitionBoardCatId
();
if
(
exhibitionBoardCatId
!=
null
)
{
...
...
@@ -463,21 +466,18 @@ public class ChinaMobileRestApiController extends BaseController {
exhibitionBoard
.
setBoardVideoContentThumbnail
(
thumbnail
);
}
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
()
);
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
id
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
if
(
l
anguage
!=
null
)
{
assetQueryWrapper
.
eq
(
Asset:
:
getLanguage
,
l
anguage
.
name
());
if
(
audioL
anguage
!=
null
)
{
assetQueryWrapper
.
eq
(
Asset:
:
getLanguage
,
audioL
anguage
.
name
());
}
final
List
<
Asset
>
audioList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setAudioList
(
audioList
);
assetQueryWrapper
.
clear
();
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
()
);
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
id
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
Asset
>
datumList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
if
(
language
!=
null
)
{
datumList
.
removeIf
(
x
->
FileTypeEnum
.
VIDEO
.
name
().
equals
(
x
.
getFileType
())
&&
!
language
.
name
().
equals
(
x
.
getLanguage
()));
}
exhibitionBoard
.
setDatumList
(
datumList
);
final
String
videoContentId
=
exhibitionBoard
.
getVideoContentId
();
...
...
@@ -488,8 +488,8 @@ public class ChinaMobileRestApiController extends BaseController {
assetQueryWrapper
.
clear
();
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
);
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
VIDEO_CONTENT
.
name
());
if
(
l
anguage
!=
null
)
{
assetQueryWrapper
.
eq
(
Asset:
:
getLanguage
,
l
anguage
.
name
());
if
(
videoL
anguage
!=
null
)
{
assetQueryWrapper
.
eq
(
Asset:
:
getLanguage
,
videoL
anguage
.
name
());
}
final
List
<
Asset
>
videoList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setVideoList
(
videoList
);
...
...
src/main/java/cn/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
849abb9c
...
...
@@ -121,6 +121,13 @@ public class ExhibitionBoardController extends BaseController {
@ApiOperation
(
value
=
"修改展板信息"
,
notes
=
"修改展板信息"
)
@MethodLog
(
operModule
=
OperModule
.
DISPLAYCONTENT
,
operType
=
OperType
.
UPDATE
)
public
Map
<
String
,
Object
>
updateExhibitionBoard
(
@Validated
(
value
=
{
Update
.
class
})
ExhibitionBoard
exhibitionBoard
)
{
final
LambdaQueryWrapper
<
ExhibitionBoard
>
lambdaQueryWrapper
=
Wrappers
.<
ExhibitionBoard
>
lambdaQuery
().
eq
(
ExhibitionBoard:
:
getName
,
exhibitionBoard
.
getName
().
trim
());
lambdaQueryWrapper
.
ne
(
ExhibitionBoard:
:
getId
,
exhibitionBoard
.
getId
());
final
int
count
=
this
.
exhibitionBoardService
.
count
(
lambdaQueryWrapper
);
if
(
count
>
0
)
{
return
getFailResult
(
"400"
,
"名称已存在,请修改名称"
);
}
final
ExhibitionBoard
one
=
this
.
exhibitionBoardService
.
getById
(
exhibitionBoard
.
getId
());
one
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
this
.
exhibitionBoardService
.
updateById
(
one
);
...
...
@@ -319,6 +326,19 @@ public class ExhibitionBoardController extends BaseController {
exhibitionBoard
.
setDatumList
(
datumList
);
exhibitionBoard
.
setDatumIdList
(
datumList
.
stream
().
map
(
Asset:
:
getId
).
collect
(
Collectors
.
toList
()));
final
LambdaQueryWrapper
<
Audit
>
auditQueryWrapper
=
Wrappers
.<
Audit
>
lambdaQuery
().
eq
(
Audit:
:
getRefItemId
,
exhibitionBoard
.
getId
());
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
);
exhibitionBoard
.
setAuditHistoryList
(
auditList
);
final
String
videoContentId
=
exhibitionBoard
.
getVideoContentId
();
if
(
videoContentId
!=
null
)
{
final
VideoContent
videoContent
=
this
.
videoContentService
.
getById
(
videoContentId
);
...
...
src/main/java/cn/chnmuseum/party/web/controller/FileUploadController.java
View file @
849abb9c
...
...
@@ -12,7 +12,6 @@ import cn.chnmuseum.party.common.vo.BatchUploadResVO;
import
cn.chnmuseum.party.common.vo.ImageUploadResult
;
import
cn.chnmuseum.party.model.Asset
;
import
cn.chnmuseum.party.service.AssetService
;
import
cn.chnmuseum.party.service.AssetTmpService
;
import
cn.chnmuseum.party.web.controller.base.BaseController
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -66,8 +65,6 @@ public class FileUploadController extends BaseController {
@Resource
private
AssetService
assetService
;
@Resource
private
AssetTmpService
assetTmpService
;
@ApiOperation
(
value
=
"根据文件ID刪除文件"
,
notes
=
"根据文件ID刪除文件"
)
@DeleteMapping
(
value
=
"/delete/{id}"
)
...
...
src/main/java/cn/chnmuseum/party/web/controller/LearningContentController.java
View file @
849abb9c
...
...
@@ -13,6 +13,7 @@ import cn.chnmuseum.party.common.vo.GenericPageParam;
import
cn.chnmuseum.party.model.*
;
import
cn.chnmuseum.party.service.*
;
import
cn.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.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -153,22 +154,30 @@ public class LearningContentController extends BaseController {
@ApiOperation
(
value
=
"修改学习内容信息"
,
notes
=
"修改学习内容信息"
)
@MethodLog
(
operModule
=
OperModule
.
LEARNCONTENT
,
operType
=
OperType
.
UPDATE
)
public
Map
<
String
,
Object
>
updateLearningContent
(
@Validated
(
value
=
{
Update
.
class
})
LearningContent
learningContent
)
{
final
LearningContent
one
=
this
.
learningContentService
.
getById
(
learningContent
.
getId
());
one
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
this
.
learningContentService
.
updateById
(
one
);
final
LambdaQueryWrapper
<
LearningContent
>
lambdaQueryWrapper
=
Wrappers
.<
LearningContent
>
lambdaQuery
().
eq
(
LearningContent:
:
getName
,
learningContent
.
getName
().
trim
());
lambdaQueryWrapper
.
ne
(
LearningContent:
:
getId
,
learningContent
.
getId
());
final
int
count
=
this
.
learningContentService
.
count
(
lambdaQueryWrapper
);
if
(
count
>
0
)
{
return
getFailResult
(
"400"
,
"名称已存在,请修改名称"
);
}
final
Audit
audit
=
Audit
.
builder
()
.
content
(
learningContent
.
getName
())
.
name
(
learningContent
.
getName
())
.
userId
(
getcurUser
().
getId
())
.
refItemId
(
learningContent
.
getId
())
.
type
(
AuditTypeEnum
.
LEARNING_CONTENT
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
.
status
(
AuditStatusEnum
.
TBC
.
name
())
.
level
(
AuditStatusEnum
.
TBC
.
name
())
.
build
();
this
.
auditService
.
save
(
audit
);
return
getSuccessResult
();
final
LearningContent
one
=
this
.
learningContentService
.
getById
(
learningContent
.
getId
());
one
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
this
.
learningContentService
.
updateById
(
one
);
final
Audit
audit
=
Audit
.
builder
()
.
content
(
learningContent
.
getName
())
.
name
(
learningContent
.
getName
())
.
userId
(
getcurUser
().
getId
())
.
refItemId
(
learningContent
.
getId
())
.
type
(
AuditTypeEnum
.
LEARNING_CONTENT
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
.
status
(
AuditStatusEnum
.
TBC
.
name
())
.
level
(
AuditStatusEnum
.
TBC
.
name
())
.
modelData
(
JSONObject
.
toJSONString
(
learningContent
))
.
build
();
this
.
auditService
.
save
(
audit
);
return
getSuccessResult
();
}
@GetMapping
(
"/getList"
)
...
...
@@ -363,6 +372,109 @@ public class LearningContentController extends BaseController {
return
getResult
(
learningContent
);
}
@ApiOperation
(
value
=
"获取学习内容详情(审核详情使用)"
,
notes
=
"获取学习内容详情(审核详情使用)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"审核ID"
,
dataType
=
"String"
,
paramType
=
"path"
)
})
@GetMapping
(
"/getAudit/{id}"
)
@RequiresAuthentication
//@RequiresPermissions("learning:content:get:id")
@MethodLog
(
operModule
=
OperModule
.
LEARNCONTENT
,
operType
=
OperType
.
SELECT
)
public
Map
<
String
,
Object
>
getAuditInfoById
(
@PathVariable
(
"auditId"
)
String
auditId
)
{
final
LearningContent
learningContent
=
JSONObject
.
parseObject
(
this
.
auditService
.
getById
(
auditId
).
getModelData
(),
LearningContent
.
class
);
String
id
=
learningContent
.
getId
();
LearningProject
learningProject
=
this
.
learningProjectService
.
getById
(
learningContent
.
getLearningProjectId
());
if
(
learningProject
!=
null
)
{
learningContent
.
setLearningProjectName
(
learningProject
.
getName
());
}
final
LambdaQueryWrapper
<
LearningContentBoardCat
>
queryWrapper
=
Wrappers
.<
LearningContentBoardCat
>
lambdaQuery
().
eq
(
LearningContentBoardCat:
:
getLearningContentId
,
id
);
queryWrapper
.
select
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
);
final
List
<
String
>
exhibitionBoardCatIdList
=
this
.
learningContentBoardCatService
.
listObjs
(
queryWrapper
,
Object:
:
toString
);
if
(!
exhibitionBoardCatIdList
.
isEmpty
())
{
final
List
<
ExhibitionBoardCat
>
exhibitionBoardCats
=
this
.
exhibitionBoardCatService
.
listByIds
(
exhibitionBoardCatIdList
);
learningContent
.
setExhibitionBoardCatIdList
(
exhibitionBoardCats
.
stream
().
map
(
ExhibitionBoardCat:
:
getId
).
collect
(
Collectors
.
toList
()));
learningContent
.
setExhibitionBoardCatNameList
(
exhibitionBoardCats
.
stream
().
map
(
ExhibitionBoardCat:
:
getName
).
collect
(
Collectors
.
toList
()));
}
final
LambdaQueryWrapper
<
LearningContentCopyrightOwner
>
learningContentCopyrightOwnerLambdaQueryWrapper
=
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaQuery
().
eq
(
LearningContentCopyrightOwner:
:
getLearningContentId
,
id
);
learningContentCopyrightOwnerLambdaQueryWrapper
.
select
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
);
final
List
<
String
>
copyrightOwnerIdList
=
this
.
learningContentCopyrightOwnerService
.
listObjs
(
learningContentCopyrightOwnerLambdaQueryWrapper
,
Object:
:
toString
);
if
(!
copyrightOwnerIdList
.
isEmpty
())
{
final
List
<
CopyrightOwner
>
copyrightOwnerList
=
this
.
copyrightOwnerService
.
listByIds
(
copyrightOwnerIdList
);
learningContent
.
setCopyrightOwnerIdList
(
copyrightOwnerList
.
stream
().
map
(
CopyrightOwner:
:
getId
).
collect
(
Collectors
.
toList
()));
learningContent
.
setCopyrightOwnerNameList
(
copyrightOwnerList
.
stream
().
map
(
CopyrightOwner:
:
getName
).
collect
(
Collectors
.
toList
()));
}
final
LambdaQueryWrapper
<
LearningContentBoard
>
learningContentBoardLambdaQueryWrapper
=
Wrappers
.<
LearningContentBoard
>
lambdaQuery
().
eq
(
LearningContentBoard:
:
getLearningContentId
,
id
);
learningContentBoardLambdaQueryWrapper
.
select
(
LearningContentBoard:
:
getExhibitionBoardId
);
final
List
<
String
>
exhibitionBoardIdList
=
this
.
learningContentBoardService
.
listObjs
(
learningContentBoardLambdaQueryWrapper
,
Object:
:
toString
);
if
(!
exhibitionBoardIdList
.
isEmpty
())
{
final
List
<
ExhibitionBoard
>
exhibitionBoardList
=
this
.
exhibitionBoardService
.
listByIds
(
exhibitionBoardIdList
);
if
(!
exhibitionBoardList
.
isEmpty
())
{
learningContent
.
setExhibitionBoardIdList
(
exhibitionBoardList
.
stream
().
map
(
ExhibitionBoard:
:
getId
).
collect
(
Collectors
.
toList
()));
learningContent
.
setExhibitionBoardNameList
(
exhibitionBoardList
.
stream
().
map
(
ExhibitionBoard:
:
getName
).
collect
(
Collectors
.
toList
()));
}
for
(
ExhibitionBoard
exhibitionBoard
:
exhibitionBoardList
)
{
String
exhibitionBoardCatId
=
exhibitionBoard
.
getExhibitionBoardCatId
();
if
(
exhibitionBoardCatId
!=
null
)
{
exhibitionBoard
.
setExhibitionBoardCatName
(
this
.
exhibitionBoardCatService
.
getById
(
exhibitionBoardCatId
).
getName
());
}
String
boardCopyrightOwnerId
=
exhibitionBoard
.
getBoardCopyrightOwnerId
();
if
(
boardCopyrightOwnerId
!=
null
)
{
final
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
boardCopyrightOwnerId
);
if
(
copyrightOwner
!=
null
)
{
exhibitionBoard
.
setBoardCopyrightOwnerName
(
copyrightOwner
.
getName
());
}
}
if
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()
!=
null
)
{
String
name
=
this
.
copyrightOwnerService
.
getById
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()).
getName
();
exhibitionBoard
.
setVideoContentCopyrightOwnerName
(
name
);
}
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
.
getOne
(
Wrappers
.<
VideoContent
>
lambdaQuery
().
eq
(
VideoContent:
:
getId
,
videoContentId
));
if
(
videoContent
!=
null
)
{
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
);
exhibitionBoard
.
setVideoContentName
(
videoContent
.
getName
());
}
}
}
learningContent
.
setExhibitionBoardList
(
exhibitionBoardList
);
}
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
);
learningContent
.
setAuditHistoryList
(
auditList
);
return
getResult
(
learningContent
);
}
/**
* 通用排序方法(拖拽排序/所有排序完成后点击保存)
*
...
...
src/main/resources/mapper/AssetTmpMapper.xml
deleted
100644 → 0
View file @
f7d53dcb
<?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.chnmuseum.party.mapper.AssetTmpMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.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
deleted
100644 → 0
View file @
f7d53dcb
<?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.chnmuseum.party.mapper.ExhibitionBoardTmpMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.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
deleted
100644 → 0
View file @
f7d53dcb
<?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.chnmuseum.party.mapper.LearningContentTmpMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.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
deleted
100644 → 0
View file @
f7d53dcb
<?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.chnmuseum.party.mapper.VideoContentTmpMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.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