Commit 59943dab authored by 王淑君's avatar 王淑君

修改接口

parent 67a16a3f
...@@ -55,8 +55,7 @@ public class BBannerServiceImpl implements BBannerService { ...@@ -55,8 +55,7 @@ public class BBannerServiceImpl implements BBannerService {
Pattern pattern = Pattern.compile(regex); Pattern pattern = Pattern.compile(regex);
if (!pattern.matcher(model.getExternalUrl()).matches()) { if (!pattern.matcher(model.getExternalUrl()).matches()) {
// System.out.println("是正确的网址"); throw new ServiceException("网址不合法");
throw new ServiceException("非法网址");
} }
} }
//内部链接但类型或课程ID为空或长度为0 抛异常 //内部链接但类型或课程ID为空或长度为0 抛异常
......
...@@ -388,9 +388,11 @@ public interface BChapterRepository extends BaseMapper<BChapter> { ...@@ -388,9 +388,11 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
" AND bp.chapter_id != '' " + " AND bp.chapter_id != '' " +
" AND b.business_id = #{lessonId} " + " AND b.business_id = #{lessonId} " +
" AND bp.person_id = #{userId} " + " AND bp.person_id = #{userId} " +
"and bp.corp_id = #{corpId} " +
"</script>") "</script>")
@ResultMap(value = "SupperChildListResultMap") @ResultMap(value = "SupperChildListResultMap")
QueryChapterListResDTO getWithCurrentChapterBylessonId(@Param("lessonId")String lessonId, @Param("userId")String userId); QueryChapterListResDTO getWithCurrentChapterBylessonId(@Param("lessonId")String lessonId, @Param("userId")String userId, @Param("corpId")String corpId);
/** /**
* 根据business_id将第一章第一节的课程时长加到course_time * 根据business_id将第一章第一节的课程时长加到course_time
......
...@@ -135,7 +135,7 @@ public class BChapterServiceImpl implements BChapterService { ...@@ -135,7 +135,7 @@ public class BChapterServiceImpl implements BChapterService {
map.put("chapterList", queryChapterListResDTOS); map.put("chapterList", queryChapterListResDTOS);
map.put("totalProgress", i==0? "0%" : df.format((float)percent/i) + "%"); map.put("totalProgress", i==0? "0%" : df.format((float)percent/i) + "%");
map.put("lessonInfo", bLessonRepository.selectByPrimaryKey(lessonId)); // 课程信息 map.put("lessonInfo", bLessonRepository.selectByPrimaryKey(lessonId)); // 课程信息
QueryChapterListResDTO queryChapterListResDTO = bChapterRepository.getWithCurrentChapterBylessonId(lessonId, curUser.getUserId()); QueryChapterListResDTO queryChapterListResDTO = bChapterRepository.getWithCurrentChapterBylessonId(lessonId, curUser.getUserId(),curUser.getCorpId());
if (null != queryChapterListResDTO && StringUtils.isNotBlank(queryChapterListResDTO.getPid())){ if (null != queryChapterListResDTO && StringUtils.isNotBlank(queryChapterListResDTO.getPid())){
BChapter bChapter = bChapterRepository.selectByPrimaryKey(queryChapterListResDTO.getPid()); BChapter bChapter = bChapterRepository.selectByPrimaryKey(queryChapterListResDTO.getPid());
if (null != bChapter) { if (null != bChapter) {
......
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