瀏覽代碼

题库BUG查询

小么熊🐻 3 年之前
父節點
當前提交
7a6c116ea7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      twzd-service/src/main/resources/mapper/qustion/QuestionInfoMapper.xml

+ 1 - 1
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=='' and  sort!=null and sort!='' "> order by ${sort} </if>
+        <if test="isRand==null or isRand=='' and  sort!=null and sort!='' "> order by IFNULL(${sort},'a') </if>
     </select>