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
3afb60f4
Commit
3afb60f4
authored
Jun 04, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限制有对应展板或视频版权方删除操作
parent
36271eb4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
CopyrightOwnerController.java
...museum/party/web/controller/CopyrightOwnerController.java
+16
-0
VideoContentController.java
...hnmuseum/party/web/controller/VideoContentController.java
+1
-1
No files found.
src/main/java/cn/chnmuseum/party/web/controller/CopyrightOwnerController.java
View file @
3afb60f4
...
...
@@ -11,6 +11,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
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -287,6 +288,21 @@ public class CopyrightOwnerController extends BaseController {
})
@MethodLog
(
operModule
=
OperModule
.
DISPLAYCOPYRIGHT
,
operType
=
OperType
.
DELETE
)
public
Map
<
String
,
Object
>
deleteCopyrightOwner
(
@PathVariable
(
"id"
)
String
id
)
{
// 版权方有对应展板信息,则不能被删除
LambdaQueryWrapper
<
ExhibitionBoard
>
exhibitionBoardLambdaQueryWrapper1
=
new
LambdaQueryWrapper
<>();
exhibitionBoardLambdaQueryWrapper1
.
eq
(
ExhibitionBoard:
:
getBoardCopyrightOwnerId
,
id
);
List
<
ExhibitionBoard
>
list
=
this
.
exhibitionBoardService
.
list
();
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
return
getFailResult
(
"该版权方有关联展板信息,无法删除"
);
}
// 版权方有对应视频信息,无法删除
LambdaQueryWrapper
<
VideoContent
>
videoContentLambdaQueryWrapper1
=
new
LambdaQueryWrapper
<>();
videoContentLambdaQueryWrapper1
.
eq
(
VideoContent:
:
getVideoContentCopyrightOwnerId
,
id
);
List
<
VideoContent
>
list1
=
this
.
videoContentService
.
list
(
videoContentLambdaQueryWrapper1
);
if
(
CollectionUtil
.
isNotEmpty
(
list1
))
{
return
getFailResult
(
"该版权方有关联视频信息,无法删除!"
);
}
this
.
copyrightOwnerService
.
removeById
(
id
);
LambdaUpdateWrapper
<
CopyrightOwnerBoardCat
>
copyrightOwnerBoardCatLambdaUpdateWrapper
=
Wrappers
.<
CopyrightOwnerBoardCat
>
lambdaUpdate
().
eq
(
CopyrightOwnerBoardCat:
:
getCopyrightOwnerId
,
id
);
...
...
src/main/java/cn/chnmuseum/party/web/controller/VideoContentController.java
View file @
3afb60f4
...
...
@@ -366,7 +366,7 @@ public class VideoContentController extends BaseController {
// 视频关联展板时视频不能被删除
final
List
<
ExhibitionBoard
>
exhibitionBoardList
=
this
.
exhibitionBoardService
.
list
(
Wrappers
.<
ExhibitionBoard
>
lambdaQuery
().
eq
(
ExhibitionBoard:
:
getVideoContentId
,
id
));
if
(
CollectionUtil
.
isNotEmpty
(
exhibitionBoardList
))
{
return
getFailResult
(
"该视频有对应的展板信息,
不能够被
删除!"
);
return
getFailResult
(
"该视频有对应的展板信息,
无法
删除!"
);
}
final
VideoContent
videoContent
=
this
.
videoContentService
.
getById
(
id
);
final
Audit
audit
=
Audit
.
builder
()
...
...
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