Browse Source

管乐迷需求迭代

zouxuan 2 years ago
parent
commit
aab6cd1dd2

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentDao.java

@@ -206,7 +206,7 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
      */
     int getOrgansTodayTotalCloudStudyStudentNum(@Param("organIds") List<Integer> organIds);
 
-    List<Map<Integer,Integer>> getOrgansTodayTotalCloudStudyStudentNumMap(@Param("organIds") List<Integer> organIds);
+    List<Map<Integer,Long>> getOrgansTodayTotalCloudStudyStudentNumMap(@Param("organIds") List<Integer> organIds);
 
 
     int getCloudStudyLivelyStudentNum(@Param("organId") Integer organId);

+ 2 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServiceImpl.java

@@ -1266,15 +1266,11 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
         Map<Integer,Long> activeMap = MapUtil.convertIntegerMap(studentDao.getOrganActiveCloudStudyStudentNum(organIdsList, startTime, endTime));
         //获取重复购买人数
         Map<Integer,Long> againBuyMap = MapUtil.convertIntegerMap(studentDao.getAgainBuyNum(organIdsList));
-        Map<Integer,Integer> todayStudyMap = new HashMap<>();
-        List<Map<Integer, Integer>> studentNumMap = studentDao.getOrgansTodayTotalCloudStudyStudentNumMap(organIdsList);
-        if(!CollectionUtils.isEmpty(studentNumMap)){
-            todayStudyMap = MapUtil.convertIntegerMap(studentNumMap);
-        }
+        Map<Integer,Long> todayStudyMap = MapUtil.convertIntegerMap(studentDao.getOrgansTodayTotalCloudStudyStudentNumMap(organIdsList));
         BigDecimal bigDecimal = new BigDecimal(100);
         for (IndexCloudStudySumDto dto : list) {
             dto.setOrganName(organMap.get(dto.getOrganId()));
-            Integer integer1 = todayStudyMap.get(dto.getOrganId());
+            Long integer1 = todayStudyMap.get(dto.getOrganId());
             dto.setCloudStudyTodayUseStudentNum(integer1==null?BigDecimal.ZERO:new BigDecimal(integer1));
             Long aLong = waitMap.get(dto.getOrganId());
             dto.setWaitActivateVipStudentNum(aLong==null?BigDecimal.ZERO:new BigDecimal(aLong));