@@ -37,9 +37,13 @@ public abstract class AbstractServiceImpl<Po, PK> implements GenericService<Po,
param.setPaging(false);
int total = getMapper().total(param);
pagerResult.setTotal(total);
- //根据实际记录数量重新指定分页参数
- param.rePaging(total);
- pagerResult.setData(getMapper().select(param));
+ if (total == 0) {
+ pagerResult.setData(new ArrayList<>());
+ } else {
+ //根据实际记录数量重新指定分页参数
+ param.rePaging(total);
+ pagerResult.setData(getMapper().select(param));
+ }
return pagerResult;
}
@@ -165,8 +165,13 @@ public class DynamicFormServiceImpl implements DynamicFormService, ExpressionSco
query.setParam(param);
int total = query.total();
result.setTotal(total);
- result.setData(query.list(param.getPageIndex(), param.getPageSize()));
+ result.setData(new ArrayList<>());
+ result.setData(query.list(param.getPageIndex(), param.getPageSize()));
return result;