From 3cc8d1cc3662d88fe7f3666fb1f99e1b19411424 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: Mon, 14 Jul 2025 16:59:58 +0800
Subject: [PATCH] 新功能加问题修复
---
multi-system/src/main/resources/mapper/system/CompanyIndustryTemplateMapper.xml | 33 ++++++++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)
diff --git a/multi-system/src/main/resources/mapper/system/CompanyIndustryTemplateMapper.xml b/multi-system/src/main/resources/mapper/system/CompanyIndustryTemplateMapper.xml
index cf772ec..5106e1c 100644
--- a/multi-system/src/main/resources/mapper/system/CompanyIndustryTemplateMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/CompanyIndustryTemplateMapper.xml
@@ -90,6 +90,37 @@
and ci.type like concat('%',#{type},'%')
</if>
ORDER BY
- ci.create_time DESC
+ CAST(SUBSTRING_INDEX(ci.chapter, '.', 1) AS UNSIGNED) ASC,
+ CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(ci.chapter, '.', 2), '.', -1) AS UNSIGNED) ASC, -- 第二级
+ CAST(
+ CASE
+ WHEN LENGTH(ci.chapter) - LENGTH(REPLACE(ci.chapter, '.', '')) >= 2
+ THEN SUBSTRING_INDEX(ci.chapter, '.', -1)
+ ELSE '0'
+ END AS UNSIGNED
+ ) ASC
+ </select>
+ <select id="selectCompanyIndustryTemplate"
+ resultType="com.gkhy.exam.system.domain.CompanyIndustryTemplate">
+ SELECT
+ `id`,
+ `company_id`,
+ `company_name`,
+ chapter,
+ `type`,
+ `template_name`,
+ `industry_type`,
+ `file_path`,
+ `file_name`,
+ `format`,
+ `del_flag`,
+ `create_by`,
+ `create_time`,
+ `update_by`,
+ `update_time`
+ FROM
+ company_industry_template
+ WHERE
+ del_flag = 0 and template_name = #{name}
</select>
</mapper>
--
Gitblit v1.9.2