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
32c7bdbd
Commit
32c7bdbd
authored
Apr 17, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
375c4109
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
152 additions
and
94 deletions
+152
-94
LearningContentBoardMapper.java
...gy/chnmuseum/party/mapper/LearningContentBoardMapper.java
+4
-0
AuditServiceImpl.java
...energy/chnmuseum/party/service/impl/AuditServiceImpl.java
+130
-14
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+7
-47
FileUploadController.java
.../chnmuseum/party/web/controller/FileUploadController.java
+4
-3
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+0
-1
VideoContentController.java
...hnmuseum/party/web/controller/VideoContentController.java
+7
-29
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/mapper/LearningContentBoardMapper.java
View file @
32c7bdbd
...
@@ -60,7 +60,9 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
...
@@ -60,7 +60,9 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
+
"and a.file_type = 'VIDEO' "
+
"and a.file_type = 'VIDEO' "
+
"and lc.applicable_scope = 'THIS_ORGAN' "
+
"and lc.applicable_scope = 'THIS_ORGAN' "
+
"and lc.organ_code = #{organCode} "
+
"and lc.organ_code = #{organCode} "
+
"UNION "
+
"UNION "
+
"SELECT a.*, eb.id exhibition_board_id, eb.name exhibition_board_name, eb.cover exhibition_board_cover "
+
"SELECT a.*, eb.id exhibition_board_id, eb.name exhibition_board_name, eb.cover exhibition_board_cover "
+
"FROM learning_content_board lcb, learning_content lc, exhibition_board eb, video_content vc, asset a "
+
"FROM learning_content_board lcb, learning_content lc, exhibition_board eb, video_content vc, asset a "
+
"WHERE lcb.learning_content_id = lc.id "
+
"WHERE lcb.learning_content_id = lc.id "
...
@@ -81,7 +83,9 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
...
@@ -81,7 +83,9 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
+
"and a.file_type = 'VIDEO' "
+
"and a.file_type = 'VIDEO' "
+
"and lc.applicable_scope = 'THIS_ORGAN_SUB' "
+
"and lc.applicable_scope = 'THIS_ORGAN_SUB' "
+
"and lc.organ_code = #{organCode} "
+
"and lc.organ_code = #{organCode} "
+
"UNION "
+
"UNION "
+
"SELECT a.*, eb.id exhibition_board_id, eb.name exhibition_board_name, eb.cover exhibition_board_cover FROM learning_content_board lcb, learning_content lc, exhibition_board eb, video_content vc, asset a "
+
"SELECT a.*, eb.id exhibition_board_id, eb.name exhibition_board_name, eb.cover exhibition_board_cover FROM learning_content_board lcb, learning_content lc, exhibition_board eb, video_content vc, asset a "
+
"WHERE lcb.learning_content_id = lc.id "
+
"WHERE lcb.learning_content_id = lc.id "
+
"and lcb.exhibition_board_id = eb.id "
+
"and lcb.exhibition_board_id = eb.id "
...
...
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/AuditServiceImpl.java
View file @
32c7bdbd
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
32c7bdbd
...
@@ -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
;
...
@@ -114,54 +117,11 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -114,54 +117,11 @@ 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
)
{
final
boolean
flag
=
this
.
exhibitionBoardTmpService
.
save
(
ExhibitionBoardTmp
.
builder
().
id
(
exhibitionBoard
.
getId
()).
data
(
JSONObject
.
toJSONString
(
exhibitionBoard
)).
build
());
if
(
flag
)
{
TUser
user
=
getcurUser
();
TUser
user
=
getcurUser
();
final
VideoContent
videoContent
=
this
.
videoContentService
.
getById
(
exhibitionBoard
.
getVideoContentId
());
exhibitionBoard
.
setVideoContentName
(
videoContent
.
getName
());
exhibitionBoard
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
exhibitionBoard
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
exhibitionBoard
.
setPublished
(
false
);
exhibitionBoardService
.
updateById
(
exhibitionBoard
);
boolean
flag
=
exhibitionBoardService
.
updateById
(
exhibitionBoard
);
if
(
flag
)
{
final
List
<
String
>
audioIdList
=
exhibitionBoard
.
getAudioIdList
();
if
(
audioIdList
!=
null
&&
!
audioIdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
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
())
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/FileUploadController.java
View file @
32c7bdbd
...
@@ -72,8 +72,10 @@ public class FileUploadController extends BaseController {
...
@@ -72,8 +72,10 @@ public class FileUploadController extends BaseController {
final
Asset
asset
=
assetService
.
getById
(
id
);
final
Asset
asset
=
assetService
.
getById
(
id
);
if
(
asset
!=
null
)
{
if
(
asset
!=
null
)
{
final
String
fileUrl
=
asset
.
getFileUrl
();
final
String
fileUrl
=
asset
.
getFileUrl
();
final
String
fileUrlCrypto
=
asset
.
getFileUrlCrypto
();
try
{
try
{
FastDFSUtils
.
deleteFile
(
fileUrl
);
FastDFSUtils
.
deleteFile
(
fileUrl
);
FastDFSUtils
.
deleteFile
(
fileUrlCrypto
);
}
catch
(
FdfsServerException
e
)
{
}
catch
(
FdfsServerException
e
)
{
this
.
assetService
.
removeById
(
id
);
this
.
assetService
.
removeById
(
id
);
return
getResult
(
"文件被已删除"
);
return
getResult
(
"文件被已删除"
);
...
@@ -422,9 +424,6 @@ public class FileUploadController extends BaseController {
...
@@ -422,9 +424,6 @@ public class FileUploadController extends BaseController {
if
(!
matchChinese
)
{
if
(!
matchChinese
)
{
return
getFailResult
(
"文件必须包含汉语视频"
);
return
getFailResult
(
"文件必须包含汉语视频"
);
}
}
if
(
files
.
length
>
5
)
{
return
getFailResult
(
"一种语言只能对应一个文件,只能上传包含5种语言的视频"
);
}
String
videoContentName
=
null
;
String
videoContentName
=
null
;
String
text
;
String
text
;
LCSUtil
strie
=
null
;
LCSUtil
strie
=
null
;
...
@@ -559,7 +558,9 @@ public class FileUploadController extends BaseController {
...
@@ -559,7 +558,9 @@ public class FileUploadController extends BaseController {
.
build
();
.
build
();
if
(
one
!=
null
)
{
if
(
one
!=
null
)
{
FastDFSUtils
.
deleteFile
(
fileUrl
);
FastDFSUtils
.
deleteFile
(
fileUrl
);
FastDFSUtils
.
deleteFile
(
fileUrlCrypto
);
asset
.
setFileUrl
(
one
.
getFileUrl
());
asset
.
setFileUrl
(
one
.
getFileUrl
());
asset
.
setFileUrlCrypto
(
one
.
getFileUrl
());
}
}
this
.
assetService
.
save
(
asset
);
this
.
assetService
.
save
(
asset
);
fileList
.
add
(
asset
);
fileList
.
add
(
asset
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningContentController.java
View file @
32c7bdbd
...
@@ -150,7 +150,6 @@ public class LearningContentController extends BaseController {
...
@@ -150,7 +150,6 @@ public class LearningContentController extends BaseController {
public
Map
<
String
,
Object
>
updateLearningContent
(
@Validated
(
value
=
{
Update
.
class
})
LearningContent
learningContent
)
{
public
Map
<
String
,
Object
>
updateLearningContent
(
@Validated
(
value
=
{
Update
.
class
})
LearningContent
learningContent
)
{
TUser
user
=
getcurUser
();
TUser
user
=
getcurUser
();
learningContent
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
learningContent
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
learningContent
.
setPublished
(
false
);
// 保存业务节点信息
// 保存业务节点信息
final
String
learningContentId
=
learningContent
.
getId
();
final
String
learningContentId
=
learningContent
.
getId
();
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/VideoContentController.java
View file @
32c7bdbd
...
@@ -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
;
...
@@ -47,6 +48,8 @@ public class VideoContentController extends BaseController {
...
@@ -47,6 +48,8 @@ public class VideoContentController extends BaseController {
@Resource
@Resource
private
VideoContentService
videoContentService
;
private
VideoContentService
videoContentService
;
@Resource
@Resource
private
VideoContentTmpService
videoContentTmpService
;
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
private
CopyrightOwnerService
copyrightOwnerService
;
@Resource
@Resource
private
VideoContentCatService
videoContentCatService
;
private
VideoContentCatService
videoContentCatService
;
...
@@ -107,35 +110,11 @@ public class VideoContentController extends BaseController {
...
@@ -107,35 +110,11 @@ 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
)
{
final
boolean
flag
=
this
.
videoContentTmpService
.
save
(
VideoContentTmp
.
builder
().
id
(
videoContent
.
getId
()).
data
(
JSONObject
.
toJSONString
(
videoContent
)).
build
());
if
(
flag
)
{
TUser
user
=
getcurUser
();
TUser
user
=
getcurUser
();
videoContent
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
videoContent
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
videoContent
.
setPublished
(
false
);
videoContentService
.
updateById
(
videoContent
);
videoContent
.
setDeleted
(
false
);
boolean
flag
=
videoContentService
.
updateById
(
videoContent
);
if
(
flag
)
{
final
List
<
String
>
videoFileIdList
=
videoContent
.
getVideoFileIdList
();
if
(
videoFileIdList
!=
null
&&
!
videoFileIdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContent
.
getId
());
final
List
<
Asset
>
assetList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
final
Map
<
String
,
String
>
collect
=
assetList
.
stream
().
collect
(
Collectors
.
toMap
(
Asset:
:
getId
,
Asset:
:
getFileUrl
));
for
(
String
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
(
user
.
getId
())
...
@@ -147,7 +126,6 @@ public class VideoContentController extends BaseController {
...
@@ -147,7 +126,6 @@ public class VideoContentController extends BaseController {
.
level
(
AuditStatusEnum
.
TBC
.
name
())
.
level
(
AuditStatusEnum
.
TBC
.
name
())
.
build
();
.
build
();
this
.
auditService
.
save
(
audit
);
this
.
auditService
.
save
(
audit
);
return
getSuccessResult
();
return
getSuccessResult
();
}
}
return
getFailResult
();
return
getFailResult
();
...
...
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