This commit is contained in:
admin 2021-02-27 14:50:27 +08:00
parent 332f21bb6d
commit 1debe1d825
2 changed files with 11 additions and 12 deletions

View File

@ -45,6 +45,6 @@ public class F {
@SuppressWarnings("unchecked")
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();
}
}

View File

@ -25,33 +25,32 @@ import java.util.Objects;
public class S {
public static <T, R> String a(SFunction<T, R> sFunction) {
Assert.notNull(sFunction, "function is null");
return "a" + StringPool.DOT + getColumn(sFunction);
return getStrByAlias("a", sFunction);
}
public static <T, R> String b(SFunction<T, R> sFunction) {
Assert.notNull(sFunction, "function is null");
return "b" + StringPool.DOT + getColumn(sFunction);
return getStrByAlias("b", sFunction);
}
public static <T, R> String c(SFunction<T, R> sFunction) {
Assert.notNull(sFunction, "function is null");
return "c" + StringPool.DOT + getColumn(sFunction);
return getStrByAlias("c", sFunction);
}
public static <T, R> String d(SFunction<T, R> sFunction) {
Assert.notNull(sFunction, "function is null");
return "d" + StringPool.DOT + getColumn(sFunction);
return getStrByAlias("d", sFunction);
}
public static <T, R> String e(SFunction<T, R> sFunction) {
Assert.notNull(sFunction, "function is null");
return "e" + StringPool.DOT + getColumn(sFunction);
return getStrByAlias("e", 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");
return "f" + StringPool.DOT + getColumn(sFunction);
return alias + StringPool.DOT + getColumn(sFunction);
}
/**