Commit aaf0b6e5 authored by liuyuanjun's avatar liuyuanjun

测试29564bug修改

parent fc2d6c00
......@@ -284,7 +284,12 @@ public class BChapterServiceImpl implements BChapterService {
//未加入我学习中或外部分享
map.put("currentChapter", "");
}
//判断当前企业是否可以查看课程
if (StringUtils.isNotEmpty(curUser.getCorpId())) {
if (bLessonRepository.queryViewRangeByCorpId(lessonId,curUser.getCorpId()) < 1) {
map.put("code", 132);
}
}
return map;
}
......
......@@ -1401,5 +1401,14 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
@ResultMap(value = "BaseResultMap")
List<BLesson> getLessons(@Param("corpId") String corpId);
/**
* 根据课程id和企业id查询课程可见范围
* @param lessonId
* @param corpId
* @return
*/
@Select("select count(0) from b_lesson_corp where lesson_id = #{lessonId} and corp_id = #{corpId}")
int queryViewRangeByCorpId(@Param("lessonId") String lessonId, @Param("corpId") String corpId);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment