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
b6f26d80
Commit
b6f26d80
authored
Apr 13, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
d66b1c87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
21 deletions
+31
-21
ExhibitionBoardCatController.java
...um/party/web/controller/ExhibitionBoardCatController.java
+6
-12
VideoContentCatController.java
...useum/party/web/controller/VideoContentCatController.java
+25
-9
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardCatController.java
View file @
b6f26d80
...
@@ -118,12 +118,6 @@ public class ExhibitionBoardCatController extends BaseController {
...
@@ -118,12 +118,6 @@ public class ExhibitionBoardCatController extends BaseController {
//todo 删除中间关联表
//todo 删除中间关联表
return
getSuccessResult
();
return
getSuccessResult
();
}
}
...
@@ -137,13 +131,13 @@ public class ExhibitionBoardCatController extends BaseController {
...
@@ -137,13 +131,13 @@ public class ExhibitionBoardCatController extends BaseController {
final
LambdaQueryWrapper
<
ExhibitionBoardCat
>
exhibitionBoardCatLambdaQueryWrapper
=
Wrappers
.<
ExhibitionBoardCat
>
lambdaQuery
().
orderByDesc
(
ExhibitionBoardCat:
:
getCreateTime
);
final
LambdaQueryWrapper
<
ExhibitionBoardCat
>
exhibitionBoardCatLambdaQueryWrapper
=
Wrappers
.<
ExhibitionBoardCat
>
lambdaQuery
().
orderByDesc
(
ExhibitionBoardCat:
:
getCreateTime
);
if
(
copyrightOwnerIdList
!=
null
&&
!
copyrightOwnerIdList
.
isEmpty
())
{
if
(
copyrightOwnerIdList
!=
null
&&
!
copyrightOwnerIdList
.
isEmpty
())
{
final
LambdaQueryWrapper
<
CopyrightOwnerBoardCat
>
queryWrapper
=
Wrappers
.<
CopyrightOwnerBoardCat
>
lambdaQuery
().
in
(
CopyrightOwnerBoardCat:
:
getCopyrightOwnerId
,
copyrightOwnerIdList
);
final
LambdaQueryWrapper
<
CopyrightOwnerBoardCat
>
queryWrapper
=
Wrappers
.<
CopyrightOwnerBoardCat
>
lambdaQuery
().
in
(
CopyrightOwnerBoardCat:
:
getCopyrightOwnerId
,
copyrightOwnerIdList
);
queryWrapper
.
select
(
CopyrightOwnerBoardCat:
:
getBoardCatId
);
final
List
<
CopyrightOwnerBoardCat
>
copyrightOwnerBoardCatList
=
this
.
copyrightOwnerBoardCatService
.
list
(
queryWrapper
);
final
List
<
String
>
boardCatIdList
=
this
.
copyrightOwnerBoardCatService
.
listObjs
(
queryWrapper
,
Object:
:
toString
);
final
List
<
String
>
collect
=
copyrightOwnerBoardCatList
.
stream
().
map
(
CopyrightOwnerBoardCat:
:
getBoardCatId
).
distinct
().
collect
(
Collectors
.
toList
());
exhibitionBoardCatLambdaQueryWrapper
.
in
(
ExhibitionBoardCat:
:
getId
,
boardCatIdList
);
exhibitionBoardCatLambdaQueryWrapper
.
in
(
ExhibitionBoardCat:
:
getId
,
collect
);
List
<
ExhibitionBoardCat
>
exhibitionBoardCatList
=
exhibitionBoardCatService
.
list
(
exhibitionBoardCatLambdaQueryWrapper
);
return
getResult
(
exhibitionBoardCatList
);
}
}
return
getResult
(
""
);
List
<
ExhibitionBoardCat
>
exhibitionBoardCatList
=
exhibitionBoardCatService
.
list
(
exhibitionBoardCatLambdaQueryWrapper
);
return
getResult
(
exhibitionBoardCatList
);
}
}
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/VideoContentCatController.java
View file @
b6f26d80
...
@@ -2,14 +2,8 @@ package cn.wisenergy.chnmuseum.party.web.controller;
...
@@ -2,14 +2,8 @@ package cn.wisenergy.chnmuseum.party.web.controller;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.model.CopyrightOwner
;
import
cn.wisenergy.chnmuseum.party.model.*
;
import
cn.wisenergy.chnmuseum.party.model.CopyrightOwnerVideoContentCat
;
import
cn.wisenergy.chnmuseum.party.service.*
;
import
cn.wisenergy.chnmuseum.party.model.VideoContent
;
import
cn.wisenergy.chnmuseum.party.model.VideoContentCat
;
import
cn.wisenergy.chnmuseum.party.service.CopyrightOwnerService
;
import
cn.wisenergy.chnmuseum.party.service.CopyrightOwnerVideoContentCatService
;
import
cn.wisenergy.chnmuseum.party.service.VideoContentCatService
;
import
cn.wisenergy.chnmuseum.party.service.VideoContentService
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
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.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
...
@@ -57,6 +51,12 @@ public class VideoContentCatController extends BaseController {
...
@@ -57,6 +51,12 @@ public class VideoContentCatController extends BaseController {
@Resource
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
private
CopyrightOwnerService
copyrightOwnerService
;
@Resource
private
ExhibitionBoardService
exhibitionBoardService
;
@Resource
private
CopyrightOwnerBoardCatService
copyrightOwnerBoardCatService
;
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@RequiresAuthentication
//@RequiresPermissions("video:content:cat:save")
@RequiresAuthentication
//@RequiresPermissions("video:content:cat:save")
@ApiOperation
(
value
=
"添加视频内容分类"
,
notes
=
"添加视频内容分类"
)
@ApiOperation
(
value
=
"添加视频内容分类"
,
notes
=
"添加视频内容分类"
)
...
@@ -169,8 +169,24 @@ public class VideoContentCatController extends BaseController {
...
@@ -169,8 +169,24 @@ public class VideoContentCatController extends BaseController {
updateWrapper
.
set
(
VideoContent:
:
getDeleted
,
true
);
updateWrapper
.
set
(
VideoContent:
:
getDeleted
,
true
);
this
.
videoContentService
.
update
(
updateWrapper
);
this
.
videoContentService
.
update
(
updateWrapper
);
//todo 删除中间关联表
final
LambdaUpdateWrapper
<
CopyrightOwnerVideoContentCat
>
updateWrapper1
=
Wrappers
.<
CopyrightOwnerVideoContentCat
>
lambdaUpdate
().
eq
(
CopyrightOwnerVideoContentCat:
:
getVideoContentCatId
,
id
);
this
.
copyrightOwnerVideoContentCatService
.
remove
(
updateWrapper1
);
final
LambdaQueryWrapper
<
CopyrightOwnerVideoContentCat
>
eq
=
Wrappers
.<
CopyrightOwnerVideoContentCat
>
lambdaQuery
().
eq
(
CopyrightOwnerVideoContentCat:
:
getVideoContentCatId
,
id
);
final
List
<
CopyrightOwnerVideoContentCat
>
list
=
this
.
copyrightOwnerVideoContentCatService
.
list
(
eq
);
final
List
<
String
>
collect
=
list
.
stream
().
map
(
CopyrightOwnerVideoContentCat:
:
getCopyrightOwnerId
).
distinct
().
collect
(
Collectors
.
toList
());
final
LambdaUpdateWrapper
<
VideoContent
>
updateWrapper2
=
Wrappers
.<
VideoContent
>
lambdaUpdate
().
in
(
VideoContent:
:
getVideoContentCopyrightOwnerId
,
collect
);
updateWrapper2
.
set
(
VideoContent:
:
getDeleted
,
true
);
this
.
videoContentService
.
update
(
updateWrapper2
);
final
LambdaUpdateWrapper
<
ExhibitionBoard
>
updateWrapper3
=
Wrappers
.<
ExhibitionBoard
>
lambdaUpdate
().
in
(
ExhibitionBoard:
:
getBoardCopyrightOwnerId
,
collect
);
updateWrapper3
.
set
(
ExhibitionBoard:
:
getDeleted
,
true
);
this
.
exhibitionBoardService
.
update
(
updateWrapper3
);
LambdaUpdateWrapper
<
CopyrightOwnerBoardCat
>
deleteWrapper
=
Wrappers
.<
CopyrightOwnerBoardCat
>
lambdaUpdate
().
in
(
CopyrightOwnerBoardCat:
:
getCopyrightOwnerId
,
collect
);
this
.
copyrightOwnerBoardCatService
.
remove
(
deleteWrapper
);
return
getSuccessResult
();
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