|
@@ -74,8 +74,10 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "用户声部小班课列表")
|
|
|
@GetMapping("/highClassGroups")
|
|
|
- @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团id", required = true, dataType = "String")})
|
|
|
- public HttpResponseResult getHighClassGroup(String musicGroupId) {
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团id", required = true, dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "classGroupIds", value = "班级ids", required = true, dataType = "String")}
|
|
|
+ )
|
|
|
+ public HttpResponseResult getHighClassGroup(String musicGroupId,String classGroupIds) {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
Integer userId = sysUser.getId();
|
|
|
StudentRegistration studentRegistration = studentRegistrationService.queryByUserIdAndMusicGroupId(userId, musicGroupId);
|
|
@@ -84,15 +86,14 @@ public class ClassGroupController extends BaseController {
|
|
|
}
|
|
|
MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
Map<String, Object> classGroupAndStatusMap = new HashMap<>();
|
|
|
-// List<HighClassGroupDto> highClassGroups = new ArrayList<>();
|
|
|
-// if (musicGroup.getStatus().equals(MusicGroupStatusEnum.PROGRESS)) {
|
|
|
-// highClassGroups = classGroupDao.findHighClassGroupByTypeAndSubjectId(musicGroupId, studentRegistration.getActualSubjectId(), "HIGH");
|
|
|
-// List<HighClassGroupDto> highOnlineClassGroup = classGroupDao.findHighClassGroupByTypeAndSubjectId(musicGroupId, studentRegistration.getActualSubjectId(), "HIGH_ONLINE");
|
|
|
-// highClassGroups.addAll(highOnlineClassGroup);
|
|
|
-// } else {
|
|
|
-// highClassGroups = classGroupService.findClassGroupByMusicGroupIdAndSubjectId(musicGroupId, studentRegistration.getActualSubjectId());
|
|
|
-// }
|
|
|
- List<HighClassGroupDto> highClassGroups = classGroupService.findClassGroupByMusicGroupIdAndSubjectId(musicGroupId, studentRegistration.getActualSubjectId());
|
|
|
+ List<HighClassGroupDto> highClassGroups = new ArrayList<>();
|
|
|
+ if (classGroupIds != null && !classGroupIds.isEmpty()) {
|
|
|
+ highClassGroups = classGroupDao.findHighClassGroupByTypeAndSubjectId(musicGroupId, studentRegistration.getActualSubjectId(), "HIGH",classGroupIds);
|
|
|
+ List<HighClassGroupDto> highOnlineClassGroup = classGroupDao.findHighClassGroupByTypeAndSubjectId(musicGroupId, studentRegistration.getActualSubjectId(), "HIGH_ONLINE",classGroupIds);
|
|
|
+ highClassGroups.addAll(highOnlineClassGroup);
|
|
|
+ } else {
|
|
|
+ highClassGroups = classGroupService.findClassGroupByMusicGroupIdAndSubjectId(musicGroupId, studentRegistration.getActualSubjectId());
|
|
|
+ }
|
|
|
|
|
|
List<ClassGroupStudentMapper> ClassGroupStudentMapper = classGroupStudentMapperDao.findHighClassGroupHasUser(musicGroupId, userId, ClassGroupTypeEnum.HIGH);
|
|
|
List<ClassGroupStudentMapper> highOnlineClassGroupStudentMapper = classGroupStudentMapperDao.findHighClassGroupHasUser(musicGroupId, userId, ClassGroupTypeEnum.HIGH_ONLINE);
|