Browse Source

题库修改字段

小么熊🐻 3 năm trước cách đây
mục cha
commit
940343f2b6

+ 21 - 19
twzd-service/src/main/java/com/miaxis/question/dto/QuestionInfoDTO.java

@@ -157,24 +157,26 @@ public class QuestionInfoDTO extends BaseBusinessEntity{
     @ApiModelProperty(value = "科目")
     private Integer subject;
 
-    /** 分类练习排序字段 */
-    @ApiModelProperty(value = "分类练习排序字段")
-    private Integer classSort;
-
-    /** 精选考题排序字段 */
-    @ApiModelProperty(value = "精选考题排序字段")
-    private Integer excellSort;
-
-
-    /** 顺序练习排序字段 */
-    @ApiModelProperty(value = "顺序练习排序字段")
-    private Integer sequeSort;
-
-
-    /** 地方专题排序字段 */
-    @ApiModelProperty(value = "地方专题排序字段")
-    private Integer placeSort;
-
-
+//    /** 分类练习排序字段 */
+//    @ApiModelProperty(value = "分类练习排序字段")
+//    private Integer classSort;
+//
+//    /** 精选考题排序字段 */
+//    @ApiModelProperty(value = "精选考题排序字段")
+//    private Integer excellSort;
+//
+//
+//    /** 顺序练习排序字段 */
+//    @ApiModelProperty(value = "顺序练习排序字段")
+//    private Integer sequeSort;
+//
+//
+//    /** 地方专题排序字段 */
+//    @ApiModelProperty(value = "地方专题排序字段")
+//    private Integer placeSort;
+
+    /** 排序字段 */
+    @ApiModelProperty(value = "分类练习:class_sort;精选考题:excell_sort;顺序练习:seque_sort;地方专题:place_sort;")
+    private String sort;
 
 }

+ 2 - 2
twzd-service/src/main/resources/mapper/qustion/QuestionInfoMapper.xml

@@ -88,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
 
         <if test="isRand!=null and isRand!=''"> order by rand() </if>
-
+        <if test="isRand==null or isRand==''"> order by ${sort}  </if>
     </select>
 
 
@@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="classIssueName != null  and classIssueName != ''"> and class_issue_name like concat('%', #{classIssueName}, '%')</if>
             <if test="questionType != null "> and question_type = #{questionType}</if>
         </where>
-        limit 0,5
+        limit 0,50
     </select>