diff --git a/boot/platform/src/main/java/com/plate/boot/commons/utils/query/QueryHelper.java b/boot/platform/src/main/java/com/plate/boot/commons/utils/query/QueryHelper.java index a2c3f303..05005ec5 100644 --- a/boot/platform/src/main/java/com/plate/boot/commons/utils/query/QueryHelper.java +++ b/boot/platform/src/main/java/com/plate/boot/commons/utils/query/QueryHelper.java @@ -213,7 +213,8 @@ public static QueryFragment query(Object object, Pageable pageable, String prefi */ public static QueryFragment query(Object object, Pageable pageable, Collection skipKeys, String prefix) { Map objectMap = BeanUtils.beanToMap(object, false, true); - Map filterMap = Maps.filterKeys(objectMap, key -> !SKIP_CRITERIA_KEYS.contains(key) && !skipKeys.contains(key)); + Map filterMap = ObjectUtils.isEmpty(objectMap) ? Map.of() : + Maps.filterKeys(objectMap, key -> !SKIP_CRITERIA_KEYS.contains(key) && !skipKeys.contains(key)); QueryFragment queryFragment = QueryFragment.withMap(pageable.getPageSize(), pageable.getOffset(), filterMap); applySort(queryFragment, pageable.getSort(), prefix); @@ -225,7 +226,6 @@ public static QueryFragment query(Object object, Pageable pageable, Collection