From 3b4f1d7937bcf6df7d93ecd8dd8898b9bfe4cb2a Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 28 Sep 2022 21:15:45 +0800
Subject: [PATCH] 优化代码生成同步后字典值NULL问题
---
ruoyi-ui/src/views/tool/gen/editTable.vue | 10 +++++-----
ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml | 26 +++++++++++++-------------
2 files changed, 18 insertions(+), 18 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 8356546..9271ea6 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
@@ -92,19 +92,19 @@
<update id="updateGenTableColumn" parameterType="GenTableColumn">
update gen_table_column
<set>
- column_comment = #{columnComment},
- java_type = #{javaType},
- java_field = #{javaField},
- is_insert = #{isInsert},
- is_edit = #{isEdit},
- is_list = #{isList},
- is_query = #{isQuery},
- is_required = #{isRequired},
- query_type = #{queryType},
- html_type = #{htmlType},
- dict_type = #{dictType},
- sort = #{sort},
- update_by = #{updateBy},
+ <if test="columnComment != null">column_comment = #{columnComment},</if>
+ <if test="javaType != null">java_type = #{javaType},</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>
+ <if test="isList != null">is_list = #{isList},</if>
+ <if test="isQuery != null">is_query = #{isQuery},</if>
+ <if test="isRequired != null">is_required = #{isRequired},</if>
+ <if test="queryType != null">query_type = #{queryType},</if>
+ <if test="htmlType != null">html_type = #{htmlType},</if>
+ <if test="dictType != null">dict_type = #{dictType},</if>
+ <if test="sort != null">sort = #{sort},</if>
+ <if test="updateBy != null">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where column_id = #{columnId}
diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/gen/editTable.vue
index 1e2b8da..709e39e 100644
--- a/ruoyi-ui/src/views/tool/gen/editTable.vue
+++ b/ruoyi-ui/src/views/tool/gen/editTable.vue
@@ -45,22 +45,22 @@
<el-table-column label="插入" min-width="5%">
<template slot-scope="scope">
- <el-checkbox true-label="1" v-model="scope.row.isInsert"></el-checkbox>
+ <el-checkbox true-label="1" false-label="0" v-model="scope.row.isInsert"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="编辑" min-width="5%">
<template slot-scope="scope">
- <el-checkbox true-label="1" v-model="scope.row.isEdit"></el-checkbox>
+ <el-checkbox true-label="1" false-label="0" v-model="scope.row.isEdit"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="列表" min-width="5%">
<template slot-scope="scope">
- <el-checkbox true-label="1" v-model="scope.row.isList"></el-checkbox>
+ <el-checkbox true-label="1" false-label="0" v-model="scope.row.isList"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="查询" min-width="5%">
<template slot-scope="scope">
- <el-checkbox true-label="1" v-model="scope.row.isQuery"></el-checkbox>
+ <el-checkbox true-label="1" false-label="0" v-model="scope.row.isQuery"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="查询方式" min-width="10%">
@@ -79,7 +79,7 @@
</el-table-column>
<el-table-column label="必填" min-width="5%">
<template slot-scope="scope">
- <el-checkbox true-label="1" v-model="scope.row.isRequired"></el-checkbox>
+ <el-checkbox true-label="1" false-label="0" v-model="scope.row.isRequired"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="显示类型" min-width="12%">
--
Gitblit v1.9.3