zjk
2026-09-29 54dcf0a82e7490fa58b1c056d5c0b9cb739c2931
tcm-training-admin-backend/src/main/java/com/tcm/training/admin/live/service/LiveCourseAppService.java
@@ -59,6 +59,7 @@
        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);
@@ -85,6 +86,7 @@
    }
    @Transactional(rollbackFor = Exception.class)
    /** 创建直播课程。 */
    public LiveCourseDetailVO create(LiveCourseUpsertRequest req) {
        throw new IllegalArgumentException("直播课程为初始化数据,禁止新增");
        /*
@@ -107,6 +109,7 @@
        */
    }
    /** 查询直播课程详情。 */
    public LiveCourseDetailVO detail(Long id) {
        LiveCourseDetailRow row = liveCourseMapper.selectCourseDetail(id);
        if (row == null) {
@@ -136,6 +139,7 @@
    }
    @Transactional(rollbackFor = Exception.class)
    /** 更新直播课程。 */
    public LiveCourseDetailVO update(Long id, LiveCourseUpsertRequest req) {
        validateExpert(req.getExpertId());
@@ -160,6 +164,7 @@
    }
    @Transactional(rollbackFor = Exception.class)
    /** 修改直播课程状态。 */
    public LiveCourseStatusVO patchStatus(Long id, LiveCourseStatusRequest req) {
        LiveCourse course = liveCourseMapper.selectById(id);
        if (course == null) {
@@ -171,6 +176,7 @@
    }
    @Transactional(rollbackFor = Exception.class)
    /** 更新直播课程密码。 */
    public void updatePassword(Long id, LiveCoursePasswordRequest req) {
        String password = req.getPassword();
        if (StrUtil.isNotBlank(password)) {
@@ -190,6 +196,7 @@
        liveCourseMapper.updatePasswordById(id, course.getPassword());
    }
    /** 校验直播课程访问密码。 */
    public boolean verifyPassword(LiveCoursePasswordVerifyRequest req) {
        if (req.getType() == LIVE_ROOM_PASSWORD_TYPE) {
            // 直播间密码验证
@@ -210,6 +217,7 @@
    }
    @Transactional(rollbackFor = Exception.class)
    /** 删除直播课程。 */
    public void delete(Long id) {
        throw new IllegalArgumentException("直播课程为初始化数据,禁止删除");
    }