From 377dc71417995755076292b2985fca5e0a54aa08 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Thu, 16 Apr 2026 14:25:38 +0800
Subject: [PATCH] 优化代码生成同步操作column_type没更新问题
---
ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml
index 7375f5f..9213745 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml
@@ -69,7 +69,7 @@
)values(
<if test="tableId != null and tableId != ''">#{tableId},</if>
<if test="columnName != null and columnName != ''">#{columnName},</if>
- <if test="columnComment != null and columnComment != ''">(select SUBSTRING_INDEX(#{columnComment}, ' ', 1)),</if>
+ <if test="columnComment != null and columnComment != ''">#{columnComment},</if>
<if test="columnType != null and columnType != ''">#{columnType},</if>
<if test="javaType != null and javaType != ''">#{javaType},</if>
<if test="javaField != null and javaField != ''">#{javaField},</if>
@@ -92,8 +92,9 @@
<update id="updateGenTableColumn" parameterType="GenTableColumn">
update gen_table_column
<set>
- <if test="columnComment != null">column_comment = (select SUBSTRING_INDEX(#{columnComment}, ' ', 1)),</if>
+ <if test="columnComment != null">column_comment = #{columnComment},</if>
<if test="javaType != null">java_type = #{javaType},</if>
+ <if test="columnType != null">column_type = #{columnType},</if>
<if test="javaField != null">java_field = #{javaField},</if>
<if test="isInsert != null">is_insert = #{isInsert},</if>
<if test="isEdit != null">is_edit = #{isEdit},</if>
--
Gitblit v1.9.3