ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java
@@ -143,6 +143,7 @@
                                .set(cenTableColumn.getIsEdit() == null, GenTableColumn::getIsEdit, null)
                                .set(cenTableColumn.getIsList() == null, GenTableColumn::getIsList, null)
                                .set(cenTableColumn.getIsQuery() == null, GenTableColumn::getIsQuery, null)
                        .set(cenTableColumn.getIsRequired() == null, GenTableColumn::getIsRequired, null)
                                .eq(GenTableColumn::getColumnId,cenTableColumn.getColumnId()));
            }
        }
@@ -262,12 +263,8 @@
                StringWriter sw = new StringWriter();
                Template tpl = Velocity.getTemplate(template, Constants.UTF8);
                tpl.merge(context, sw);
                try {
                    String path = getGenPath(table, template);
                    FileUtils.writeStringToFile(new File(path), sw.toString(), Constants.UTF8);
                } catch (IOException e) {
                    throw new CustomException("渲染模板失败,表名:" + table.getTableName());
                }
                String path = getGenPath(table, template);
                FileUtils.writeUtf8String(sw.toString(), path);
            }
        }
    }
@@ -458,4 +455,4 @@
        }
        return genPath + File.separator + VelocityUtils.getFileName(template, table);
    }
}
}