Browse Source

更新分页信息转换逻辑

woody 1 year ago
parent
commit
84ccf63c92

+ 1 - 10
framework-base/src/main/java/com/chelvc/framework/base/converter/StringPagingConverter.java

@@ -1,7 +1,6 @@
 package com.chelvc.framework.base.converter;
 package com.chelvc.framework.base.converter;
 
 
 import com.chelvc.framework.common.model.Paging;
 import com.chelvc.framework.common.model.Paging;
-import com.chelvc.framework.common.util.AssertUtils;
 import org.springframework.core.convert.converter.Converter;
 import org.springframework.core.convert.converter.Converter;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 
 
@@ -13,16 +12,8 @@ import org.springframework.stereotype.Component;
  */
  */
 @Component
 @Component
 public class StringPagingConverter implements Converter<String, Paging> {
 public class StringPagingConverter implements Converter<String, Paging> {
-    /**
-     * 最大页面大小
-     */
-    private static final int MAX_SIZE = 1000;
-
     @Override
     @Override
     public Paging convert(String source) {
     public Paging convert(String source) {
-        Paging paging = Paging.parse(source);
-        AssertUtils.check(paging == null || paging.getSize() <= MAX_SIZE,
-                () -> "Page's size must be less than or equal to " + MAX_SIZE);
-        return paging;
+        return Paging.parse(source);
     }
     }
 }
 }