2 次代码提交 d8657871e9 ... 95267dff14

作者 SHA1 备注 提交日期
  闪电 95267dff14 Merge branch 'master' of http://39.164.159.226:3000/hnsh-smart-steward/smart-steward-api 6 天之前
  闪电 aa4347e826 mod: 考试相关 6 天之前

+ 1 - 0
smart-steward-api/src/main/java/com/smartSteward/web/controller/common/CommonController.java

@@ -95,6 +95,7 @@ public class CommonController
95 95
             map.put("fileName", fileName);
96 96
             map.put("newFileName", FileUtils.getName(fileName));
97 97
             map.put("originalFilename", file.getOriginalFilename());
98
+            map.put("url", minioUtil.getFileUrl(fileName));
98 99
             ajax.put("data", map);
99 100
             return ajax;
100 101
         }

+ 1 - 1
smart-steward-api/src/main/java/com/smartSteward/web/controller/exam/ExamQuestionCategoryController.java

@@ -42,7 +42,7 @@ public class ExamQuestionCategoryController extends BaseController
42 42
     @GetMapping("/list")
43 43
     public TableDataInfo list(ExamQuestionCategory examQuestionCategory)
44 44
     {
45
-        startPage();
45
+//        startPage();
46 46
         List<ExamQuestionCategory> list = examQuestionCategoryService.selectExamQuestionCategoryList(examQuestionCategory);
47 47
         return getDataTable(list);
48 48
     }

+ 1 - 0
smart-steward-api/src/main/java/com/smartSteward/web/controller/exam/ExamQuestionController.java

@@ -46,6 +46,7 @@ public class ExamQuestionController extends BaseController
46 46
     {
47 47
         startPage();
48 48
         List<ExamQuestion> list = examQuestionService.selectExamQuestionList(examQuestion);
49
+
49 50
         return getDataTable(list);
50 51
     }
51 52
 

+ 3 - 3
smart-steward-api/src/main/java/com/smartSteward/web/controller/knowledge/KnowledgeContentController.java

@@ -117,9 +117,9 @@ public class KnowledgeContentController extends BaseController
117 117
         }
118 118
 
119 119
         KnowledgeContent oldKnowledgeContent = knowledgeContentService.selectKnowledgeContentById(knowledgeContent.getId());
120
-        if (oldKnowledgeContent == null) {
121
-            return AjaxResult.error("内容不存在");
122
-        }
120
+//        if (oldKnowledgeContent == null) {
121
+//            return AjaxResult.error("内容不存在");
122
+//        }
123 123
 
124 124
 
125 125
         boolean isAdmin = knowledgeCategoryService.isAdmin(oldKnowledgeContent.getCategoryId(), getLoginUser());

+ 1 - 1
smart-steward-api/src/main/resources/application.yml

@@ -53,7 +53,7 @@ spring:
53 53
     basename: i18n/messages
54 54
   profiles:
55 55
     active: dev
56
-    #active: local
56
+#    active: local
57 57
     #active: production
58 58
   # 文件上传
59 59
   servlet:

+ 6 - 1
smart-steward-entity/src/main/java/com/smartSteward/entity/database/exam/ExamQuestion.java

@@ -32,6 +32,11 @@ public class ExamQuestion extends BaseEntity
32 32
    @NotNull(message = "所属题库分类ID不能为空")
33 33
    private Long categoryId;
34 34
 
35
+   /** 题库分类名称 */
36
+   @Excel(name = "题库分类名称")
37
+   @ApiModelProperty("题库分类名称")
38
+   private String categoryName;
39
+
35 40
    /** 试题类型(如:single_choice-单选题、multiple_choice-多选题、judgment-判断题、essay-简答题、fill_blank-填空题) */
36 41
    @Excel(name = "试题类型", readConverterExp = "如=:single_choice-单选题、multiple_choice-多选题、judgment-判断题、essay-简答题、fill_blank-填空题")
37 42
    @ApiModelProperty("试题类型")
@@ -72,7 +77,7 @@ public class ExamQuestion extends BaseEntity
72 77
    private String questionStatus;
73 78
 
74 79
    /** 难度等级(easy-简单、medium-中等、hard-困难) */
75
-   @Excel(name = "难度等级", readConverterExp = "e=asy-简单、medium-中等、hard-困难")
80
+   @Excel(name = "难度等级", readConverterExp = "easy-简单、medium-中等、hard-困难")
76 81
    @ApiModelProperty("难度等级")
77 82
    private String difficultyLevel;
78 83
 

+ 3 - 1
smart-steward-mapper/src/main/resources/mapper/exam/ExamQuestionMapper.xml

@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
7 7
     <resultMap type="ExamQuestion" id="ExamQuestionResult">
8 8
         <result property="id"    column="id"    />
9 9
         <result property="categoryId"    column="category_id"    />
10
+        <result property="categoryName"    column="category_name"    />
10 11
         <result property="questionType"    column="question_type"    />
11 12
         <result property="questionContent"    column="question_content"    />
12 13
         <result property="options"    column="options"    />
@@ -28,7 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
28 29
     </sql>
29 30
 
30 31
     <select id="selectExamQuestionList" parameterType="ExamQuestion" resultMap="ExamQuestionResult">
31
-        <include refid="selectExamQuestionVo"/>
32
+        select eq.*, eqc.name as category_name from exam_question as eq
33
+        left join exam_question_category as eqc on eq.category_id = eqc.id
32 34
         <where>
33 35
             <if test="categoryId != null "> and category_id = #{categoryId}</if>
34 36
             <if test="questionType != null  and questionType != ''"> and question_type = #{questionType}</if>