From 681ee2816cce98cc5520f980d2e01c587409545c Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期四, 20 二月 2025 11:07:51 +0800 Subject: [PATCH] 字典改为树结构 --- system/src/main/resources/mapper/system/SysDictDataMapper.xml | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/system/src/main/resources/mapper/system/SysDictDataMapper.xml b/system/src/main/resources/mapper/system/SysDictDataMapper.xml index 1bd884a..8cdd912 100644 --- a/system/src/main/resources/mapper/system/SysDictDataMapper.xml +++ b/system/src/main/resources/mapper/system/SysDictDataMapper.xml @@ -18,10 +18,11 @@ <result property="createTime" column="create_time" /> <result property="updateBy" column="update_by" /> <result property="updateTime" column="update_time" /> + <result property="parentId" column="parent_id" /> </resultMap> <sql id="selectDictDataVo"> - select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark + select dict_code, dict_sort,parent_id, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data </sql> @@ -75,6 +76,7 @@ update sys_dict_data <set> <if test="dictSort != null">dict_sort = #{dictSort},</if> + <if test="parentId != null">parent_id = #{parentId},</if> <if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if> <if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if> <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> @@ -96,6 +98,7 @@ <insert id="insertDictData" parameterType="SysDictData"> insert into sys_dict_data( <if test="dictSort != null">dict_sort,</if> + <if test="parentId != null">parent_id,</if> <if test="dictLabel != null and dictLabel != ''">dict_label,</if> <if test="dictValue != null and dictValue != ''">dict_value,</if> <if test="dictType != null and dictType != ''">dict_type,</if> @@ -108,6 +111,7 @@ create_time )values( <if test="dictSort != null">#{dictSort},</if> + <if test="parentId != null">#{parentId},</if> <if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if> <if test="dictValue != null and dictValue != ''">#{dictValue},</if> <if test="dictType != null and dictType != ''">#{dictType},</if> -- Gitblit v1.8.0