mirror of
https://gitee.com/best_handsome/mybatis-plus-join
synced 2025-07-11 00:02:22 +08:00
1.1.0
This commit is contained in:
parent
332f21bb6d
commit
1debe1d825
@ -45,6 +45,6 @@ public class F {
|
|||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static <T> Class<T> getEntityClass(SFunction<T, ?> fn) {
|
public static <T> Class<T> getEntityClass(SFunction<T, ?> fn) {
|
||||||
return (Class<T>) com.baomidou.mybatisplus.core.toolkit.LambdaUtils.resolve(fn).getInstantiatedType();
|
return (Class<T>) LambdaUtils.resolve(fn).getInstantiatedType();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,33 +25,32 @@ import java.util.Objects;
|
|||||||
public class S {
|
public class S {
|
||||||
|
|
||||||
public static <T, R> String a(SFunction<T, R> sFunction) {
|
public static <T, R> String a(SFunction<T, R> sFunction) {
|
||||||
Assert.notNull(sFunction, "function is null");
|
return getStrByAlias("a", sFunction);
|
||||||
return "a" + StringPool.DOT + getColumn(sFunction);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T, R> String b(SFunction<T, R> sFunction) {
|
public static <T, R> String b(SFunction<T, R> sFunction) {
|
||||||
Assert.notNull(sFunction, "function is null");
|
return getStrByAlias("b", sFunction);
|
||||||
return "b" + StringPool.DOT + getColumn(sFunction);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T, R> String c(SFunction<T, R> sFunction) {
|
public static <T, R> String c(SFunction<T, R> sFunction) {
|
||||||
Assert.notNull(sFunction, "function is null");
|
return getStrByAlias("c", sFunction);
|
||||||
return "c" + StringPool.DOT + getColumn(sFunction);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T, R> String d(SFunction<T, R> sFunction) {
|
public static <T, R> String d(SFunction<T, R> sFunction) {
|
||||||
Assert.notNull(sFunction, "function is null");
|
return getStrByAlias("d", sFunction);
|
||||||
return "d" + StringPool.DOT + getColumn(sFunction);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T, R> String e(SFunction<T, R> sFunction) {
|
public static <T, R> String e(SFunction<T, R> sFunction) {
|
||||||
Assert.notNull(sFunction, "function is null");
|
return getStrByAlias("e", sFunction);
|
||||||
return "e" + StringPool.DOT + getColumn(sFunction);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T, R> String f(SFunction<T, R> sFunction) {
|
public static <T, R> String f(SFunction<T, R> sFunction) {
|
||||||
|
return getStrByAlias("f", sFunction);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static <T, R> String getStrByAlias(String alias, SFunction<T, R> sFunction) {
|
||||||
Assert.notNull(sFunction, "function is null");
|
Assert.notNull(sFunction, "function is null");
|
||||||
return "f" + StringPool.DOT + getColumn(sFunction);
|
return alias + StringPool.DOT + getColumn(sFunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user