|
@@ -1315,6 +1315,8 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
|
@Override
|
|
|
public List<IndexCloudStudySumDto> getCloudStudyStudentOverViewList1(List<Integer> organIdsList) {
|
|
|
List<IndexCloudStudySumDto> list = studentDao.getCloudStudyStudentOverViewList1(organIdsList);
|
|
|
+ Set<Integer> organIds = list.stream().map(e -> e.getOrganId()).collect(Collectors.toSet());
|
|
|
+ Map<Integer,String> organMap = MapUtil.convertMybatisMap(organizationDao.findOrganNameMapList(organIds));
|
|
|
//获取待激活学员数
|
|
|
Map<Integer,Long> waitMap = MapUtil.convertIntegerMap(cloudTeacherOrderDao.getWaitActivateMap(organIdsList));
|
|
|
//获取活跃学员数
|
|
@@ -1333,15 +1335,16 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
|
//获取重复购买人数
|
|
|
Map<Integer,Long> againBuyMap = MapUtil.convertIntegerMap(studentDao.getAgainBuyNum(organIdsList));
|
|
|
for (IndexCloudStudySumDto dto : list) {
|
|
|
+ dto.setOrganName(organMap.get(dto.getOrganId()));
|
|
|
Long aLong = waitMap.get(dto.getOrganId());
|
|
|
dto.setWaitActivateVipStudentNum(aLong==null?0:aLong.intValue());
|
|
|
Long aLong1 = againBuyMap.get(dto.getOrganId());
|
|
|
dto.setAgainBuyNum(aLong1==null?0:aLong1.intValue());
|
|
|
Integer integer = activeMap.get(dto.getOrganId());
|
|
|
dto.setActiveStudentNum(integer==null?0:integer);
|
|
|
- dto.setTotalStudentNum(dto.getWaitActivateVipStudentNum() + dto.getVipStudentNum());
|
|
|
-// double studentNum = (double)dto.getVipStudentNum();
|
|
|
-// dto.setVipStudentRate(studentNum / dto.getTotalStudentNum());
|
|
|
+ dto.setVipStudentNum(dto.getEffectiveVipStudentNum() + dto.getWaitActivateVipStudentNum());
|
|
|
+ double studentNum = (double)dto.getVipStudentNum();
|
|
|
+ dto.setVipStudentRate(studentNum / dto.getTotalStudentNum());
|
|
|
// dto.setAgainBuyRate(dto.getAgainBuyNum() / studentNum);
|
|
|
}
|
|
|
return list;
|