|
@@ -12,15 +12,14 @@ import com.zhongzheng.common.exception.CustomException;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
import com.zhongzheng.framework.web.service.TokenService;
|
|
import com.zhongzheng.framework.web.service.TokenService;
|
|
|
import com.zhongzheng.modules.bank.vo.QuestionImport;
|
|
import com.zhongzheng.modules.bank.vo.QuestionImport;
|
|
|
-import com.zhongzheng.modules.course.bo.CourseSectionAddBo;
|
|
|
|
|
-import com.zhongzheng.modules.course.bo.CourseSectionBusinessAddBo;
|
|
|
|
|
-import com.zhongzheng.modules.course.bo.CourseSectionEditBo;
|
|
|
|
|
-import com.zhongzheng.modules.course.bo.CourseSectionQueryBo;
|
|
|
|
|
|
|
+import com.zhongzheng.modules.course.bo.*;
|
|
|
import com.zhongzheng.modules.course.domain.CourseSectionBusiness;
|
|
import com.zhongzheng.modules.course.domain.CourseSectionBusiness;
|
|
|
import com.zhongzheng.modules.course.service.ICourseSectionBusinessService;
|
|
import com.zhongzheng.modules.course.service.ICourseSectionBusinessService;
|
|
|
import com.zhongzheng.modules.course.service.ICourseSectionService;
|
|
import com.zhongzheng.modules.course.service.ICourseSectionService;
|
|
|
|
|
+import com.zhongzheng.modules.course.service.ICourseSectionWatchPerService;
|
|
|
import com.zhongzheng.modules.course.vo.CourseSectionImport;
|
|
import com.zhongzheng.modules.course.vo.CourseSectionImport;
|
|
|
import com.zhongzheng.modules.course.vo.CourseSectionVo;
|
|
import com.zhongzheng.modules.course.vo.CourseSectionVo;
|
|
|
|
|
+import com.zhongzheng.modules.course.vo.CourseSectionWatchPerVo;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -58,6 +57,8 @@ public class CourseSectionController extends BaseController {
|
|
|
|
|
|
|
|
private final ICourseSectionBusinessService iCourseSectionBusinessService;
|
|
private final ICourseSectionBusinessService iCourseSectionBusinessService;
|
|
|
|
|
|
|
|
|
|
+ private final ICourseSectionWatchPerService iCourseSectionWatchPerService;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TokenService tokenService;
|
|
private TokenService tokenService;
|
|
|
|
|
|
|
@@ -186,4 +187,23 @@ public class CourseSectionController extends BaseController {
|
|
|
List<CourseSectionBusiness> list = iCourseSectionBusinessService.getListById(sectionId);
|
|
List<CourseSectionBusiness> list = iCourseSectionBusinessService.getListById(sectionId);
|
|
|
return AjaxResult.success(list);
|
|
return AjaxResult.success(list);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取课程小节观看权限
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation("获取课程小节观看权限")
|
|
|
|
|
+ @GetMapping("/watch/per")
|
|
|
|
|
+ public AjaxResult<CourseSectionWatchPerVo> getSectionWatchPer(SectionWatchPerBo bo) {
|
|
|
|
|
+ CourseSectionWatchPerVo vo = iCourseSectionWatchPerService.getSectionWatchPer(bo);
|
|
|
|
|
+ return AjaxResult.success(vo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 保存课程小节观看权限
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation("保存课程小节观看权限")
|
|
|
|
|
+ @PostMapping("/add/watch/per")
|
|
|
|
|
+ public AjaxResult<Void> addSectionWatchPer(@RequestBody SectionWatchPerAddBo bo) {
|
|
|
|
|
+ return toAjax(iCourseSectionWatchPerService.insertByAddBo(bo));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|