Skip to content

Commit

Permalink
生成修复设置实体父类 Class 未读包路径 BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
qmdx committed Feb 26, 2019
1 parent 164ef83 commit 4a1c122
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.List;
import java.util.stream.Collectors;

import com.baomidou.mybatisplus.core.toolkit.ClassUtils;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.TableInfoHelper;
Expand Down Expand Up @@ -264,7 +265,13 @@ public StrategyConfig setSuperEntityClass(Class<?> clazz, NamingStrategy columnN
if (null != columnNaming) {
this.columnNaming = columnNaming;
}
this.superEntityClass = clazz.getSimpleName();
String pkg = ClassUtils.getPackageName(clazz);
if (StringUtils.isNotEmpty(pkg)) {
pkg += "." + clazz.getSimpleName();
} else {
pkg = clazz.getSimpleName();
}
this.superEntityClass = pkg;
convertSuperEntityColumns(clazz);
return this;
}
Expand Down

0 comments on commit 4a1c122

Please sign in to comment.