From 3cc8d1cc3662d88fe7f3666fb1f99e1b19411424 Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期一, 14 七月 2025 16:59:58 +0800 Subject: [PATCH] 新功能加问题修复 --- multi-system/src/main/resources/mapper/system/CatalogueMapper.xml | 20 +++++++++++++++++++- 1 files changed, 19 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 b502a74..da41167 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` @@ -79,10 +90,14 @@ <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> + <delete id="deleteByCatalogueDataFileId"> + DELETE FROM catalogue_data_file WHERE id = #{id} + </delete> <select id="selectCatalogueList" resultType="com.gkhy.exam.system.domain.vo.CatalogueVo"> SELECT `id`, + company_id, `parent_id`, `number`, `mess`, @@ -95,9 +110,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, -- 第二级 -- Gitblit v1.9.2