|  | @@ -5,7 +5,12 @@ import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dto.search.MusicAlbumDetailSearch;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dto.search.MusicAlbumSearch;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.entity.Student;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.entity.Teacher;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.service.MusicAlbumService;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.service.StudentService;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.service.TeacherService;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.enums.YesOrNoEnum;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.mybatis.support.PageUtil;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.vo.AlbumDetailVo;
 | 
	
	
		
			
				|  | @@ -13,8 +18,11 @@ import com.yonge.cooleshow.biz.dal.vo.MusicAlbumVo;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.controller.BaseController;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.base.page.PageInfo;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.PostMapping;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RequestBody;
 | 
	
	
		
			
				|  | @@ -22,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.validation.Valid;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  |  import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -40,6 +49,12 @@ public class OpenMusicAlbumController extends BaseController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  |  	private MusicAlbumService musicAlbumService;
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private StudentService studentService;
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private TeacherService teacherService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "热门专辑", httpMethod="POST", consumes="application/json", produces="application/json")
 | 
	
	
		
			
				|  | @@ -49,6 +64,20 @@ public class OpenMusicAlbumController extends BaseController {
 | 
	
		
			
				|  |  |          SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  |          if (sysUser != null && sysUser.getId() != null) {
 | 
	
		
			
				|  |  |              query.setUserId(sysUser.getId());
 | 
	
		
			
				|  |  | +        	
 | 
	
		
			
				|  |  | +            if(StringUtils.isNotBlank(query.getClientId())){
 | 
	
		
			
				|  |  | +    			if (StringUtils.equals(ClientEnum.STUDENT.getCode(), query.getClientId())) {
 | 
	
		
			
				|  |  | +    				Student student = studentService.getById(sysUser.getId());
 | 
	
		
			
				|  |  | +    	        	if(student != null){
 | 
	
		
			
				|  |  | +    	                query.setSubjectIds(student.getSubjectId());
 | 
	
		
			
				|  |  | +    	        	}
 | 
	
		
			
				|  |  | +    			} else if (StringUtils.equals(ClientEnum.TEACHER.getCode(), query.getClientId())) {
 | 
	
		
			
				|  |  | +    				Teacher teacher = teacherService.getById(sysUser.getId());
 | 
	
		
			
				|  |  | +    	        	if(teacher != null){
 | 
	
		
			
				|  |  | +    	                query.setSubjectIds(teacher.getSubjectId());
 | 
	
		
			
				|  |  | +    	        	}
 | 
	
		
			
				|  |  | +    			}
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 检查app版本
 |