2 コミット fc728a475f ... af63465306

作者 SHA1 メッセージ 日付
  Eric af63465306 Merge branch 'feature/0902_courseware' into develop-new 2 ヶ月 前
  Eric b5e644a47b fix 课件课时数字段 2 ヶ月 前

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

@@ -113,7 +113,7 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
                 return page.setRecords(musicSheets);
             }
             CbsMusicSheetWrapper.MusicSheetApplicationQuery cbsQuery = musicSheetService.getMusicSheetApplicationQuery();
-            List<Long> cbsMusicSheetIds = musicSheets.stream().map(e -> e.getCbsMusicSheetId()).collect(Collectors.toList());
+            List<Long> cbsMusicSheetIds = musicSheets.stream().map(TenantAlbumMusicWrapper.StudentTenantAlbumMusic::getCbsMusicSheetId).collect(Collectors.toList());
             cbsQuery.setMusicSheetIds(cbsMusicSheetIds);
             cbsQuery.setRows(cbsMusicSheetIds.size());
             List<CbsMusicSheetWrapper.MusicSheetApplication> rows = musicSheetService.queryCbsMusicSheetApplication(cbsQuery);
@@ -199,7 +199,7 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
                     studentTenantAlbumMusic.setTitleImg(row.getCoverImg());
                     studentTenantAlbumMusic.setMusicSubject(row.getCourseTypeCode());
                     studentTenantAlbumMusic.setMusicSubjectName(ECourseType.valueOf(row.getCourseTypeCode()).getName());
-                    musicSheets.add(studentTenantAlbumMusic);
+                    musicSheets.add(studentTenantAlbumMusic.courseNum(row.getCourseNum()).unitTestNum(row.getUnitTestNum()));
 
                 }
 
@@ -414,7 +414,7 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
             } else {
                 List<Long> useAlbumIdsByUserId = userTenantAlbumRecordService.getUseAlbumIdsByUserId(query.getUserId(), query.getClient());
                 if (CollectionUtils.isNotEmpty(useAlbumIdsByUserId)) {
-                    List<Long> list = tenantAlbumMusicService.getTenantAlbumMusicIdsByIds(useAlbumIdsByUserId, Arrays.asList(SubjectTypeEnum.COURSEWARE));
+                    List<Long> list = tenantAlbumMusicService.getTenantAlbumMusicIdsByIds(useAlbumIdsByUserId, Collections.singletonList(SubjectTypeEnum.COURSEWARE));
                     if (list.contains(query.getLessonCoursewareId())) {
                         lessonCoursewareDto.setPlay(true);
                     }

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

@@ -253,6 +253,12 @@ public class TenantAlbumMusicWrapper {
         @ApiModelProperty("声谱类型,SINGLE:单曲,CONCERT:合奏")
         private String musicSheetType;
 
+        @ApiModelProperty("课时数")
+        private Integer courseNum;
+
+        @ApiModelProperty("单元测验数量")
+        private Integer unitTestNum;
+
         public String jsonString() {
             return JSON.toJSONString(this);
         }
@@ -261,6 +267,15 @@ public class TenantAlbumMusicWrapper {
             return JSON.parseObject(json, TenantAlbumMusic.class);
         }
 
+        public StudentTenantAlbumMusic unitTestNum(Integer unitTestNum) {
+            this.unitTestNum = unitTestNum;
+            return this;
+        }
+
+        public StudentTenantAlbumMusic courseNum(Integer courseNum) {
+            this.courseNum = courseNum;
+            return this;
+        }
     }
 
 }