格式化并且添加注释

This commit is contained in:
admin 2021-05-31 10:20:20 +08:00
parent 07db41c36d
commit 9a7b1503ed
6 changed files with 19 additions and 19 deletions

View File

@ -38,7 +38,6 @@ public interface MPJBaseService<T> extends IService<T> {
*/
List<Map<String, Object>> selectJoinMaps(MPJBaseJoin wrapper);
/**
* 连接查询返回Map集合并分页
*/

View File

@ -6,14 +6,9 @@ import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.TypeHandler;
/**
* <p>
* sql 脚本工具类
* </p>
*
* @author miemie
* @since 2018-08-15
* copy mp 3.4.3 {@link com.baomidou.mybatisplus.core.toolkit.sql.SqlScriptUtils}
*/
@SuppressWarnings("serial")
@SuppressWarnings("all")
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) {
return "<choose>" + NEWLINE
+ "<when test=\"" + whenTest + QUOTE + RIGHT_CHEV + NEWLINE
+ whenSqlScript + NEWLINE + "</when>" + NEWLINE
+ "<otherwise>" + otherwise + "</otherwise>" + NEWLINE
+ "</choose>";
+ "<when test=\"" + whenTest + QUOTE + RIGHT_CHEV + NEWLINE
+ whenSqlScript + NEWLINE + "</when>" + NEWLINE
+ "<otherwise>" + otherwise + "</otherwise>" + NEWLINE
+ "</choose>";
}
/**

View File

@ -8,12 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import java.io.*;
/**
* 这个类是从 {@link java.lang.invoke.SerializedLambda} 里面 copy 过来的
* 字段信息完全一样
* <p>负责将一个支持序列的 Function 序列化为 SerializedLambda</p>
*
* @author HCL
* @since 2018/05/10
* copy mp before 3.4.3 {@link com.baomidou.mybatisplus.core.toolkit.support.SerializedLambda}
*/
@SuppressWarnings("unused")
public class SerializedLambda implements Serializable {

View File

@ -235,6 +235,10 @@ public class MPJLambdaWrapper<T> extends MPJAbstractLambdaWrapper<T, MPJLambdaWr
public void clear() {
super.clear();
sqlSelect.toNull();
from.toNull();
selectColumns.clear();
ignoreColumns.clear();
subTable.clear();
}
@Override
@ -243,7 +247,6 @@ public class MPJLambdaWrapper<T> extends MPJAbstractLambdaWrapper<T, MPJLambdaWr
MPJLambdaWrapper<?> apply = function.apply(instance(keyWord, clazz));
onWrappers.add(apply);
subTable.put(clazz, tableIndex);
TableInfo leftInfo = TableInfoHelper.getTableInfo(clazz);
tableIndex++;
}
return typedThis;

View File

@ -9,6 +9,8 @@ import java.io.Serializable;
* 以及移除不会在ON语句中出现的条件 比如like相关 保留原来的like 只是不太可能会出现 on a.id like b.id 所以不会支持这种写法
* <p>
* {@link com.baomidou.mybatisplus.core.conditions.interfaces.Compare}
*
* @since 1.1.8
*/
public interface OnCompare<Children> extends Serializable {
/**

View File

@ -2,6 +2,12 @@ package com.github.yulichang.wrapper.interfaces.on;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
/**
* on function
*
* @author yulichang
* @since 1.1.8
*/
@FunctionalInterface
public interface OnFunction {