|
@@ -3,9 +3,11 @@ package com.ym.mec.biz.service.impl;
|
|
|
import com.dayaedu.cbs.openfeign.service.CbsSubjectService;
|
|
|
import com.dayaedu.cbs.openfeign.wrapper.music.CbsSubjectApiWrapper;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import com.ym.mec.biz.dal.entity.Instrument;
|
|
|
import com.ym.mec.biz.dal.entity.Subject;
|
|
|
import com.ym.mec.biz.dal.wrapper.InstrumentWrapper;
|
|
|
import com.ym.mec.biz.dal.wrapper.SubjectWrapper;
|
|
|
+import com.ym.mec.biz.service.InstrumentService;
|
|
|
import com.ym.mec.biz.service.SubjectService;
|
|
|
import com.ym.mec.common.page.PageInfo;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
@@ -25,6 +27,8 @@ public class CbsSubjectServiceImpl implements CbsSubjectService {
|
|
|
|
|
|
@Resource
|
|
|
private SubjectService subjectService;
|
|
|
+ @Resource
|
|
|
+ private InstrumentService instrumentService;
|
|
|
|
|
|
public Boolean checkSubjectEnable(CbsSubjectApiWrapper.CheckSubjectDto checkSubjectDto) {
|
|
|
List<Subject> subjects = subjectService.getDao().queryCbsList(Lists.newArrayList(checkSubjectDto.getSubjectId().longValue()));
|
|
@@ -62,4 +66,9 @@ public class CbsSubjectServiceImpl implements CbsSubjectService {
|
|
|
}
|
|
|
return subjects;
|
|
|
}
|
|
|
+
|
|
|
+ public List<Long> instrumentList(CbsSubjectApiWrapper.InstrumentQuery query){
|
|
|
+ List<Instrument> list = instrumentService.lambdaQuery().in(Instrument::getId, query.getMusicalInstrumentIds()).list();
|
|
|
+ return list.stream().map(e->e.getId().longValue()).collect(Collectors.toList());
|
|
|
+ }
|
|
|
}
|