|
@@ -66,6 +66,8 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
|
private StudentExtracurricularExercisesSituationDao studentExtracurricularExercisesSituationDao;
|
|
|
@Autowired
|
|
|
private MusicGroupQuitDao musicGroupQuitDao;
|
|
|
+ @Autowired
|
|
|
+ private SubjectChangeDao subjectChangeDao;
|
|
|
|
|
|
@Override
|
|
|
public PageInfo<StudentManageListDto> findStudentsByOrganId(StudentManageQueryInfo queryInfo) {
|
|
@@ -213,7 +215,23 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
|
//获取学员报名时所选乐器
|
|
|
if (musicGroups.size() > 0) {
|
|
|
for (StudentManageBaseInfoOfMusicGroupDto e : musicGroups) {
|
|
|
- e.setUserGoodsDtos(studentPaymentOrderDao.findGoodsIds(e.getMusicGroupId(), e.getUserId()));
|
|
|
+ List<UserGoodsDto> userGoods = new ArrayList<>();
|
|
|
+ SubjectChange studentLastChange = subjectChangeDao.getStudentLastChange(e.getUserId(), e.getMusicGroupId());
|
|
|
+ if (studentLastChange != null) {
|
|
|
+ String goodsIds = "";
|
|
|
+ if (studentLastChange.getChangeMusical() != null) {
|
|
|
+ goodsIds += studentLastChange.getChangeMusical();
|
|
|
+ }
|
|
|
+ if (studentLastChange.getChangeAccessories() != null) {
|
|
|
+ goodsIds += StringUtils.isNotBlank(goodsIds) ? "," + studentLastChange.getChangeAccessories() : studentLastChange.getChangeAccessories();
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(goodsIds)) {
|
|
|
+ userGoods = studentPaymentOrderDao.getUserGoods(goodsIds);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ userGoods = studentPaymentOrderDao.findGoodsIds(e.getMusicGroupId(), e.getUserId());
|
|
|
+ }
|
|
|
+ e.setUserGoodsDtos(userGoods);
|
|
|
}
|
|
|
}
|
|
|
List<MusicGroupQuit> userMusicQuits = musicGroupQuitDao.getUserMusicQuit(userId);
|