mirror of
https://gitee.com/best_handsome/mybatis-plus-join
synced 2025-07-11 00:02:22 +08:00
格式化并且添加注释
This commit is contained in:
parent
07db41c36d
commit
9a7b1503ed
@ -38,7 +38,6 @@ public interface MPJBaseService<T> extends IService<T> {
|
|||||||
*/
|
*/
|
||||||
List<Map<String, Object>> selectJoinMaps(MPJBaseJoin wrapper);
|
List<Map<String, Object>> selectJoinMaps(MPJBaseJoin wrapper);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 连接查询返回Map集合并分页
|
* 连接查询返回Map集合并分页
|
||||||
*/
|
*/
|
||||||
|
@ -6,14 +6,9 @@ import org.apache.ibatis.type.JdbcType;
|
|||||||
import org.apache.ibatis.type.TypeHandler;
|
import org.apache.ibatis.type.TypeHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* copy mp 3.4.3 {@link com.baomidou.mybatisplus.core.toolkit.sql.SqlScriptUtils}
|
||||||
* sql 脚本工具类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author miemie
|
|
||||||
* @since 2018-08-15
|
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("all")
|
||||||
public abstract class SqlScriptUtils implements Constants {
|
public abstract class SqlScriptUtils implements Constants {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,10 +68,10 @@ public abstract class SqlScriptUtils implements Constants {
|
|||||||
*/
|
*/
|
||||||
public static String convertChoose(final String whenTest, final String whenSqlScript, final String otherwise) {
|
public static String convertChoose(final String whenTest, final String whenSqlScript, final String otherwise) {
|
||||||
return "<choose>" + NEWLINE
|
return "<choose>" + NEWLINE
|
||||||
+ "<when test=\"" + whenTest + QUOTE + RIGHT_CHEV + NEWLINE
|
+ "<when test=\"" + whenTest + QUOTE + RIGHT_CHEV + NEWLINE
|
||||||
+ whenSqlScript + NEWLINE + "</when>" + NEWLINE
|
+ whenSqlScript + NEWLINE + "</when>" + NEWLINE
|
||||||
+ "<otherwise>" + otherwise + "</otherwise>" + NEWLINE
|
+ "<otherwise>" + otherwise + "</otherwise>" + NEWLINE
|
||||||
+ "</choose>";
|
+ "</choose>";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,12 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
|||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 这个类是从 {@link java.lang.invoke.SerializedLambda} 里面 copy 过来的,
|
* copy mp before 3.4.3 {@link com.baomidou.mybatisplus.core.toolkit.support.SerializedLambda}
|
||||||
* 字段信息完全一样
|
|
||||||
* <p>负责将一个支持序列的 Function 序列化为 SerializedLambda</p>
|
|
||||||
*
|
|
||||||
* @author HCL
|
|
||||||
* @since 2018/05/10
|
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class SerializedLambda implements Serializable {
|
public class SerializedLambda implements Serializable {
|
||||||
|
@ -235,6 +235,10 @@ public class MPJLambdaWrapper<T> extends MPJAbstractLambdaWrapper<T, MPJLambdaWr
|
|||||||
public void clear() {
|
public void clear() {
|
||||||
super.clear();
|
super.clear();
|
||||||
sqlSelect.toNull();
|
sqlSelect.toNull();
|
||||||
|
from.toNull();
|
||||||
|
selectColumns.clear();
|
||||||
|
ignoreColumns.clear();
|
||||||
|
subTable.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -243,7 +247,6 @@ public class MPJLambdaWrapper<T> extends MPJAbstractLambdaWrapper<T, MPJLambdaWr
|
|||||||
MPJLambdaWrapper<?> apply = function.apply(instance(keyWord, clazz));
|
MPJLambdaWrapper<?> apply = function.apply(instance(keyWord, clazz));
|
||||||
onWrappers.add(apply);
|
onWrappers.add(apply);
|
||||||
subTable.put(clazz, tableIndex);
|
subTable.put(clazz, tableIndex);
|
||||||
TableInfo leftInfo = TableInfoHelper.getTableInfo(clazz);
|
|
||||||
tableIndex++;
|
tableIndex++;
|
||||||
}
|
}
|
||||||
return typedThis;
|
return typedThis;
|
||||||
|
@ -9,6 +9,8 @@ import java.io.Serializable;
|
|||||||
* 以及移除不会在ON语句中出现的条件 比如like相关 保留原来的like 只是不太可能会出现 on a.id like b.id 所以不会支持这种写法
|
* 以及移除不会在ON语句中出现的条件 比如like相关 保留原来的like 只是不太可能会出现 on a.id like b.id 所以不会支持这种写法
|
||||||
* <p>
|
* <p>
|
||||||
* {@link com.baomidou.mybatisplus.core.conditions.interfaces.Compare}
|
* {@link com.baomidou.mybatisplus.core.conditions.interfaces.Compare}
|
||||||
|
*
|
||||||
|
* @since 1.1.8
|
||||||
*/
|
*/
|
||||||
public interface OnCompare<Children> extends Serializable {
|
public interface OnCompare<Children> extends Serializable {
|
||||||
/**
|
/**
|
||||||
|
@ -2,6 +2,12 @@ package com.github.yulichang.wrapper.interfaces.on;
|
|||||||
|
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* on function
|
||||||
|
*
|
||||||
|
* @author yulichang
|
||||||
|
* @since 1.1.8
|
||||||
|
*/
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface OnFunction {
|
public interface OnFunction {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user