|
@@ -0,0 +1,80 @@
|
|
|
+package com.zhongzheng.controller.goods;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Arrays;
|
|
|
+
|
|
|
+import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
+import com.zhongzheng.modules.goods.bo.GoodsQuestionRelExamAddBo;
|
|
|
+import com.zhongzheng.modules.goods.bo.GoodsQuestionRelExamEditBo;
|
|
|
+import com.zhongzheng.modules.goods.bo.GoodsQuestionRelExamQueryBo;
|
|
|
+import com.zhongzheng.modules.goods.service.IGoodsQuestionRelExamService;
|
|
|
+import com.zhongzheng.modules.goods.vo.GoodsQuestionRelExamVo;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.zhongzheng.common.annotation.Log;
|
|
|
+import com.zhongzheng.common.core.controller.BaseController;
|
|
|
+import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
+import com.zhongzheng.common.enums.BusinessType;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 三方题库试卷记录Controller
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ * @date 2023-08-14
|
|
|
+ */
|
|
|
+@Api(value = "三方题库试卷记录控制器", tags = {"三方题库试卷记录管理"})
|
|
|
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
+@RestController
|
|
|
+@RequestMapping("/goods/rel/exam")
|
|
|
+public class GoodsQuestionRelExamController extends BaseController {
|
|
|
+
|
|
|
+ private final IGoodsQuestionRelExamService iGoodsQuestionRelExamService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询三方题库试卷记录列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询三方题库试卷记录列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:exam:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo<GoodsQuestionRelExamVo> list(GoodsQuestionRelExamQueryBo bo) {
|
|
|
+ startPage();
|
|
|
+ List<GoodsQuestionRelExamVo> list = iGoodsQuestionRelExamService.queryList(bo);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取三方题库试卷记录详细信息
|
|
|
+ */
|
|
|
+ @ApiOperation("获取三方题库试卷记录详细信息")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:exam:query')")
|
|
|
+ @GetMapping("/{id}")
|
|
|
+ public AjaxResult<GoodsQuestionRelExamVo> getInfo(@PathVariable("id" ) Long id) {
|
|
|
+ return AjaxResult.success(iGoodsQuestionRelExamService.queryById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增三方题库试卷记录
|
|
|
+ */
|
|
|
+ @ApiOperation("新增三方题库试卷记录")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:exam:add')")
|
|
|
+ @Log(title = "三方题库试卷记录", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping()
|
|
|
+ public AjaxResult<Void> add(@RequestBody GoodsQuestionRelExamAddBo bo) {
|
|
|
+ return toAjax(iGoodsQuestionRelExamService.insertByAddBo(bo) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|