he2802 4 роки тому
батько
коміт
814e0175d5

+ 61 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/bank/QuestionBankChapterController.java

@@ -0,0 +1,61 @@
+package com.zhongzheng.controller.bank;
+
+import com.zhongzheng.common.annotation.Log;
+import com.zhongzheng.common.core.controller.BaseController;
+import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.core.page.TableDataInfo;
+import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.modules.bank.bo.QuestionBankChapterAddBo;
+import com.zhongzheng.modules.bank.bo.QuestionBankChapterEditBo;
+import com.zhongzheng.modules.bank.bo.QuestionBankChapterQueryBo;
+import com.zhongzheng.modules.bank.service.IQuestionBankChapterService;
+import com.zhongzheng.modules.bank.vo.QuestionBankChapterVo;
+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.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 题库大章Controller
+ *
+ * @author hjl
+ * @date 2021-05-20
+ */
+@Api(value = "题库大章控制器", tags = {"题库大章管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/app/common/bank/chapter")
+public class QuestionBankChapterController extends BaseController {
+
+    private final IQuestionBankChapterService iQuestionBankChapterService;
+
+    /**
+     * 查询题库大章列表
+     */
+    @ApiOperation("查询题库大章列表")
+    @GetMapping("/list")
+    public TableDataInfo<QuestionBankChapterVo> list(QuestionBankChapterQueryBo bo) {
+        startPage();
+        List<QuestionBankChapterVo> list = iQuestionBankChapterService.queryList(bo);
+        return getDataTable(list);
+    }
+
+
+
+    /**
+     * 获取题库大章详细信息
+     */
+    @ApiOperation("获取题库大章详细信息")
+    @PreAuthorize("@ss.hasPermi('bank:chapter:query')")
+    @GetMapping("/{bankChapterId}")
+    public AjaxResult<QuestionBankChapterVo> getInfo(@PathVariable("bankChapterId" ) Long bankChapterId) {
+        return AjaxResult.success(iQuestionBankChapterService.queryById(bankChapterId));
+    }
+
+
+}

+ 60 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/bank/QuestionBankSectionController.java

@@ -0,0 +1,60 @@
+package com.zhongzheng.controller.bank;
+
+import com.zhongzheng.common.annotation.Log;
+import com.zhongzheng.common.core.controller.BaseController;
+import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.core.page.TableDataInfo;
+import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.modules.bank.bo.QuestionBankSectionAddBo;
+import com.zhongzheng.modules.bank.bo.QuestionBankSectionEditBo;
+import com.zhongzheng.modules.bank.bo.QuestionBankSectionQueryBo;
+import com.zhongzheng.modules.bank.service.IQuestionBankSectionService;
+import com.zhongzheng.modules.bank.vo.QuestionBankSectionVo;
+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.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 题库小节Controller
+ *
+ * @author hjl
+ * @date 2021-05-20
+ */
+@Api(value = "题库小节控制器", tags = {"题库小节管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/bank/section")
+public class QuestionBankSectionController extends BaseController {
+
+    private final IQuestionBankSectionService iQuestionBankSectionService;
+
+    /**
+     * 查询题库小节列表
+     */
+    @ApiOperation("查询题库小节列表")
+    @GetMapping("/list")
+    public TableDataInfo<QuestionBankSectionVo> list(QuestionBankSectionQueryBo bo) {
+        startPage();
+        List<QuestionBankSectionVo> list = iQuestionBankSectionService.selectBankSectionList(bo);
+        return getDataTable(list);
+    }
+
+
+
+    /**
+     * 获取题库小节详细信息
+     */
+    @ApiOperation("获取题库小节详细信息")
+    @GetMapping("/{bankSectionId}")
+    public AjaxResult<QuestionBankSectionVo> getInfo(@PathVariable("bankSectionId" ) Long bankSectionId) {
+        return AjaxResult.success(iQuestionBankSectionService.queryById(bankSectionId));
+    }
+
+  
+}