From d7471cff04678b91271bdc566bcbddf2f4ab04b7 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: Fri, 04 Jul 2025 15:17:08 +0800
Subject: [PATCH] 修改
---
multi-system/src/main/resources/mapper/system/CatalogueMapper.xml | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml b/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml
index 5855d20..159678b 100644
--- a/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml
@@ -98,7 +98,16 @@
<if test="type!=null">
and type = #{type}
</if>
- ORDER BY create_time ASC
+ ORDER BY
+ CAST(SUBSTRING_INDEX(number, '.', 1) AS UNSIGNED) ASC,
+ CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(number, '.', 2), '.', -1) AS UNSIGNED) ASC, -- 第二级
+ CAST(
+ CASE
+ WHEN LENGTH(number) - LENGTH(REPLACE(number, '.', '')) >= 2
+ THEN SUBSTRING_INDEX(number, '.', -1)
+ ELSE '0'
+ END AS UNSIGNED
+ ) ASC
</select>
<select id="selectCatalogueDataList" resultType="com.gkhy.exam.system.domain.vo.CatalogueDataVo">
SELECT
--
Gitblit v1.9.2