|
@@ -19,6 +19,7 @@ import com.baomidou.mybatisplus.annotation.*;
|
|
import com.baomidou.mybatisplus.core.MybatisConfiguration;
|
|
import com.baomidou.mybatisplus.core.MybatisConfiguration;
|
|
import com.baomidou.mybatisplus.core.config.GlobalConfig;
|
|
import com.baomidou.mybatisplus.core.config.GlobalConfig;
|
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ReflectionKit;
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.sql.SqlScriptUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.sql.SqlScriptUtils;
|
|
import lombok.AccessLevel;
|
|
import lombok.AccessLevel;
|
|
@@ -148,8 +149,9 @@ public class TableFieldInfo implements Constants {
|
|
this.fieldFill = tableField.fill();
|
|
this.fieldFill = tableField.fill();
|
|
this.update = tableField.update();
|
|
this.update = tableField.update();
|
|
JdbcType jdbcType = tableField.jdbcType();
|
|
JdbcType jdbcType = tableField.jdbcType();
|
|
- Class<? extends TypeHandler<?>> typeHandler = tableField.typeHandler();
|
|
|
|
- String numericScale = tableField.numericScale();
|
|
|
|
|
|
+ final Class<? extends TypeHandler<?>> typeHandler = tableField.typeHandler();
|
|
|
|
+ final String handlerStr = tableField.typeHandlerStr();
|
|
|
|
+ final String numericScale = tableField.numericScale();
|
|
String el = this.property;
|
|
String el = this.property;
|
|
if (JdbcType.UNDEFINED != jdbcType) {
|
|
if (JdbcType.UNDEFINED != jdbcType) {
|
|
this.jdbcType = jdbcType;
|
|
this.jdbcType = jdbcType;
|
|
@@ -158,6 +160,9 @@ public class TableFieldInfo implements Constants {
|
|
if (UnknownTypeHandler.class != typeHandler) {
|
|
if (UnknownTypeHandler.class != typeHandler) {
|
|
this.typeHandler = typeHandler;
|
|
this.typeHandler = typeHandler;
|
|
el += (COMMA + "typeHandler=" + typeHandler.getName());
|
|
el += (COMMA + "typeHandler=" + typeHandler.getName());
|
|
|
|
+ } else if (StringUtils.isNotEmpty(handlerStr)) {
|
|
|
|
+ this.typeHandler = ReflectionKit.getClass(handlerStr);
|
|
|
|
+ el += (COMMA + "typeHandler=" + this.typeHandler.getName());
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(numericScale)) {
|
|
if (StringUtils.isNotEmpty(numericScale)) {
|
|
el += (COMMA + "numericScale=" + numericScale);
|
|
el += (COMMA + "numericScale=" + numericScale);
|