From 0d04bc5d8080b82338302fba0a59fccff2eaedfc Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期日, 06 七月 2025 11:28:29 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/domain/PageParam.java | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 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 915624b..83c0a9e 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,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zy.asrs.framework.common.Cools; import com.zy.asrs.framework.common.DateUtils; -import com.zy.asrs.wcs.utils.Utils; +import com.zy.asrs.wcs.utils.CommonUtils; import java.lang.reflect.Field; import java.lang.reflect.Modifier; @@ -89,14 +89,14 @@ if (null != list) { key = key.replaceAll("Range", ""); if (this.isToUnderlineCase) { - key = Utils.toSymbolCase(key, '_'); + key = CommonUtils.toSymbolCase(key, '_'); } queryWrapper.ge(key, DateUtils.convert(list.get(0))); queryWrapper.le(key, DateUtils.convert(list.get(1))); } } else { if (this.isToUnderlineCase) { - key = Utils.toSymbolCase(key, '_'); + key = CommonUtils.toSymbolCase(key, '_'); } if (like) { queryWrapper.like(key, val); @@ -116,7 +116,7 @@ fields = Cools.getAllFields(cls); for (Field field : fields) { if ("createTime".equals(field.getName())) { - queryWrapper.orderByDesc(Utils.toSymbolCase(field.getName(), '_')); + queryWrapper.orderByDesc(CommonUtils.toSymbolCase(field.getName(), '_')); } } } @@ -137,7 +137,7 @@ } } - String column = Utils.toSymbolCase(field.getName(), '_'); + String column = CommonUtils.toSymbolCase(field.getName(), '_'); columns.add(column); } if (!columns.isEmpty()) { @@ -157,7 +157,17 @@ } public Map<String, Object> pickOutMap() { - return where.getMap(); + return pickOutMap(false); + } + + public Map<String, Object> pickOutMap(boolean mergeCondition) { + Map<String, Object> map = where.getMap(); + if (mergeCondition) { + if (!Cools.isEmpty(where.getCondition())) { + map.put("condition", where.getCondition()); + } + } + return map; } } -- Gitblit v1.9.1