|
@@ -31,6 +31,7 @@ import com.yonge.cooleshow.biz.dal.vo.MyFollow;
|
|
import com.yonge.cooleshow.biz.dal.vo.StudentHomeVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.StudentHomeVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.StudentVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.StudentVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.wrapper.StudentIndexWrapper;
|
|
import com.yonge.cooleshow.biz.dal.wrapper.StudentWrapper;
|
|
import com.yonge.cooleshow.biz.dal.wrapper.StudentWrapper;
|
|
import com.yonge.cooleshow.biz.dal.wrapper.VipCardRecordWrapper;
|
|
import com.yonge.cooleshow.biz.dal.wrapper.VipCardRecordWrapper;
|
|
import com.yonge.cooleshow.biz.dal.wrapper.im.ImGroupWrapper;
|
|
import com.yonge.cooleshow.biz.dal.wrapper.im.ImGroupWrapper;
|
|
@@ -135,6 +136,11 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private TenantGroupAlbumMapper tenantGroupAlbumMapper;
|
|
private TenantGroupAlbumMapper tenantGroupAlbumMapper;
|
|
|
|
+ @Resource
|
|
|
|
+ private SysMusicCompareRecordService sysMusicCompareRecordService;
|
|
|
|
+ @Resource
|
|
|
|
+ private CourseScheduleService courseScheduleService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public StudentVo detail(Long userId) {
|
|
public StudentVo detail(Long userId) {
|
|
StudentVo detail = baseMapper.detail(userId);
|
|
StudentVo detail = baseMapper.detail(userId);
|
|
@@ -1100,4 +1106,20 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
|
|
|
|
|
|
return imCustomerServiceId;
|
|
return imCustomerServiceId;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public StudentIndexWrapper.SummaryDto indexSummary(Long userId) {
|
|
|
|
+ Date now = new Date();
|
|
|
|
+ //获取学员本周练习时长
|
|
|
|
+ Date monday = DateUtil.getNextWeekMonday(now);
|
|
|
|
+ Date sunday = DateUtil.getNextWeekSunday(now);
|
|
|
|
+ StudentIndexWrapper.SummaryDto summaryDto = new StudentIndexWrapper.SummaryDto();
|
|
|
|
+ //统计学员本周练习时长
|
|
|
|
+ summaryDto.setRecordTime(sysMusicCompareRecordService.getDao().countStudentPracticeTime(userId, monday, sunday));
|
|
|
|
+ //统计本周以上课程数
|
|
|
|
+ summaryDto.setCourseCount(courseScheduleService.getDao().countStudentOverCourse(userId, monday, sunday,"ING,COMPLETE"));
|
|
|
|
+ //统计本周总课程数
|
|
|
|
+ summaryDto.setTotalCourseCount(courseScheduleService.getDao().countStudentOverCourse(userId, monday, sunday,null));
|
|
|
|
+ return summaryDto;
|
|
|
|
+ }
|
|
}
|
|
}
|