| | |
| | | this.projectIntroductionPasswordService = projectIntroductionPasswordService; |
| | | } |
| | | |
| | | /** 分页查询直播课程。 */ |
| | | public PageResponse<LiveCourseListItemVO> page(int page, int pageSize, String keyword, Long expertId, Integer status, Integer liveStatus) { |
| | | IPage<LiveCourseListRow> p = liveCourseMapper.selectCoursePage(new Page<LiveCourseListRow>(page, pageSize), |
| | | keyword, expertId, status, liveStatus); |
| | |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | /** 创建直播课程。 */ |
| | | public LiveCourseDetailVO create(LiveCourseUpsertRequest req) { |
| | | throw new IllegalArgumentException("直播课程为初始化数据,禁止新增"); |
| | | /* |
| | |
| | | */ |
| | | } |
| | | |
| | | /** 查询直播课程详情。 */ |
| | | public LiveCourseDetailVO detail(Long id) { |
| | | LiveCourseDetailRow row = liveCourseMapper.selectCourseDetail(id); |
| | | if (row == null) { |
| | |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | /** 更新直播课程。 */ |
| | | public LiveCourseDetailVO update(Long id, LiveCourseUpsertRequest req) { |
| | | validateExpert(req.getExpertId()); |
| | | |
| | |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | /** 修改直播课程状态。 */ |
| | | public LiveCourseStatusVO patchStatus(Long id, LiveCourseStatusRequest req) { |
| | | LiveCourse course = liveCourseMapper.selectById(id); |
| | | if (course == null) { |
| | |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | /** 更新直播课程密码。 */ |
| | | public void updatePassword(Long id, LiveCoursePasswordRequest req) { |
| | | String password = req.getPassword(); |
| | | if (StrUtil.isNotBlank(password)) { |
| | |
| | | liveCourseMapper.updatePasswordById(id, course.getPassword()); |
| | | } |
| | | |
| | | /** 校验直播课程访问密码。 */ |
| | | public boolean verifyPassword(LiveCoursePasswordVerifyRequest req) { |
| | | if (req.getType() == LIVE_ROOM_PASSWORD_TYPE) { |
| | | // 直播间密码验证 |
| | |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | /** 删除直播课程。 */ |
| | | public void delete(Long id) { |
| | | throw new IllegalArgumentException("直播课程为初始化数据,禁止删除"); |
| | | } |