123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- package com.zhongzheng.controller.cmmon;
- import com.zhongzheng.common.core.controller.BaseController;
- import com.zhongzheng.common.core.domain.AjaxResult;
- import com.zhongzheng.common.core.page.TableDataInfo;
- import com.zhongzheng.framework.web.service.WxTokenService;
- import com.zhongzheng.modules.activity.bo.ActivityRecommendGoodsQueryBo;
- import com.zhongzheng.modules.activity.service.IActivityRecommendGoodsService;
- import com.zhongzheng.modules.activity.vo.ActivityRecommendGoodsVo;
- import com.zhongzheng.modules.bank.bo.ExamQuestionQueryBo;
- import com.zhongzheng.modules.bank.bo.QuestionChapterExamQueryBo;
- import com.zhongzheng.modules.bank.bo.QuestionModuleChapterQueryBo;
- import com.zhongzheng.modules.bank.service.IExamQuestionService;
- import com.zhongzheng.modules.bank.service.IQuestionChapterExamService;
- import com.zhongzheng.modules.bank.service.IQuestionModuleChapterService;
- import com.zhongzheng.modules.bank.vo.ExamQuestionVo;
- import com.zhongzheng.modules.bank.vo.ExamVo;
- import com.zhongzheng.modules.bank.vo.QuestionChapterVo;
- import com.zhongzheng.modules.course.bo.CourseHandoutsFileQueryBo;
- import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
- import com.zhongzheng.modules.course.bo.CourseSubjectQueryBo;
- import com.zhongzheng.modules.course.service.*;
- import com.zhongzheng.modules.course.vo.*;
- import com.zhongzheng.modules.goods.bo.GoodsAttachedQueryBo;
- import com.zhongzheng.modules.goods.bo.GoodsCourseTeacherQueryBo;
- import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
- import com.zhongzheng.modules.goods.service.IGoodsCourseTeacherService;
- import com.zhongzheng.modules.goods.service.IGoodsService;
- import com.zhongzheng.modules.goods.vo.GoodsAttachedVo;
- import com.zhongzheng.modules.goods.vo.GoodsCourseTeacherVo;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.RequiredArgsConstructor;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.security.access.prepost.PreAuthorize;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.PathVariable;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.ArrayList;
- import java.util.Arrays;
- import java.util.List;
- /**
- * 课程Controller
- *
- * @author hjl
- * @date 2021-10-09
- */
- @Api(value = "游客课程访问接口", tags = {"游客程访访问接口"})
- @RequiredArgsConstructor(onConstructor_ = @Autowired)
- @RestController
- @RequestMapping("/app/common/course/")
- public class CommonCourseController extends BaseController {
- private final ICourseModuleChapterService iCourseModuleChapterService;
- private final ICourseMenuService iCourseMenuService;
- private final ICourseChapterSectionService iCourseChapterSectionService;
- private final IGoodsCourseTeacherService iGoodsCourseTeacherService;
- private final ICourseSubjectService iCourseSubjectService;
- private final ICourseHandoutsService iCourseHandoutsService;
- /**
- * 查询课程目录结构列表
- */
- @ApiOperation("查询课程目录结构列表")
- @GetMapping("/menuList")
- public TableDataInfo<CourseUserMenuVo> menuList(CourseMenuQueryBo bo) {
- startPage();
- List<CourseUserMenuVo> list = iCourseMenuService.menuList(bo);
- return getDataTable(list);
- }
- @ApiOperation("查询模块与章关系列表")
- @GetMapping("/chapterList/{id}")
- public AjaxResult<List<CourseModuleChapterVo>> chapterList(@PathVariable("id" ) Long id) {
- List<CourseModuleChapterVo> list = iCourseModuleChapterService.getListById(id);
- return AjaxResult.success(list);
- }
- /**
- * 查询章与节关系列表
- */
- @ApiOperation("查询章与节关系列表+章卷同级展示(不带用户信息)")
- @GetMapping("/sectionList/{id}")
- public AjaxResult<List<CourseChapterSectionVo>> sectionList(@PathVariable("id" ) Long id) {
- List<CourseChapterSectionVo> list = iCourseChapterSectionService.getListById(id);
- return AjaxResult.success(list);
- }
- /**
- * 查询商品课程双师资绑定列表
- */
- @ApiOperation("查询商品课程双师资绑定列表")
- @PreAuthorize("@ss.hasPermi('system:teacher:list')")
- @GetMapping("/teacher/list")
- public AjaxResult<List<GoodsCourseTeacherVo>> list(GoodsCourseTeacherQueryBo bo) {
- bo.setStatus(1);
- List<GoodsCourseTeacherVo> list = iGoodsCourseTeacherService.queryList(bo);
- return AjaxResult.success(list);
- }
- /**
- * 查询科目列表
- */
- @ApiOperation("查询科目列表")
- @GetMapping("/subjectList")
- public AjaxResult<List<CourseSubjectVo>> getSubjectList(CourseSubjectQueryBo bo) {
- bo.setStatus(new ArrayList<Integer>(Arrays.asList(1)));
- List<CourseSubjectVo> list = iCourseSubjectService.queryList(bo);
- return AjaxResult.success(list);
- }
- /**
- * 获取讲义列详细信息
- */
- @ApiOperation("获取讲义列详细信息去地址")
- @GetMapping("/handouts/file/detail")
- public AjaxResult<CourseHandoutsVo> getInfo(CourseHandoutsFileQueryBo queryBo) {
- CourseHandoutsVo detail = iCourseHandoutsService.queryByIdNoUrl(queryBo);
- return AjaxResult.success(detail);
- }
- }
|