mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-10-13 21:30:25 +00:00
fix: mp框架类型处理器修正
This commit is contained in:
@@ -8,6 +8,7 @@ import org.apache.ibatis.type.JdbcType;
|
|||||||
import org.apache.ibatis.type.MappedJdbcTypes;
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
import org.apache.ibatis.type.MappedTypes;
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,13 +20,15 @@ import java.util.List;
|
|||||||
@MappedJdbcTypes({JdbcType.VARCHAR,JdbcType.LONGVARCHAR})
|
@MappedJdbcTypes({JdbcType.VARCHAR,JdbcType.LONGVARCHAR})
|
||||||
public class IntegerListTypeHandler extends AbstractJsonTypeHandler<List<Integer>> {
|
public class IntegerListTypeHandler extends AbstractJsonTypeHandler<List<Integer>> {
|
||||||
|
|
||||||
/**
|
|
||||||
* 默认初始化
|
|
||||||
*/
|
|
||||||
public IntegerListTypeHandler(Class<?> type) {
|
public IntegerListTypeHandler(Class<?> type) {
|
||||||
super(type);
|
super(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IntegerListTypeHandler(Class<?> type, Field field) {
|
||||||
|
super(type, field);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> parse(String json) {
|
public List<Integer> parse(String json) {
|
||||||
if (StrUtil.isNotBlank(json)){
|
if (StrUtil.isNotBlank(json)){
|
||||||
|
@@ -8,6 +8,7 @@ import org.apache.ibatis.type.JdbcType;
|
|||||||
import org.apache.ibatis.type.MappedJdbcTypes;
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
import org.apache.ibatis.type.MappedTypes;
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,13 +20,14 @@ import java.util.List;
|
|||||||
@MappedJdbcTypes({JdbcType.VARCHAR,JdbcType.LONGVARCHAR})
|
@MappedJdbcTypes({JdbcType.VARCHAR,JdbcType.LONGVARCHAR})
|
||||||
public class LongListTypeHandler extends AbstractJsonTypeHandler<List<Long>> {
|
public class LongListTypeHandler extends AbstractJsonTypeHandler<List<Long>> {
|
||||||
|
|
||||||
/**
|
|
||||||
* 默认初始化
|
|
||||||
*/
|
|
||||||
public LongListTypeHandler(Class<?> type) {
|
public LongListTypeHandler(Class<?> type) {
|
||||||
super(type);
|
super(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LongListTypeHandler(Class<?> type, Field field) {
|
||||||
|
super(type, field);
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public List<Long> parse(String json) {
|
public List<Long> parse(String json) {
|
||||||
if (StrUtil.isNotBlank(json)){
|
if (StrUtil.isNotBlank(json)){
|
||||||
|
@@ -9,6 +9,7 @@ import org.apache.ibatis.type.JdbcType;
|
|||||||
import org.apache.ibatis.type.MappedJdbcTypes;
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
import org.apache.ibatis.type.MappedTypes;
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,12 +20,14 @@ import java.util.List;
|
|||||||
@MappedTypes(List.class)
|
@MappedTypes(List.class)
|
||||||
@MappedJdbcTypes({JdbcType.VARCHAR,JdbcType.LONGVARCHAR})
|
@MappedJdbcTypes({JdbcType.VARCHAR,JdbcType.LONGVARCHAR})
|
||||||
public class StringListTypeHandler extends AbstractJsonTypeHandler<List<String>> {
|
public class StringListTypeHandler extends AbstractJsonTypeHandler<List<String>> {
|
||||||
private static final String COMMA = ",";
|
|
||||||
|
|
||||||
public StringListTypeHandler() {
|
public StringListTypeHandler(Class<?> type) {
|
||||||
super(List.class);
|
super(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StringListTypeHandler(Class<?> type, Field field) {
|
||||||
|
super(type, field);
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public List<String> parse(String json) {
|
public List<String> parse(String json) {
|
||||||
if (StrUtil.isNotBlank(json)){
|
if (StrUtil.isNotBlank(json)){
|
||||||
|
Reference in New Issue
Block a user