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
bbef4627
Commit
bbef4627
authored
Jun 03, 2021
by
jiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG 修改学习类容展板数据不一致问题
parent
cccd7080
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+10
-3
No files found.
src/main/java/cn/chnmuseum/party/web/controller/LearningContentController.java
View file @
bbef4627
...
...
@@ -14,6 +14,7 @@ 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.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -305,9 +306,15 @@ public class LearningContentController extends BaseController {
LearningContent:
:
getUpdateTime
);
Page
<
LearningContent
>
page
=
this
.
learningContentService
.
page
(
getPage
(),
queryWrapper
);
for
(
LearningContent
learningContent
:
page
.
getRecords
())
{
LambdaQueryWrapper
<
LearningContentBoard
>
lambdaQueryWrapper
=
Wrappers
.<
LearningContentBoard
>
lambdaQuery
().
eq
(
LearningContentBoard:
:
getLearningContentId
,
learningContent
.
getId
());
int
exhibitionBoardCount
=
this
.
learningContentBoardService
.
count
(
lambdaQueryWrapper
);
learningContent
.
setExhibitionBoardCount
(
exhibitionBoardCount
);
LambdaQueryWrapper
<
LearningContentBoard
>
lambdaQueryWrapper
=
Wrappers
.<
LearningContentBoard
>
lambdaQuery
()
.
select
(
LearningContentBoard:
:
getExhibitionBoardId
)
.
eq
(
LearningContentBoard:
:
getLearningContentId
,
learningContent
.
getId
());
// int exhibitionBoardCount = this.learningContentBoardService.count(lambdaQueryWrapper);
List
<
String
>
exhibitionBoardIds
=
learningContentBoardService
.
listObjs
(
lambdaQueryWrapper
,
Object:
:
toString
);
LambdaQueryWrapper
<
ExhibitionBoard
>
ExhibitionBoardIn
=
Wrappers
.<
ExhibitionBoard
>
lambdaQuery
().
in
(
ExhibitionBoard:
:
getId
,
exhibitionBoardIds
);
int
count
=
exhibitionBoardService
.
count
(
ExhibitionBoardIn
);
// learningContent.setExhibitionBoardCount(exhibitionBoardCount);
learningContent
.
setExhibitionBoardCount
(
count
);
// LambdaQueryWrapper<LearningContentBoardCat> boardCatLambdaQueryWrapper = Wrappers.<LearningContentBoardCat>lambdaQuery().eq(LearningContentBoardCat::getLearningContentId, learningContent.getId());
// boardCatLambdaQueryWrapper.select(LearningContentBoardCat::getExhibitionBoardCatId);
...
...
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