Browse Source

add:单点登录到去掉 角色必须为老师判断

caozixuan 1 year ago
parent
commit
1976f6161e

+ 0 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TeachCourseServiceImpl.java

@@ -668,11 +668,6 @@ public class TeachCourseServiceImpl extends ServiceImpl<TeachCourseMapper, Teach
         if (Objects.isNull(sysUser)) {
             throw ExceptionResultEnum.ERROR.exception("用户不存在");
         }
-        List<SysRole> roleList = sysUserRoleService.listRoleByUserId(userId);
-        if (!roleList.stream().map(SysRole::getType).collect(Collectors.toList())
-                .contains(RoleTypeEnum.SCHOOL_TEACHER)) {
-            throw ExceptionResultEnum.ERROR.exception("该用户不包含学校教师角色");
-        }
         List<String> courseCodeList = this.list(
                 new QueryWrapper<TeachCourse>().lambda().eq(TeachCourse::getUserId, userId)).stream().map(TeachCourse::getCourseCode).distinct().collect(Collectors.toList());
         return courseCodeList.stream().flatMap(e -> {