|
@@ -9,10 +9,13 @@ import com.zhongzheng.common.utils.ServletUtils;
|
|
|
import com.zhongzheng.framework.web.service.WxTokenService;
|
|
|
import com.zhongzheng.modules.course.bo.CourseAddBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseEditBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseQueryBo;
|
|
|
+import com.zhongzheng.modules.course.service.ICourseChapterSectionService;
|
|
|
+import com.zhongzheng.modules.course.service.ICourseMenuService;
|
|
|
+import com.zhongzheng.modules.course.service.ICourseModuleChapterService;
|
|
|
import com.zhongzheng.modules.course.service.ICourseService;
|
|
|
-import com.zhongzheng.modules.course.vo.CourseUserVo;
|
|
|
-import com.zhongzheng.modules.course.vo.CourseVo;
|
|
|
+import com.zhongzheng.modules.course.vo.*;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsUserVo;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
import com.zhongzheng.modules.user.entity.ClientLoginUser;
|
|
@@ -39,6 +42,9 @@ public class CourseController extends BaseController {
|
|
|
|
|
|
private final ICourseService iCourseService;
|
|
|
private final WxTokenService wxTokenService;
|
|
|
+ private final ICourseModuleChapterService iCourseModuleChapterService;
|
|
|
+ private final ICourseMenuService iCourseMenuService;
|
|
|
+ private final ICourseChapterSectionService iCourseChapterSectionService;
|
|
|
|
|
|
/**
|
|
|
* 查询课程列表
|
|
@@ -66,5 +72,38 @@ public class CourseController extends BaseController {
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询课程目录结构列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询课程目录结构列表")
|
|
|
+ @GetMapping("/menuList")
|
|
|
+ public TableDataInfo<CourseUserMenuVo> menuList(CourseMenuQueryBo bo) {
|
|
|
+ startPage();
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
+ List<CourseUserMenuVo> list = iCourseMenuService.menuList(bo);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
|
|
|
+
|
|
|
+ @ApiOperation("查询模块与章关系列表")
|
|
|
+ @GetMapping("/chapterList")
|
|
|
+ public AjaxResult<List<CourseUserModuleChapterVo>> chapterList(CourseMenuQueryBo bo) {
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
+ List<CourseUserModuleChapterVo> list = iCourseModuleChapterService.chapterList(bo);
|
|
|
+ return AjaxResult.success(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询章与节关系列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询章与节关系列表+章卷同级展示")
|
|
|
+ @GetMapping("/sectionList")
|
|
|
+ public AjaxResult<List<CourseChapterSectionVo>> sectionList(CourseMenuQueryBo bo) {
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
+ List<CourseChapterSectionVo> list = iCourseChapterSectionService.sectionList(bo);
|
|
|
+ return AjaxResult.success(list);
|
|
|
+ }
|
|
|
}
|