From b58f703127da6f0511f6617519733dd90e9eb710 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 20 二月 2024 13:22:10 +0800
Subject: [PATCH] #

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/domain/PageParam.java |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/domain/PageParam.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/domain/PageParam.java
index 9b924f1..eb9202c 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/domain/PageParam.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/domain/PageParam.java
@@ -12,6 +12,7 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.function.Consumer;
 
 /**
  * Created by vincent on 2/13/2024
@@ -65,8 +66,16 @@
         return this.buildWrapper(false);
     }
 
-    @SuppressWarnings("all")
+    public QueryWrapper<T> buildWrapper(Consumer<QueryWrapper<T>> consumer) {
+        return this.buildWrapper(false, consumer);
+    }
+
     public QueryWrapper<T> buildWrapper(boolean like) {
+        return this.buildWrapper(like, null);
+    }
+
+    @SuppressWarnings("all")
+    public QueryWrapper<T> buildWrapper(boolean like, Consumer<QueryWrapper<T>> consumer) {
         QueryWrapper<T> queryWrapper = new QueryWrapper<>();
         Map<String, Object> map = where.getMap();
         for (String key : map.keySet()) {
@@ -98,6 +107,10 @@
             }
         }
 
+        if (null != consumer) {
+            consumer.accept(queryWrapper);
+        }
+
         Field[] fields = null;
         if (!Cools.isEmpty(cls)) {
             fields = Cools.getAllFields(cls);

--
Gitblit v1.9.1