Merge branch 'master' into feature/user-register

This commit is contained in:
宋天 2021-11-26 21:26:21 +08:00
commit 3f412f26fc
3 changed files with 10 additions and 2 deletions

View File

@ -191,7 +191,7 @@ public class ToolCodegenEngine {
}
private static String javaFilePath(String path) {
return "java/${basePackage}/${table.moduleName}/" + path + ".java";
return "java/${basePackage}/modules/${table.moduleName}/" + path + ".java";
}
private static String vueTemplatePath(String path) {

View File

@ -64,10 +64,17 @@ public class ToolCodegenSQLParser {
private static ToolSchemaTableDO parseTable(SQLCreateTableStatement statement) {
return ToolSchemaTableDO.builder()
.tableName(statement.getTableSource().getTableName(true))
.tableComment(((SQLCharExpr) statement.getComment()).getText())
.tableComment(getCommentText(statement))
.build();
}
private static String getCommentText(SQLCreateTableStatement statement) {
if (statement == null || statement.getComment() == null) {
return "";
}
return ((SQLCharExpr) statement.getComment()).getText();
}
private static List<ToolSchemaColumnDO> parseColumns(SQLCreateTableStatement statement) {
List<ToolSchemaColumnDO> columns = new ArrayList<>();
statement.getTableElementList().forEach(element -> parseColumn(columns, element));

View File

@ -22,6 +22,7 @@
* 新增用户前台的昵称、头像的修改
* 修复通知和字典查询权限 Bug
* 修复代码生成器的 Java 类路径缺少 modules 目录的 Bug
TODO