|
@@ -1,5 +1,6 @@
|
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
+import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
|
|
|
import com.ym.mec.biz.dal.dto.PracticeSumDto;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -13,12 +14,15 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.Set;
|
|
|
|
|
|
@Service
|
|
|
public class PracticeLessonApplyServiceImpl extends BaseServiceImpl<Integer, PracticeLessonApply> implements PracticeLessonApplyService {
|
|
|
|
|
|
@Autowired
|
|
|
private PracticeLessonApplyDao practiceLessonApplyDao;
|
|
|
+ @Autowired
|
|
|
+ private CourseScheduleStudentPaymentDao scheduleStudentPaymentDao;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Integer, PracticeLessonApply> getDAO() {
|
|
@@ -32,11 +36,14 @@ public class PracticeLessonApplyServiceImpl extends BaseServiceImpl<Integer, Pra
|
|
|
|
|
|
@Override
|
|
|
public Map<String, Object> practiceSum() {
|
|
|
- List<PracticeSumDto> practiceSumDtos = practiceLessonApplyDao.practiceSum();
|
|
|
- Integer totalNum = practiceLessonApplyDao.getTotalNum();
|
|
|
- Integer activeNum = practiceLessonApplyDao.getActiveNum();
|
|
|
- Integer makeNum = practiceLessonApplyDao.getMakeNum();
|
|
|
- Map<String,Object> map = new HashMap<>();
|
|
|
+ Set<Integer> musicUserIds = scheduleStudentPaymentDao.queryMusicStudentPer();
|
|
|
+ Set<Integer> vipUserIds = scheduleStudentPaymentDao.queryVipStudentPer();
|
|
|
+ musicUserIds.addAll(vipUserIds);
|
|
|
+ List<PracticeSumDto> practiceSumDtos = practiceLessonApplyDao.practiceSum(musicUserIds);
|
|
|
+ Integer totalNum = practiceLessonApplyDao.getTotalNum(musicUserIds);
|
|
|
+ Integer activeNum = practiceLessonApplyDao.getActiveNum(musicUserIds);
|
|
|
+ Integer makeNum = practiceLessonApplyDao.getMakeNum(musicUserIds);
|
|
|
+ Map<String,Object> map = new HashMap<>(4);
|
|
|
map.put("totalNum",totalNum);
|
|
|
map.put("activeNum",activeNum);
|
|
|
map.put("makeNum",makeNum);
|