教学楼排序调整

This commit is contained in:
2026-09-16 09:27:17 +08:00
parent b30e39f91a
commit 8c992183e3
2 changed files with 4 additions and 3 deletions
@@ -36,11 +36,11 @@
AND DEL_FLAG = #{jxlb.delFlag}
</if>
</where>
ORDER BY 序号
ORDER BY CASE WHEN REGEXP_LIKE(序号, '^[0-9]+$') THEN CAST(序号 AS INT) END NULLS LAST, 序号
</select>
<select id="selectMaxXh" resultType="java.lang.String">
SELECT MAX(序号) FROM 教学楼表 WHERE DEL_FLAG = 0
SELECT MAX(CAST(序号 AS INT)) FROM 教学楼表 WHERE DEL_FLAG = 0 AND REGEXP_LIKE(序号, '^[0-9]+$')
</select>
</mapper>