Procházet zdrojové kódy

课程课时关联信息完善

honorfire před 7 měsíci
rodič
revize
d3b6950e95

+ 4 - 2
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/controller/CourseClassHourController.java

@@ -97,6 +97,7 @@ public class CourseClassHourController {
         //添加文件,测验等关联信息
         List<CourseRelate> courseRelates = classHourAddParam.getCourseRelates();
         courseRelates = courseRelates.stream()
+                .peek(oneCourseRelate -> oneCourseRelate.setChapterhourType("1")) // 修改属性
                 .peek(oneCourseRelate -> oneCourseRelate.setMainId(classHour.getId())) // 修改属性
                 .collect(Collectors.toList());
         courseRelateService.addBatch(courseRelates);
@@ -127,6 +128,7 @@ public class CourseClassHourController {
         //重新添加关联内容
         List<CourseRelate> courseRelates = classHourEditParam.getCourseRelates();
         courseRelates = courseRelates.stream()
+                .peek(oneCourseRelate -> oneCourseRelate.setChapterhourType("1"))
                 .peek(oneCourseRelate -> oneCourseRelate.setMainId(classHour.getId())) // 修改属性
                 .collect(Collectors.toList());
         courseRelateService.addBatch(courseRelates);
@@ -172,7 +174,7 @@ public class CourseClassHourController {
         List<String>funcTypeList=CollStreamUtil.toList(relateList, CourseRelate::getFuncType);
         Map relateParam =new HashMap();
         relateParam.put("mainId", req.getParameter("id"));
-        relateParam.put("chapterhourType", "0");
+        relateParam.put("chapterhourType", "1");
         //分别查回视频,讲义,字幕,作业,测验等
         for(String oneFunctype:funcTypeList)
         {
@@ -208,7 +210,7 @@ public class CourseClassHourController {
         List<String>funcTypeList=CollStreamUtil.toList(relateList, CourseRelate::getFuncType);
         Map relateParam =new HashMap();
         relateParam.put("mainId", req.getParameter("id"));
-        relateParam.put("chapterhourType", "0");
+        relateParam.put("chapterhourType", "1");
         //分别查回视频,讲义,字幕,作业,测验等
         for(String oneFunctype:funcTypeList)
         {