Commit c7ef507f authored by luzhuang's avatar luzhuang

feat: 添加 首页全部newCount

parent 119d33bd
......@@ -10,5 +10,6 @@ public class NewCountDTO {
public int learn;
public int interest;
public int push;
public int all;
}
......@@ -2048,12 +2048,14 @@ public class BLessonServiceImpl implements BLessonService {
departs.removeAll(Collections.singleton(""));
}
model.setDeparts(departs);
int recommendCount= 0;
int recommendCount = 0;
int allCount = 0;
int learnCount = 0;
int collectCount = 0;
int interestCount = 0;
int pushCount = 0;
List<BLesson> recommend = addNew(bLessonRepository.queryRecommendListByPagination(model));
List<BLesson> all = addNew(bLessonRepository.queryListAllLessonByPagination(model));
List<BLesson> learn = addNew(bLessonRepository.queryLearnListByPagination(model));
List<BLesson> collect = addNew(bLessonRepository.queryCollectListByPagination(model));
List<BLesson> interest = addNew(bLessonRepository.queryInterestedListByPagination(model));
......@@ -2062,6 +2064,10 @@ public class BLessonServiceImpl implements BLessonService {
if("1".equals(bLesson.getIsNew())){
recommendCount++;
}
}for(BLesson bLesson : all){
if("1".equals(bLesson.getIsNew())){
allCount++;
}
}
for(BLesson bLesson : learn){
if("1".equals(bLesson.getIsNew()))
......@@ -2081,6 +2087,7 @@ public class BLessonServiceImpl implements BLessonService {
}
NewCountDTO dto = new NewCountDTO();
dto.setRecommend(recommendCount);
dto.setAll(allCount);
dto.setCollect(collectCount);
dto.setLearn(learnCount);
dto.setInterest(interestCount);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment