|
|
@@ -49,20 +49,24 @@ public class CourseSectionWatchPerServiceImpl extends ServiceImpl<CourseSectionW
|
|
|
@Override
|
|
|
public CourseSectionWatchPerVo getSectionWatchPer(SectionWatchPerBo bo) {
|
|
|
CourseSectionWatchPerVo vo = new CourseSectionWatchPerVo();
|
|
|
+ //获取课程节信息
|
|
|
+ CourseSection section = courseSectionService.getById(bo.getSectionId());
|
|
|
+ String url = "";
|
|
|
//生成微信小程序码
|
|
|
switch (bo.getSectionType()){
|
|
|
- case 2://直播
|
|
|
+ case 2://直播 living-room/
|
|
|
+ String live = "living-room/";
|
|
|
vo.setEnCode(wxLoginService.getLiveEnCode(bo));
|
|
|
+ url = String.format("%s%s%s?a=1&cid=%s&gid=%s&sid=%s", liveGotoURL,live,section.getLiveUrl(), bo.getCourseId(), bo.getGoodsId(), bo.getSectionId());
|
|
|
break;
|
|
|
- case 3://回放
|
|
|
+ case 3://回放 my-live-detail/
|
|
|
+ String detail = "my-live-detail/";
|
|
|
vo.setEnCode(wxLoginService.getBackEnCode(bo));
|
|
|
+ url = String.format("%s%s%s?a=1&cid=%s&gid=%s&sid=%s", liveGotoURL,detail,bo.getGoodsId(), bo.getCourseId(), bo.getGoodsId(), bo.getSectionId());
|
|
|
break;
|
|
|
default:
|
|
|
throw new CustomException("课程节类型不正确,请检查");
|
|
|
}
|
|
|
- //获取课程节信息
|
|
|
- CourseSection section = courseSectionService.getById(bo.getSectionId());
|
|
|
- String url = String.format("%s%s?a=1&cid=%s&gid=%s&sid=%s", liveGotoURL,section.getLiveUrl(), bo.getCourseId(), bo.getGoodsId(), bo.getSectionId());
|
|
|
vo.setEnCodePC(url);
|
|
|
CourseSectionWatchPer watchPer = getOne(new LambdaQueryWrapper<CourseSectionWatchPer>()
|
|
|
.eq(ObjectUtils.isNotNull(bo.getCourseId()), CourseSectionWatchPer::getCourseId, bo.getCourseId())
|