소스 검색

fix 游客题库接口

he2802 4 년 전
부모
커밋
1f72d01f63

+ 1 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/goods/GoodsController.java

@@ -143,7 +143,7 @@ public class GoodsController extends BaseController {
     /**
      * 查询题目业务层次关系列表
      */
-    @ApiOperation("查询商品题库列表")
+    @ApiOperation("查询题库商品试卷列表")
     @PreAuthorize("@ss.hasPermi('system:business:list')")
     @GetMapping("/bank/list")
     public AjaxResult<List<GoodsAttachedVo>> bankList(GoodsAttachedQueryBo bo) {

+ 102 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/cmmon/CommonBankController.java

@@ -0,0 +1,102 @@
+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.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.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.CourseUserChapterSectionVo;
+import com.zhongzheng.modules.course.vo.CourseUserMenuVo;
+import com.zhongzheng.modules.course.vo.CourseUserModuleChapterVo;
+import com.zhongzheng.modules.course.vo.CourseUserVo;
+import com.zhongzheng.modules.goods.bo.GoodsAttachedQueryBo;
+import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
+import com.zhongzheng.modules.goods.vo.GoodsAttachedVo;
+import com.zhongzheng.modules.goods.vo.GoodsUserVo;
+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.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 课程Controller
+ *
+ * @author hjl
+ * @date 2021-10-09
+ */
+@Api(value = "游客题库访问接口", tags = {"游客题库访问接口"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/app/common/bank/")
+public class CommonBankController extends BaseController {
+
+    private final IGoodsAttachedService iGoodsAttachedService;
+
+    private final IQuestionModuleChapterService iQuestionModuleChapterService;
+
+    private final IQuestionChapterExamService iQuestionChapterExamService;
+
+    private final IExamQuestionService iExamQuestionService;
+
+
+
+    /**
+     * 查询题目业务层次关系列表
+     */
+    @ApiOperation("查询题库商品试卷列表")
+    @GetMapping("/list")
+    public AjaxResult<List<GoodsAttachedVo>> bankList(GoodsAttachedQueryBo bo) {
+        List<GoodsAttachedVo> list = iGoodsAttachedService.selectList(bo);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 查询关联章卷列表
+     */
+    @ApiOperation("查询模块卷关联章卷列表")
+    @GetMapping("/chapter/list")
+    public AjaxResult<List<QuestionChapterVo>> chapterList(QuestionModuleChapterQueryBo bo) {
+        List<QuestionChapterVo> list = iQuestionModuleChapterService.getList(bo);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 查询关联试卷列表
+     */
+    @ApiOperation("查询章卷关联试卷列表")
+    @GetMapping("/exam/list")
+    public AjaxResult<List<ExamVo>> examList(QuestionChapterExamQueryBo bo) {
+        List<ExamVo> list = iQuestionChapterExamService.getList(bo);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 查询题目业务层次关系列表
+     */
+    @ApiOperation("查询试卷题目列表")
+    @GetMapping("/question/list")
+    public AjaxResult<List<ExamQuestionVo>> questionList(ExamQuestionQueryBo bo) {
+        List<ExamQuestionVo> list = iExamQuestionService.getList(bo);
+        return AjaxResult.success(list);
+    }
+}

+ 8 - 1
zhongzheng-api/src/main/java/com/zhongzheng/controller/cmmon/CommonController.java

@@ -15,12 +15,16 @@ import com.zhongzheng.modules.course.vo.CourseUserChapterSectionVo;
 import com.zhongzheng.modules.course.vo.CourseUserMenuVo;
 import com.zhongzheng.modules.course.vo.CourseUserModuleChapterVo;
 import com.zhongzheng.modules.course.vo.CourseUserVo;
+import com.zhongzheng.modules.goods.bo.GoodsAttachedQueryBo;
+import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
+import com.zhongzheng.modules.goods.vo.GoodsAttachedVo;
 import com.zhongzheng.modules.goods.vo.GoodsUserVo;
 import com.zhongzheng.modules.user.entity.ClientLoginUser;
 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.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -33,7 +37,7 @@ import java.util.List;
  * @author hjl
  * @date 2021-10-09
  */
-@Api(value = "课程控制器", tags = {"课程管理"})
+@Api(value = "游客访问接口", tags = {"游客访问接口"})
 @RequiredArgsConstructor(onConstructor_ = @Autowired)
 @RestController
 @RequestMapping("/app/common/")
@@ -44,6 +48,7 @@ public class CommonController extends BaseController {
     private final ICourseModuleChapterService iCourseModuleChapterService;
     private final ICourseMenuService iCourseMenuService;
     private final ICourseChapterSectionService iCourseChapterSectionService;
+    private final IGoodsAttachedService iGoodsAttachedService;
 
     /**
      * 查询课程列表
@@ -95,4 +100,6 @@ public class CommonController extends BaseController {
         List<CourseUserChapterSectionVo> list = iCourseChapterSectionService.sectionList(bo);
         return AjaxResult.success(list);
     }
+
+
 }