From c1628ae5526ffae9cb12e70778cac8195c405382 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期一, 18 八月 2025 09:28:21 +0800
Subject: [PATCH] 新增功能
---
multi-system/src/main/resources/mapper/system/CatalogueMapper.xml | 23 ++++++++++++++++++++++-
1 files changed, 22 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 9b34e41..ea745dc 100644
--- a/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml
@@ -14,6 +14,17 @@
VALUES
( #{catalogueId},#{companyId}, #{name}, #{filePath},#{fileName}, #{type}, #{createBy}, #{createTime} )
</insert>
+ <insert id="insertCatalogue" useGeneratedKeys="true" keyProperty="id">
+ INSERT INTO `catalogue` ( `parent_id`, `number`, `mess`, `type`,`company_id` )
+ VALUES
+ (
+ #{parentId},
+ #{number},
+ #{mess},
+ #{type},
+ #{companyId}
+ )
+ </insert>
<update id="updateCatalogueData">
UPDATE `catalogue_data`
@@ -86,11 +97,13 @@
<select id="selectCatalogueList" resultType="com.gkhy.exam.system.domain.vo.CatalogueVo">
SELECT
`id`,
+ company_id,
`parent_id`,
`number`,
`mess`,
`type`,
`del_flag`,
+ `sort`,
`create_by`,
`create_time`,
`update_by`,
@@ -98,9 +111,12 @@
FROM
catalogue
WHERE del_flag = 1
- <if test="type!=null">
+ <if test="type!=null and type!=''">
and type = #{type}
</if>
+ <if test="companyId!=null and companyId!=''">
+ and company_id = #{companyId}
+ </if>
ORDER BY
CAST(SUBSTRING_INDEX(number, '.', 1) AS UNSIGNED) ASC,
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(number, '.', 2), '.', -1) AS UNSIGNED) ASC, -- 第二级
@@ -111,6 +127,11 @@
ELSE '0'
END AS UNSIGNED
) ASC
+ <if test="type!=1 and type!=null">
+ ,sort asc
+ </if>
+ ,create_time asc
+
</select>
<select id="selectCatalogueDataList" resultType="com.gkhy.exam.system.domain.vo.CatalogueDataVo">
SELECT
--
Gitblit v1.9.2