刘俊驰 hace 5 meses
padre
commit
716f088d40

+ 1 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/TenantAlbumSheetController.java

@@ -72,7 +72,7 @@ public class TenantAlbumSheetController extends BaseController {
         if (user == null || null == user.getId()) {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
-        query.setUserId(user.getId());
+//        query.setUserId(user.getId());
         if(query.getSubjectId() == null){
         	Student student = studentService.getById(user.getId());
             if (student == null) {

+ 16 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TenantAlbumSheetController.java

@@ -9,6 +9,7 @@ import com.microsvc.toolkit.common.response.template.R;
 import com.microsvc.toolkit.config.jwt.utils.JwtUserInfo;
 import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
+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.MusicSheetService;
@@ -20,7 +21,9 @@ import com.yonge.cooleshow.biz.dal.wrapper.LessonCoursewareWrapper;
 import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumMusicWrapper;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.toolset.base.exception.BizException;
 import com.yonge.toolset.base.page.PageInfo;
+import com.yonge.toolset.base.util.StringUtil;
 import com.yonge.toolset.mybatis.support.PageUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -64,6 +67,19 @@ public class TenantAlbumSheetController extends BaseController {
     @Autowired
     private TeacherService teacherService;
 
+
+    @ApiOperation(value = "查询条件")
+    @PostMapping("/selectCondition")
+    public HttpResponseResult<TenantAlbumMusicWrapper.TenantAlbumMusicSelectData> selectCondition(@RequestBody TenantAlbumMusicWrapper.TenantAlbumMusicSelect query) {
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if (user == null || null == user.getId()) {
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+//        query.setUserId(user.getId());
+        return succeed(tenantAlbumMusicService.getTenantAlbumMusicQuery(query));
+    }
+
+
     @ApiOperation(value = "分页查询")
     @PostMapping("/page")
     public HttpResponseResult<PageInfo<TenantAlbumMusicWrapper.StudentTenantAlbumMusic>> page(@RequestBody @Validated TenantAlbumMusicWrapper.StudentTenantAlbumMusicQuery query) {

+ 1 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TenantGroupAlbumController.java

@@ -58,7 +58,7 @@ public class TenantGroupAlbumController {
         if (user == null || null == user.getId()) {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
-        query.setUserId(user.getId());
+//        query.setUserId(user.getId());
         return HttpResponseResult.succeed(tenantAlbumMusicService.getTenantAlbumMusicQuery(query));
     }
 

+ 1 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/tenant/controller/TenantAlbumSheetController.java

@@ -56,7 +56,7 @@ public class TenantAlbumSheetController extends BaseController {
         if (user == null || null == user.getId()) {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
-        query.setUserId(user.getId());
+//        query.setUserId(user.getId());
         /*if(StringUtils.isBlank(query.getSubjectId())){
         	Student student = studentService.getById(user.getId());
         	query.setSubjectId(student.getSubjectId());

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantAlbumMusicServiceImpl.java

@@ -345,7 +345,7 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
         // 声部
         String subjectIds = musicSheets.stream()
                 .map(MusicSheet::getMusicSubject)
-                .filter(StringUtils::isNotBlank).collect(Collectors.joining(","));
+                .filter(StringUtils::isNotBlank).distinct().collect(Collectors.joining(","));
         if (StringUtils.isNotEmpty(subjectIds)) {
             List<Subject> subjects = subjectService.findBySubjectByIdList(subjectIds);
             data.setSubjects(subjects);

+ 2 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/TenantAlbumMusicWrapper.java

@@ -90,8 +90,8 @@ public class TenantAlbumMusicWrapper {
         @NotNull(message = "分类不能为空")
         private SubjectTypeEnum subjectType;
 
-        @ApiModelProperty(value = "用户ID", hidden = true)
-        private Long userId;
+//        @ApiModelProperty(value = "用户ID", hidden = true)
+//        private Long userId;
 
         @ApiModelProperty("声部id")
         private Long subjectId;