|  | @@ -3,7 +3,9 @@ package com.yonge.cooleshow.teacher.controller;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.service.TenantAlbumMusicService;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.service.TenantGroupAlbumService;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumMusicWrapper;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.wrapper.TenantGroupAlbumWrapper;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
	
		
			
				|  | @@ -12,13 +14,12 @@ import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.http.HttpStatus;
 | 
	
		
			
				|  |  |  import org.springframework.validation.annotation.Validated;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.GetMapping;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RequestParam;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import static com.yonge.cooleshow.common.controller.BaseController.failed;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  @Slf4j
 | 
	
		
			
				|  |  |  @Validated
 | 
	
		
			
				|  |  |  @RestController
 | 
	
	
		
			
				|  | @@ -32,6 +33,8 @@ public class TenantGroupAlbumController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private SysUserFeignService sysUserFeignService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private TenantAlbumMusicService tenantAlbumMusicService;
 | 
	
		
			
				|  |  |  	@ApiOperation(value = "学生可购买机构专辑信息")
 | 
	
		
			
				|  |  |  	@GetMapping("/buyAlbumInfo")
 | 
	
		
			
				|  |  |  	public HttpResponseResult<List<TenantGroupAlbumWrapper.BuyTenantAlbum>> buyAlbumInfo(@RequestParam(required = false) Long tenantGroupAlbumId) {
 | 
	
	
		
			
				|  | @@ -47,4 +50,16 @@ public class TenantGroupAlbumController {
 | 
	
		
			
				|  |  |          query.setClientType(ClientEnum.TEACHER);
 | 
	
		
			
				|  |  |  		return HttpResponseResult.succeed(tenantGroupAlbumService.buyAlbumInfo(query));
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "查询条件")
 | 
	
		
			
				|  |  | +    @PostMapping("/selectCondition")
 | 
	
		
			
				|  |  | +    public HttpResponseResult<TenantAlbumMusicWrapper.TenantAlbumMusicSelectData> selectCondition(@RequestBody @Validated TenantAlbumMusicWrapper.TenantAlbumMusicSelect query) {
 | 
	
		
			
				|  |  | +        SysUser user = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | +        if (user == null || null == user.getId()) {
 | 
	
		
			
				|  |  | +            return failed(HttpStatus.FORBIDDEN, "请登录");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        query.setUserId(user.getId());
 | 
	
		
			
				|  |  | +        return HttpResponseResult.succeed(tenantAlbumMusicService.getTenantAlbumMusicQuery(query));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  }
 |