Explorar o código

fix 题库推荐

he2802 %!s(int64=4) %!d(string=hai) anos
pai
achega
b173fab016

+ 58 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/bank/QuestionBankExamController.java

@@ -0,0 +1,58 @@
+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.QuestionBankExamAddBo;
+import com.zhongzheng.modules.bank.bo.QuestionBankExamEditBo;
+import com.zhongzheng.modules.bank.bo.QuestionBankExamQueryBo;
+import com.zhongzheng.modules.bank.service.IQuestionBankExamService;
+import com.zhongzheng.modules.bank.vo.QuestionBankExamVo;
+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/exam")
+public class QuestionBankExamController extends BaseController {
+
+    private final IQuestionBankExamService iQuestionBankExamService;
+
+    /**
+     * 查询题库试卷列表
+     */
+    @ApiOperation("查询题库试卷列表")
+    @GetMapping("/list")
+    public TableDataInfo<QuestionBankExamVo> list(QuestionBankExamQueryBo bo) {
+        startPage();
+        List<QuestionBankExamVo> list = iQuestionBankExamService.selectBankExamList(bo);
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 获取题库试卷详细信息
+     */
+    @ApiOperation("获取题库试卷详细信息")
+    @GetMapping("/{examId}")
+    public AjaxResult<QuestionBankExamVo> getInfo(@PathVariable("examId" ) Long examId) {
+        return AjaxResult.success(iQuestionBankExamService.queryById(examId));
+    }
+
+}

+ 5 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.modules.collect.mapper.CollectCourseMapper;
 import com.zhongzheng.modules.user.bo.UserAddBo;
 import com.zhongzheng.modules.user.bo.UserEditBo;
 import com.zhongzheng.modules.user.bo.UserQueryBo;
@@ -33,6 +34,10 @@ import java.util.stream.Collectors;
 @Service
 public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
 
+    @Autowired
+    private CollectCourseMapper collectCourseMapper;
+
+
 
 
     @Override

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/QuestionBankQueryBo.java

@@ -24,6 +24,8 @@ import com.zhongzheng.common.core.domain.BaseEntity;
 @ApiModel("题库分页查询对象")
 public class QuestionBankQueryBo extends BaseEntity {
 
+	private Long bankId;
+
 	/** 分页大小 */
 	@ApiModelProperty("分页大小")
 	private Integer pageSize;