From d7471cff04678b91271bdc566bcbddf2f4ab04b7 Mon Sep 17 00:00:00 2001 From: “djh” <“3298565835@qq.com”> Date: 星期五, 04 七月 2025 15:17:08 +0800 Subject: [PATCH] 修改 --- multi-system/src/main/resources/mapper/system/CatalogueMapper.xml | 42 +++++++++++++++++++++++++++++++++++------- 1 files changed, 35 insertions(+), 7 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..159678b 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"> @@ -93,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 @@ -141,7 +155,6 @@ SELECT `id`, `company_id`, - name, `catalogue_id`, `content`, `analysis`, @@ -152,7 +165,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