|
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.microsvc.toolkit.common.response.paging.QueryInfo;
|
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
+import com.yonge.cooleshow.biz.dal.entity.Teacher;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
|
+import com.yonge.cooleshow.biz.dal.service.TeacherService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.TenantAlbumMusicService;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumMusicWrapper;
|
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
@@ -40,6 +42,8 @@ public class TenantAlbumSheetController extends BaseController {
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TeacherService teacherService;
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "分页查询")
|
|
@@ -49,7 +53,9 @@ public class TenantAlbumSheetController extends BaseController {
|
|
|
if (user == null || null == user.getId()) {
|
|
|
return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
}
|
|
|
- query.setTenantId(Optional.ofNullable(user.getTenantId()).orElse(-1L));
|
|
|
+
|
|
|
+ Teacher teacher = teacherService.getById(user.getId());
|
|
|
+ query.setTenantId(Optional.ofNullable(teacher.getTenantId()).orElse(-1L));
|
|
|
query.setClientType(ClientEnum.TEACHER);
|
|
|
IPage<TenantAlbumMusicWrapper.StudentTenantAlbumMusic> page = tenantAlbumMusicService.selectPage(QueryInfo.getPage(query), query);
|
|
|
return succeed((PageUtil.pageInfo(page)));
|