瀏覽代碼

科目sort相同的按id稳定顺序

mingfu 1 周之前
父節點
當前提交
a99319f8eb
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ie-system/src/main/resources/mapper/dz/DzSubjectMapper.xml

+ 1 - 1
ie-system/src/main/resources/mapper/dz/DzSubjectMapper.xml

@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="locations != null  and locations != ''"> and locations = #{locations}</if>
             <if test="examTypes != null  and examTypes != ''"> and exam_types  like concat('%', #{examTypes}, '%') </if>
         </where>
-        order by `sort`
+        order by `sort`, subject_id
     </select>
 
     <select id="selectDzSubjectBySubjectId" parameterType="Long" resultMap="DzSubjectResult">