|
@@ -1,5 +1,6 @@
|
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
+import com.ym.mec.biz.dal.dto.PracticeSumDto;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -9,6 +10,10 @@ import com.ym.mec.biz.service.PracticeLessonApplyService;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
@Service
|
|
|
public class PracticeLessonApplyServiceImpl extends BaseServiceImpl<Integer, PracticeLessonApply> implements PracticeLessonApplyService {
|
|
|
|
|
@@ -24,4 +29,18 @@ public class PracticeLessonApplyServiceImpl extends BaseServiceImpl<Integer, Pra
|
|
|
public PracticeLessonApply findByUserId(Integer userId) {
|
|
|
return practiceLessonApplyDao.findByUserId(userId);
|
|
|
}
|
|
|
+
|
|
|
+ @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<>();
|
|
|
+ map.put("totalNum",totalNum);
|
|
|
+ map.put("activeNum",activeNum);
|
|
|
+ map.put("makeNum",makeNum);
|
|
|
+ map.put("practiceSumDtos",practiceSumDtos);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
}
|