|
|
@@ -0,0 +1,61 @@
|
|
|
+package com.zhongzheng.controller.bank;
|
|
|
+
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
+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.QuestionBankAddBo;
|
|
|
+import com.zhongzheng.modules.bank.bo.QuestionBankEditBo;
|
|
|
+import com.zhongzheng.modules.bank.bo.QuestionBankQueryBo;
|
|
|
+import com.zhongzheng.modules.bank.service.IQuestionBankService;
|
|
|
+import com.zhongzheng.modules.bank.vo.QuestionBankVo;
|
|
|
+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.validation.annotation.Validated;
|
|
|
+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")
|
|
|
+public class QuestionBankController extends BaseController {
|
|
|
+
|
|
|
+ private final IQuestionBankService iQuestionBankService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询题库列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询题库列表")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo<QuestionBankVo> list(QuestionBankQueryBo bo) {
|
|
|
+ startPage();
|
|
|
+ List<QuestionBankVo> list = iQuestionBankService.selectBankList(bo);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取题库详细信息
|
|
|
+ */
|
|
|
+ @ApiOperation("获取题库详细信息")
|
|
|
+ @GetMapping("/{bankId}")
|
|
|
+ public AjaxResult<QuestionBankVo> getInfo(@PathVariable("bankId" ) Long bankId) {
|
|
|
+ return AjaxResult.success(iQuestionBankService.queryById(bankId));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|