From f99d902db3c31e57229439962abd2746bb06868d Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期三, 02 七月 2025 16:33:23 +0800
Subject: [PATCH] 新增

---
 multi-system/src/main/resources/mapper/system/CatalogueMapper.xml |   31 +++++++++++++++++++++++++------
 1 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml b/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml
index 170cccb..5855d20 100644
--- a/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml
@@ -17,7 +17,7 @@
 
     <update id="updateCatalogueData">
         UPDATE `catalogue_data`
-        SET
+        <set>
             <if test="companyId!=null">
                 `company_id` = #{companyId},
             </if>
@@ -27,24 +27,25 @@
             <if test="content!=null and content!=''">
                 `content` = #{content},
             </if>
-            <if test="analysic!=null and analysic!=''">
+            <if test="analysis!=null and analysis!=''">
                 `analysis` = #{analysis},
             </if>
             <if test="delFlag!=null and delFlag!=''">
                 `del_flag` = #{delFlag},
             </if>
-            <if test="updateBy!=null and update!=''">
+            <if test="updateBy!=null and updateBy!=''">
                 `update_by` = #{updateBy},
             </if>
             <if test="updateTime!=null">
                 `update_time` = #{updateTime}
             </if>
+        </set>
         WHERE
             `id` = #{id}
     </update>
     <update id="updateCatalogueDataFile">
             UPDATE `catalogue_data_file`
-                set
+            <set>
                 <if test="catalogueId!=null">
                     `catalogue_id` = #{catalogueId},
                 </if>
@@ -72,7 +73,11 @@
                 <if test="updateTime != null" >
                     update_time = #{updateTime}
                 </if>
+            </set>
             where id = #{id}
+    </update>
+    <update id="updateCatalogueDataFileByCompanyId">
+        UPDATE catalogue_data_file set del_flag = #{delFlag} ,update_by = #{updateBy} , update_time=#{updateTime} where company_id =#{companyId} and catalogue_id = #{catalogueId}
     </update>
 
     <select id="selectCatalogueList" resultType="com.gkhy.exam.system.domain.vo.CatalogueVo">
@@ -141,7 +146,6 @@
         SELECT
             `id`,
             `company_id`,
-            name,
             `catalogue_id`,
             `content`,
             `analysis`,
@@ -152,7 +156,22 @@
             `update_time`
         FROM
             catalogue_data
-        where company_id = #{companyId} and del_flag = 1
+        where company_id = #{companyId} and del_flag = 1 and catalogue_id = #{catalogueId}
 
     </select>
+    <select id="selectCatalogueDataById" resultType="com.gkhy.exam.system.domain.CatalogueData">
+        SELECT
+            `id`,
+            `company_id`,
+            `catalogue_id`,
+            `content`,
+            `analysis`,
+            `del_flag`,
+            `create_by`,
+            `create_time`,
+            `update_by`,
+            `update_time`
+        FROM
+            catalogue_data where del_flag = 1 and id=#{catalogueDataId}
+    </select>
 </mapper>

--
Gitblit v1.9.2