|
@@ -207,9 +207,11 @@ public class TableFieldInfo implements Constants {
|
|
|
JdbcType jdbcType = tableField.jdbcType();
|
|
|
final Class<? extends TypeHandler> typeHandler = tableField.typeHandler();
|
|
|
final String numericScale = tableField.numericScale();
|
|
|
+ boolean needAs = false;
|
|
|
String el = this.property;
|
|
|
if (StringUtils.isNotBlank(tableField.property())) {
|
|
|
el = tableField.property();
|
|
|
+ needAs = true;
|
|
|
}
|
|
|
if (JdbcType.UNDEFINED != jdbcType) {
|
|
|
this.jdbcType = jdbcType;
|
|
@@ -262,7 +264,10 @@ public class TableFieldInfo implements Constants {
|
|
|
|
|
|
this.column = column;
|
|
|
this.sqlSelect = column;
|
|
|
- if (tableInfo.getResultMap() == null && !tableInfo.isAutoInitResultMap() &&
|
|
|
+ if (needAs) {
|
|
|
+ // 存在指定转换属性
|
|
|
+ this.sqlSelect += String.format("%s\"%s\"", AS, tableField.property());
|
|
|
+ } else if (tableInfo.getResultMap() == null && !tableInfo.isAutoInitResultMap() &&
|
|
|
TableInfoHelper.checkRelated(tableInfo.isUnderCamel(), this.property, this.column)) {
|
|
|
/* 未设置 resultMap 也未开启自动构建 resultMap, 字段规则又不符合 mybatis 的自动封装规则 */
|
|
|
String propertyFormat = dbConfig.getPropertyFormat();
|