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

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/domain/PageParam.java |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 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 a5d610f..d407fce 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
@@ -5,7 +5,9 @@
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.zy.asrs.framework.common.Cools;
+import com.zy.asrs.framework.domain.QueryField;
 import com.zy.asrs.framework.domain.QueryType;
+import com.zy.asrs.wcs.utils.Utils;
 
 import java.lang.reflect.Field;
 import java.util.Arrays;
@@ -21,14 +23,23 @@
 
     private final U where;
 
+    /**
+     * 鏄惁鎶婂瓧娈靛悕绉伴┘宄拌浆涓嬪垝绾�
+     */
+    private final boolean isToUnderlineCase;
+
     public PageParam() {
         this(null);
     }
 
     public PageParam(U where) {
+        this(where, true);
+    }
+
+    public PageParam(U where, boolean isToUnderlineCase) {
         super();
         this.where = where;
-
+        this.isToUnderlineCase = isToUnderlineCase;
         if (where != null) {
             if (where.getPageIdx() != null) {
                 setCurrent(where.getPageIdx());
@@ -39,9 +50,20 @@
         }
     }
 
+    /**
+     * @param excludes 涓嶅寘鍚殑瀛楁
+     */
     public QueryWrapper<T> getWrapper(String... excludes) {
         return buildWrapper(null, Arrays.asList(excludes));
     }
+
+    /**
+     * @param columns 鍙寘鍚殑瀛楁
+     */
+    public QueryWrapper<T> getWrapperWith(String... columns) {
+        return buildWrapper(Arrays.asList(columns), null);
+    }
+
 
     private QueryWrapper<T> buildWrapper(List<String> columns, List<String> excludes) {
         QueryWrapper<T> queryWrapper = new QueryWrapper<>();
@@ -77,9 +99,8 @@
                 if (!Cools.isEmpty(queryField.value())) {
                     fieldName = queryField.value();
                 }
-                if (queryField.type() != null) {
-                    queryType = queryField.type();
-                }
+                queryField.type();
+                queryType = queryField.type();
             } else {
                 // 杩囨护闈炴湰琛ㄧ殑瀛楁
                 TableField tableField = field.getAnnotation(TableField.class);

--
Gitblit v1.9.1