mirror of
https://gitee.com/best_handsome/mybatis-plus-join
synced 2025-07-11 00:02:22 +08:00
优化对TypeHandle的支持
This commit is contained in:
parent
e3a9d4f94c
commit
56e1d28d49
@ -28,10 +28,7 @@ import org.apache.ibatis.type.TypeHandlerRegistry;
|
||||
import org.apache.ibatis.type.UnknownTypeHandler;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
@ -153,7 +150,9 @@ public class MPJInterceptor implements Interceptor {
|
||||
String currentNamespace = ms.getResource().split(StringPool.SPACE)[0];
|
||||
String id = currentNamespace + StringPool.DOT + Constants.MYBATIS_PLUS + StringPool.UNDERSCORE + resultType.getSimpleName();
|
||||
|
||||
if (!(obj instanceof MPJLambdaWrapper)) {
|
||||
if (!(obj instanceof MPJLambdaWrapper) || Map.class.isAssignableFrom(resultType) ||
|
||||
ReflectionKit.isPrimitiveOrWrapper(resultType) ||
|
||||
Collection.class.isAssignableFrom(resultType)) {
|
||||
return getDefaultResultMap(tableInfo, ms, resultType, id);
|
||||
}
|
||||
MPJLambdaWrapper wrapper = (MPJLambdaWrapper) obj;
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.github.yulichang.toolkit.UniqueObject;
|
||||
import com.github.yulichang.wrapper.enums.BaseFuncEnum;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@ -15,38 +15,38 @@ import java.util.Objects;
|
||||
* @author yulichang
|
||||
* @since 1.2.5
|
||||
*/
|
||||
@Data
|
||||
@Getter
|
||||
public class SelectColumn implements UniqueObject {
|
||||
|
||||
/**
|
||||
* 字段实体类
|
||||
*/
|
||||
private Class<?> clazz;
|
||||
private final Class<?> clazz;
|
||||
|
||||
/**
|
||||
* 数据库字段名
|
||||
*/
|
||||
private String columnName;
|
||||
private final String columnName;
|
||||
|
||||
/**
|
||||
* 字段信息
|
||||
*/
|
||||
private TableFieldInfo tableFieldInfo;
|
||||
private final TableFieldInfo tableFieldInfo;
|
||||
|
||||
/**
|
||||
* 字段别名
|
||||
*/
|
||||
private String alias;
|
||||
private final String alias;
|
||||
|
||||
/**
|
||||
* 目标属性
|
||||
*/
|
||||
private String tagProperty;
|
||||
private final String tagProperty;
|
||||
|
||||
/**
|
||||
* 字段函数
|
||||
*/
|
||||
private BaseFuncEnum funcEnum;
|
||||
private final BaseFuncEnum funcEnum;
|
||||
|
||||
|
||||
private SelectColumn(Class<?> clazz, String columnName, TableFieldInfo tableFieldInfo, String alias, String tagProperty, BaseFuncEnum funcEnum) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user