Browse Source

管乐迷课件新增老师和学员的课件权限配置

zouxuan 1 year ago
parent
commit
10f7440c9b

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/wrapper/LessonCoursewareWrapper.java

@@ -81,6 +81,12 @@ public class LessonCoursewareWrapper {
 
         @ApiModelProperty("声部id")
         private Integer subjectId;
+
+        @ApiModelProperty(value = "学员适用范围ALL,RANGE,DISABLE")
+        private String studentRangeType;
+
+        @ApiModelProperty(value = "老师适用范围ALL,RANGE,DISABLE")
+        private String teacherRangeType;
     }
 
     @Data

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/LessonCoursewareServiceImpl.java

@@ -146,6 +146,8 @@ public class LessonCoursewareServiceImpl extends ServiceImpl<LessonCoursewareMap
         LessonCoursewareWrapper.UpdateRangeDetail detail = new LessonCoursewareWrapper.UpdateRangeDetail();
         detail.setName(lessonCoursewareR.getData().getName());
         detail.setLessonCoursewareId(lessonCoursewareId);
+        detail.setStudentRangeType(lessonCourseware.getStudentRangeType());
+        detail.setTeacherRangeType(lessonCourseware.getTeacherRangeType());
         if(lessonCourseware.getStudentRangeType().equals("RANGE")){
             List<LessonCoursewareUserMapper> studentList = lessonCoursewareUserMapperService.lambdaQuery()
                     .eq(LessonCoursewareUserMapper::getLessonCoursewareId, lessonCoursewareId)

+ 3 - 1
mec-biz/src/main/resources/config/mybatis/LessonCoursewareMapper.xml

@@ -31,7 +31,9 @@
         </where>
     </sql>
     <select id="selectPage" resultType="com.ym.mec.biz.dal.wrapper.LessonCoursewareWrapper$LessonCoursewareDto">
-        select lc.id_ id, lc.subject_id_ subjectId, lc.lesson_course_id_ lessonCoursewareId, lc.enable_ enable from lesson_courseware lc
+        select lc.id_ id, lc.subject_id_ subjectId, lc.lesson_course_id_ lessonCoursewareId, lc.enable_ enable,
+               lc.student_range_type_ studentRangeType, lc.teacher_range_type_ teacherRangeType
+        from lesson_courseware lc
         left join lesson_courseware_user_mapper lcum ON lcum.lesson_courseware_id_ = lc.id_
         <include refid="selectPageSql"/>
         GROUP BY lc.id_