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
8dfd02d3
Commit
8dfd02d3
authored
Apr 18, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
6567cd25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
7 deletions
+29
-7
CopyrightOwnerController.java
...museum/party/web/controller/CopyrightOwnerController.java
+13
-2
ExhibitionBoardCatController.java
...um/party/web/controller/ExhibitionBoardCatController.java
+14
-4
LearningProjectController.java
...useum/party/web/controller/LearningProjectController.java
+2
-1
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/CopyrightOwnerController.java
View file @
8dfd02d3
...
...
@@ -69,6 +69,9 @@ public class CopyrightOwnerController extends BaseController {
@Resource
private
LearningContentCopyrightOwnerService
learningContentCopyrightOwnerService
;
@Resource
private
LearningContentService
learningContentService
;
@PostMapping
(
"/save"
)
@RequiresAuthentication
//@RequiresPermissions("copyright:owner:save")
@ApiOperation
(
value
=
"添加版权方"
,
notes
=
"添加版权方"
)
...
...
@@ -302,8 +305,16 @@ public class CopyrightOwnerController extends BaseController {
LambdaUpdateWrapper
<
CopyrightOwnerVideoContentCat
>
deleteWrapper1
=
Wrappers
.<
CopyrightOwnerVideoContentCat
>
lambdaUpdate
().
eq
(
CopyrightOwnerVideoContentCat:
:
getCopyrightOwnerId
,
id
);
this
.
copyrightOwnerVideoContentCatService
.
remove
(
deleteWrapper1
);
LambdaUpdateWrapper
<
LearningContentCopyrightOwner
>
deleteWrapper2
=
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaUpdate
().
eq
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
,
id
);
this
.
learningContentCopyrightOwnerService
.
remove
(
deleteWrapper2
);
final
LambdaQueryWrapper
<
LearningContentCopyrightOwner
>
learningContentCopyrightOwnerLambdaQueryWrapper
=
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaQuery
().
eq
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
,
id
);
final
List
<
LearningContentCopyrightOwner
>
learningContentCopyrightOwnerList
=
this
.
learningContentCopyrightOwnerService
.
list
(
learningContentCopyrightOwnerLambdaQueryWrapper
);
if
(
learningContentCopyrightOwnerList
!=
null
&&
!
learningContentCopyrightOwnerList
.
isEmpty
())
{
LambdaUpdateWrapper
<
LearningContentCopyrightOwner
>
deleteWrapper2
=
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaUpdate
().
eq
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
,
id
);
this
.
learningContentCopyrightOwnerService
.
remove
(
deleteWrapper2
);
if
(
learningContentCopyrightOwnerList
.
size
()
==
1
)
{
this
.
learningContentService
.
removeById
(
learningContentCopyrightOwnerList
.
get
(
0
).
getLearningContentId
());
}
}
return
getSuccessResult
();
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardCatController.java
View file @
8dfd02d3
...
...
@@ -60,6 +60,8 @@ public class ExhibitionBoardCatController extends BaseController {
@Resource
private
LearningContentBoardCatService
learningContentBoardCatService
;
@Resource
private
LearningContentService
learningContentService
;
@Resource
private
LearningContentBoardService
learningContentBoardService
;
@PostMapping
(
"/save"
)
...
...
@@ -207,14 +209,22 @@ public class ExhibitionBoardCatController extends BaseController {
LambdaUpdateWrapper
<
CopyrightOwnerBoardCat
>
deleteWrapper
=
Wrappers
.<
CopyrightOwnerBoardCat
>
lambdaUpdate
().
eq
(
CopyrightOwnerBoardCat:
:
getBoardCatId
,
id
);
this
.
copyrightOwnerBoardCatService
.
remove
(
deleteWrapper
);
LambdaUpdateWrapper
<
LearningContentBoardCat
>
deleteWrapper1
=
Wrappers
.<
LearningContentBoardCat
>
lambdaUpdate
().
eq
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
,
id
);
this
.
learningContentBoardCatService
.
remove
(
deleteWrapper1
);
final
LambdaQueryWrapper
<
LearningContentBoardCat
>
learningContentBoardCatLambdaQueryWrapper
=
Wrappers
.<
LearningContentBoardCat
>
lambdaQuery
().
eq
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
,
id
);
final
List
<
LearningContentBoardCat
>
learningContentBoardCatList
=
this
.
learningContentBoardCatService
.
list
(
learningContentBoardCatLambdaQueryWrapper
);
if
(
learningContentBoardCatList
!=
null
&&
!
learningContentBoardCatList
.
isEmpty
())
{
LambdaUpdateWrapper
<
LearningContentBoardCat
>
deleteWrapper1
=
Wrappers
.<
LearningContentBoardCat
>
lambdaUpdate
().
eq
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
,
id
);
this
.
learningContentBoardCatService
.
remove
(
deleteWrapper1
);
if
(
learningContentBoardCatList
.
size
()
==
1
)
{
this
.
learningContentService
.
removeById
(
learningContentBoardCatList
.
get
(
0
).
getLearningContentId
());
}
}
LambdaUpdateWrapper
<
LearningContentBoard
>
deleteWrapper2
=
Wrappers
.<
LearningContentBoard
>
lambdaUpdate
().
eq
(
LearningContentBoard:
:
getExhibitionBoardCatId
,
id
);
this
.
learningContentBoardService
.
remove
(
deleteWrapper2
);
final
LambdaQueryWrapper
<
ExhibitionBoard
>
l
ambdaQueryWrapper
=
Wrappers
.<
ExhibitionBoard
>
lambdaQuery
().
eq
(
ExhibitionBoard:
:
getExhibitionBoardCatId
,
id
).
select
(
ExhibitionBoard:
:
getId
);
final
List
<
String
>
exhibitionBoardIdList
=
this
.
exhibitionBoardService
.
listObjs
(
l
ambdaQueryWrapper
,
Object:
:
toString
);
final
LambdaQueryWrapper
<
ExhibitionBoard
>
exhibitionBoardL
ambdaQueryWrapper
=
Wrappers
.<
ExhibitionBoard
>
lambdaQuery
().
eq
(
ExhibitionBoard:
:
getExhibitionBoardCatId
,
id
).
select
(
ExhibitionBoard:
:
getId
);
final
List
<
String
>
exhibitionBoardIdList
=
this
.
exhibitionBoardService
.
listObjs
(
exhibitionBoardL
ambdaQueryWrapper
,
Object:
:
toString
);
this
.
exhibitionBoardTmpService
.
removeByIds
(
exhibitionBoardIdList
);
// final LambdaUpdateWrapper<VideoContent> updateWrapper = Wrappers.<VideoContent>lambdaUpdate().eq(VideoContent::getVideoContentCopyrightOwnerId, id);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningProjectController.java
View file @
8dfd02d3
...
...
@@ -140,12 +140,13 @@ public class LearningProjectController extends BaseController {
@DeleteMapping
(
"/delete/{id}"
)
@RequiresAuthentication
//@RequiresPermissions("learning:project:delete")
@ApiOperation
(
value
=
"根据ID
下架学习项目"
,
notes
=
"根据ID下架
学习项目"
)
@ApiOperation
(
value
=
"根据ID
删除学习项目"
,
notes
=
"根据ID删除
学习项目"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"path"
,
dataType
=
"String"
,
required
=
true
)
})
@MethodLog
(
operModule
=
OperModule
.
LEARNPROJECT
,
operType
=
OperType
.
DELETE
)
public
Map
<
String
,
Object
>
deleteLearningProject
(
@PathVariable
(
"id"
)
String
id
)
{
this
.
learningContentService
.
remove
(
Wrappers
.<
LearningContent
>
lambdaUpdate
().
eq
(
LearningContent:
:
getLearningProjectId
,
id
));
this
.
learningProjectService
.
removeById
(
id
);
return
getSuccessResult
();
}
...
...
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