|
@@ -668,11 +668,6 @@ public class TeachCourseServiceImpl extends ServiceImpl<TeachCourseMapper, Teach
|
|
if (Objects.isNull(sysUser)) {
|
|
if (Objects.isNull(sysUser)) {
|
|
throw ExceptionResultEnum.ERROR.exception("用户不存在");
|
|
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(
|
|
List<String> courseCodeList = this.list(
|
|
new QueryWrapper<TeachCourse>().lambda().eq(TeachCourse::getUserId, userId)).stream().map(TeachCourse::getCourseCode).distinct().collect(Collectors.toList());
|
|
new QueryWrapper<TeachCourse>().lambda().eq(TeachCourse::getUserId, userId)).stream().map(TeachCourse::getCourseCode).distinct().collect(Collectors.toList());
|
|
return courseCodeList.stream().flatMap(e -> {
|
|
return courseCodeList.stream().flatMap(e -> {
|