yulichang 2023-07-15 11:40:43 +08:00
parent 832f0cc704
commit 05191f49b2
3 changed files with 13 additions and 3 deletions

View File

@ -17,6 +17,7 @@ import com.github.yulichang.wrapper.segments.SelectCache;
import kotlin.reflect.KProperty;
import lombok.Getter;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
@ -204,7 +205,11 @@ public abstract class KtAbstractLambdaWrapper<T, Children extends KtAbstractLamb
}
}
String decode;
decode = URLDecoder.decode(tableName, StandardCharsets.UTF_8);
try {
decode = URLDecoder.decode(tableName, StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
if (dynamicTableName) {
return tableFunc.apply(decode);
}

View File

@ -17,6 +17,7 @@ import com.github.yulichang.wrapper.interfaces.QueryJoin;
import com.github.yulichang.wrapper.segments.SelectCache;
import lombok.Getter;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
@ -204,7 +205,11 @@ public abstract class MPJAbstractLambdaWrapper<T, Children extends MPJAbstractLa
}
}
String decode;
decode = URLDecoder.decode(tableName, StandardCharsets.UTF_8);
try {
decode = URLDecoder.decode(tableName, StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
if (dynamicTableName) {
return tableFunc.apply(decode);
}

View File

@ -194,7 +194,7 @@ public class MPJLambdaWrapper<T> extends MPJAbstractLambdaWrapper<T, MPJLambdaWr
* 子查询
*/
public <E, F> MPJLambdaWrapper<T> selectSub(Class<E> clazz, String st, Consumer<MPJLambdaWrapper<E>> consumer, SFunction<F, ?> alias) {
MPJLambdaWrapper<E> wrapper = new MPJLambdaWrapper<>(null, clazz, SharedString.emptyString(), paramNameSeq, paramNameValuePairs,
MPJLambdaWrapper<E> wrapper = new MPJLambdaWrapper<E>(null, clazz, SharedString.emptyString(), paramNameSeq, paramNameValuePairs,
new MergeSegments(), SharedString.emptyString(), SharedString.emptyString(), SharedString.emptyString(),
new TableList(), null, null, null, null) {
};