mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-06 08:38:26 +08:00
fix: 修正tableDefPackage生成的实体引用路径错误
This commit is contained in:
parent
a446357b65
commit
515e08da4b
@ -192,7 +192,7 @@ public class MybatisFlexProcessor extends AbstractProcessor {
|
||||
// 标记 entity 类,如果没有配置 Tables 生成位置,以 entity 位置为准
|
||||
entityClassReference = entityClass;
|
||||
// 构建 Tables 常量属性及其导包
|
||||
ContentBuilder.buildTablesField(importBuilder, fieldBuilder, tableInfo, tableDefClassSuffix, tableDefPropertiesNameStyle, tableDefInstanceSuffix);
|
||||
ContentBuilder.buildTablesField(importBuilder, fieldBuilder, tableInfo, tableDefClassSuffix, tableDefPropertiesNameStyle, tableDefInstanceSuffix, realTableDefPackage);
|
||||
}
|
||||
|
||||
// 是否生成 Mapper 文件
|
||||
|
||||
@ -168,8 +168,7 @@ public class ContentBuilder {
|
||||
* 构建 Tables 文件常量属性。
|
||||
*/
|
||||
public static void buildTablesField(StringBuilder importBuilder, StringBuilder fieldBuilder, TableInfo tableInfo,
|
||||
String tableDefClassSuffix, String tableDefPropertiesNameStyle, String tableDefInstanceSuffix) {
|
||||
String tableDefPackage = StrUtil.buildTableDefPackage(tableInfo.getEntityName());
|
||||
String tableDefClassSuffix, String tableDefPropertiesNameStyle, String tableDefInstanceSuffix, String tableDefPackage) {
|
||||
String tableDefClassName = tableInfo.getEntitySimpleName().concat(tableDefClassSuffix);
|
||||
importBuilder.append("import ").append(tableDefPackage).append('.').append(tableDefClassName).append(";\n");
|
||||
String entityComment = tableInfo.getEntityComment();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user