From ab849f796bdc17236a95ea5fe5c166fb8f24a75c Mon Sep 17 00:00:00 2001 From: sws <15810472099@163.com> Date: 星期六, 26 十一月 2022 16:12:02 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/extend/CustomizedSqlInjector.java | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/lf/server/extend/CustomizedSqlInjector.java b/src/main/java/com/lf/server/extend/CustomizedSqlInjector.java new file mode 100644 index 0000000..54ac506 --- /dev/null +++ b/src/main/java/com/lf/server/extend/CustomizedSqlInjector.java @@ -0,0 +1,26 @@ +package com.lf.server.extend; + +import com.baomidou.mybatisplus.core.injector.AbstractMethod; +import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector; +import com.baomidou.mybatisplus.core.metadata.TableInfo; + +import java.util.List; + +/** + * 鑷畾涔夋柟娉昐QL娉ㄥ叆鍣� + * @author WWW + */ +public class CustomizedSqlInjector extends DefaultSqlInjector { + /** + * 濡傛灉鍙渶澧炲姞鏂规硶锛屼繚鐣檓ybatis plus鑷甫鏂规硶锛� + * 鍙互鍏堣幏鍙杝uper.getMethodList()锛屽啀娣诲姞add + */ + @Override + public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) { + List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo); + methodList.add(new InsertBatchMethod()); + methodList.add(new UpdateBatchMethod()); + + return methodList; + } +} -- Gitblit v1.9.3