|
@@ -374,8 +374,10 @@ public class ObjectDigitalServiceImpl extends ServiceImpl<ObjectDigitalMapper, O
|
|
|
if (null==requestData.getPage()){
|
|
|
requestData.setPage(1L);
|
|
|
}
|
|
|
- if (null==requestData.getSize()){
|
|
|
- requestData.setSize(SpringHelper.getLong(CommonConstant.QUERY_PAGE_SIZE_KEY, CommonConstant.QUERY_DEFAULT_PAGE_SIZE));
|
|
|
+ // 默认分页条数,防止大量查询
|
|
|
+ long defaultSize = SpringHelper.getLong(CommonConstant.QUERY_PAGE_SIZE_KEY, CommonConstant.QUERY_DEFAULT_PAGE_SIZE);
|
|
|
+ if (null==requestData.getSize() || requestData.getSize()>defaultSize){
|
|
|
+ requestData.setSize(defaultSize);
|
|
|
}
|
|
|
requestData.setSkip((requestData.getPage()-1)*requestData.getSize());
|
|
|
}
|