|
@@ -6,9 +6,11 @@ import com.keao.edu.common.page.PageInfo;
|
|
|
import com.keao.edu.common.page.QueryInfo;
|
|
|
import com.keao.edu.common.service.impl.BaseServiceImpl;
|
|
|
import com.keao.edu.common.tenant.TenantContextHolder;
|
|
|
+import com.keao.edu.user.dao.ExamSongDao;
|
|
|
import com.keao.edu.user.dao.ExamSubjectDao;
|
|
|
import com.keao.edu.user.dao.ExamSubjectSongDao;
|
|
|
import com.keao.edu.user.dao.ExaminationBasicDao;
|
|
|
+import com.keao.edu.user.entity.ExamSong;
|
|
|
import com.keao.edu.user.entity.ExamSubject;
|
|
|
import com.keao.edu.user.entity.ExamSubjectSong;
|
|
|
import com.keao.edu.user.entity.ExaminationBasic;
|
|
@@ -32,6 +34,8 @@ public class ExamSubjectSongServiceImpl extends BaseServiceImpl<Long, ExamSubjec
|
|
|
private ExamSubjectSongDao examSubjectSongDao;
|
|
|
@Autowired
|
|
|
private ExamSubjectDao examSubjectDao;
|
|
|
+ @Autowired
|
|
|
+ private ExamSongDao examSongDao;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, ExamSubjectSong> getDAO() {
|
|
@@ -97,4 +101,22 @@ public class ExamSubjectSongServiceImpl extends BaseServiceImpl<Long, ExamSubjec
|
|
|
examSubjectDao.batchInsert(newExamSubjects);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<ExamSong> getExamSubjectSong(Long examSubjectId, Integer level) {
|
|
|
+ List<ExamSong> examSongs = new ArrayList<>();
|
|
|
+ ExamSubjectSong examSubjectSong = examSubjectSongDao.getExamSubjectSong(examSubjectId, level);
|
|
|
+ if(examSubjectSong == null){
|
|
|
+ return examSongs;
|
|
|
+ }
|
|
|
+ List<ExamSong> practiceSong = examSongDao.getExamSongs(examSubjectSong.getPracticeSongIdList());
|
|
|
+ if(practiceSong != null){
|
|
|
+ examSongs.addAll(practiceSong);
|
|
|
+ }
|
|
|
+ List<ExamSong> performSong = examSongDao.getExamSongs(examSubjectSong.getPerformSongIdList());
|
|
|
+ if(performSong != null){
|
|
|
+ examSongs.addAll(performSong);
|
|
|
+ }
|
|
|
+ return examSongs;
|
|
|
+ }
|
|
|
}
|