|  | @@ -1,5 +1,6 @@
 | 
	
		
			
				|  |  |  package com.ym.mec.biz.service.impl;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.CourseScheduleDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.StudentExtracurricularExercisesSituationDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.TeacherDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dto.StudentExercisesSituationDto;
 | 
	
	
		
			
				|  | @@ -13,10 +14,8 @@ import com.ym.mec.util.collection.MapUtil;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import java.util.ArrayList;
 | 
	
		
			
				|  |  | -import java.util.HashMap;
 | 
	
		
			
				|  |  | -import java.util.List;
 | 
	
		
			
				|  |  | -import java.util.Map;
 | 
	
		
			
				|  |  | +import java.util.*;
 | 
	
		
			
				|  |  | +import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @Service
 | 
	
		
			
				|  |  |  public class StudentExtracurricularExercisesSituationServiceImpl extends BaseServiceImpl<Long, StudentExtracurricularExercisesSituation> implements StudentExtracurricularExercisesSituationService {
 | 
	
	
		
			
				|  | @@ -24,6 +23,8 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  |  	private StudentExtracurricularExercisesSituationDao studentExtracurricularExercisesSituationDao;
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  | +	private CourseScheduleDao courseScheduleDao;
 | 
	
		
			
				|  |  | +	@Autowired
 | 
	
		
			
				|  |  |  	private TeacherDao teacherDao;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
	
		
			
				|  | @@ -43,6 +44,19 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
 | 
	
		
			
				|  |  |  			pageInfo.setTotal(count);
 | 
	
		
			
				|  |  |  			params.put("offset", pageInfo.getOffset());
 | 
	
		
			
				|  |  |  			dataList = studentExtracurricularExercisesSituationDao.findExercisesSituations(params);
 | 
	
		
			
				|  |  | +			if(Objects.isNull(queryInfo.getExistVipCourse())){
 | 
	
		
			
				|  |  | +				List<Integer> studentIds = dataList.stream().map(StudentExtracurricularExercisesSituation::getStudentId).collect(Collectors.toList());
 | 
	
		
			
				|  |  | +				List<Map<Integer, Long>> studentVipCoursesMaps = courseScheduleDao.countStudentVipCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday());
 | 
	
		
			
				|  |  | +				Map<Integer, Long> studentVipCourseMap = MapUtil.convertIntegerMap(studentVipCoursesMaps);
 | 
	
		
			
				|  |  | +				for (StudentExercisesSituationDto exercisesSituationDto : dataList) {
 | 
	
		
			
				|  |  | +					Long vipCourses=studentVipCourseMap.get(exercisesSituationDto.getStudentId());
 | 
	
		
			
				|  |  | +					if(Objects.isNull(vipCourses)||vipCourses<=0){
 | 
	
		
			
				|  |  | +						exercisesSituationDto.setExistVipCourse(0);
 | 
	
		
			
				|  |  | +					}else{
 | 
	
		
			
				|  |  | +						exercisesSituationDto.setExistVipCourse(1);
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if (count == 0) {
 | 
	
		
			
				|  |  |  			dataList = new ArrayList<>();
 |