Joburgess há 4 anos atrás
pai
commit
171d21c33b

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleStudentPaymentService.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.dto.CourseScheduleStudentListDto;
+import com.ym.mec.biz.dal.dto.SimpleUserDto;
 import com.ym.mec.biz.dal.entity.CourseSchedule;
 import com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment;
 import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
@@ -99,4 +100,13 @@ public interface CourseScheduleStudentPaymentService extends BaseService<Long, C
 	 */
 	Map<String, Object> queryCourseStudentList(CourseScheduleStudentPaymentQueryInfo queryInfo);
 
+	/**
+	 * @describe 获取指定课程上的学员信息
+	 * @author qnc99
+	 * @date 2020/11/27 0027
+	 * @param courseIds:
+	 * @return java.util.List<com.ym.mec.biz.dal.dto.SimpleUserDto>
+	 */
+	List<SimpleUserDto> getCourseStudents(List<Long> courseIds);
+
 }

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleStudentPaymentServiceImpl.java

@@ -528,4 +528,16 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
 
 		return result;
 	}
+
+	@Override
+	public List<SimpleUserDto> getCourseStudents(List<Long> courseIds) {
+		if(CollectionUtils.isEmpty(courseIds)){
+			return Collections.EMPTY_LIST;
+		}
+		List<CourseScheduleStudentPayment> courseScheduleStudentPayments = courseScheduleStudentPaymentDao.findByCourseScheduleIds(courseIds);
+		Set<Integer> studentIds = courseScheduleStudentPayments.stream().map(CourseScheduleStudentPayment::getUserId).collect(Collectors.toSet());
+		List<SimpleUserDto> usersSimpleInfo = teacherDao.getUsersSimpleInfo(new ArrayList<>(studentIds));
+		List<Student> students = studentDao.findByStudentIds(new ArrayList<>(studentIds));
+		return null;
+	}
 }