Explorar o código

优化代码生成同步后字典值NULL问题

RuoYi %!s(int64=3) %!d(string=hai) anos
pai
achega
3b4f1d7937

+ 13 - 13
ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml

@@ -92,19 +92,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
92
     <update id="updateGenTableColumn" parameterType="GenTableColumn">
92
     <update id="updateGenTableColumn" parameterType="GenTableColumn">
93
         update gen_table_column
93
         update gen_table_column
94
         <set>
94
         <set>
95
-            column_comment = #{columnComment},
96
-            java_type = #{javaType},
97
-            java_field = #{javaField},
98
-            is_insert = #{isInsert},
99
-            is_edit = #{isEdit},
100
-            is_list = #{isList},
101
-            is_query = #{isQuery},
102
-            is_required = #{isRequired},
103
-            query_type = #{queryType},
104
-            html_type = #{htmlType},
105
-            dict_type = #{dictType},
106
-            sort = #{sort},
107
-            update_by = #{updateBy},
95
+            <if test="columnComment != null">column_comment = #{columnComment},</if>
96
+            <if test="javaType != null">java_type = #{javaType},</if>
97
+            <if test="javaField != null">java_field = #{javaField},</if>
98
+            <if test="isInsert != null">is_insert = #{isInsert},</if>
99
+            <if test="isEdit != null">is_edit = #{isEdit},</if>
100
+            <if test="isList != null">is_list = #{isList},</if>
101
+            <if test="isQuery != null">is_query = #{isQuery},</if>
102
+            <if test="isRequired != null">is_required = #{isRequired},</if>
103
+            <if test="queryType != null">query_type = #{queryType},</if>
104
+            <if test="htmlType != null">html_type = #{htmlType},</if>
105
+            <if test="dictType != null">dict_type = #{dictType},</if>
106
+            <if test="sort != null">sort = #{sort},</if>
107
+            <if test="updateBy != null">update_by = #{updateBy},</if>
108
             update_time = sysdate()
108
             update_time = sysdate()
109
         </set>
109
         </set>
110
         where column_id = #{columnId}
110
         where column_id = #{columnId}

+ 5 - 5
ruoyi-ui/src/views/tool/gen/editTable.vue

@@ -45,22 +45,22 @@
45
 
45
 
46
           <el-table-column label="插入" min-width="5%">
46
           <el-table-column label="插入" min-width="5%">
47
             <template slot-scope="scope">
47
             <template slot-scope="scope">
48
-              <el-checkbox true-label="1" v-model="scope.row.isInsert"></el-checkbox>
48
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isInsert"></el-checkbox>
49
             </template>
49
             </template>
50
           </el-table-column>
50
           </el-table-column>
51
           <el-table-column label="编辑" min-width="5%">
51
           <el-table-column label="编辑" min-width="5%">
52
             <template slot-scope="scope">
52
             <template slot-scope="scope">
53
-              <el-checkbox true-label="1" v-model="scope.row.isEdit"></el-checkbox>
53
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isEdit"></el-checkbox>
54
             </template>
54
             </template>
55
           </el-table-column>
55
           </el-table-column>
56
           <el-table-column label="列表" min-width="5%">
56
           <el-table-column label="列表" min-width="5%">
57
             <template slot-scope="scope">
57
             <template slot-scope="scope">
58
-              <el-checkbox true-label="1" v-model="scope.row.isList"></el-checkbox>
58
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isList"></el-checkbox>
59
             </template>
59
             </template>
60
           </el-table-column>
60
           </el-table-column>
61
           <el-table-column label="查询" min-width="5%">
61
           <el-table-column label="查询" min-width="5%">
62
             <template slot-scope="scope">
62
             <template slot-scope="scope">
63
-              <el-checkbox true-label="1" v-model="scope.row.isQuery"></el-checkbox>
63
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isQuery"></el-checkbox>
64
             </template>
64
             </template>
65
           </el-table-column>
65
           </el-table-column>
66
           <el-table-column label="查询方式" min-width="10%">
66
           <el-table-column label="查询方式" min-width="10%">
@@ -79,7 +79,7 @@
79
           </el-table-column>
79
           </el-table-column>
80
           <el-table-column label="必填" min-width="5%">
80
           <el-table-column label="必填" min-width="5%">
81
             <template slot-scope="scope">
81
             <template slot-scope="scope">
82
-              <el-checkbox true-label="1" v-model="scope.row.isRequired"></el-checkbox>
82
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isRequired"></el-checkbox>
83
             </template>
83
             </template>
84
           </el-table-column>
84
           </el-table-column>
85
           <el-table-column label="显示类型" min-width="12%">
85
           <el-table-column label="显示类型" min-width="12%">