1
0

2 Ревизии 6e032b33a3 ... e047a78c18

Автор SHA1 Съобщение Дата
  yangyj e047a78c18 Merge remote-tracking branch 'origin/master' into master преди 2 месеца
  yangyj b4841b8249 页码 преди 2 месеца
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java

+ 3 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java

@@ -2598,6 +2598,7 @@ public class ExecutorMeter extends FormulaExecutor {
             FormData pageIndex = fdm.get(FormulaUtils.getPageIndex(clazz));
             if(pageFd!=null) {
                 int total = totalPage();
+                total=Math.max(1,total);
                 JSONField jf =FormulaUtils.getPageFormat(clazz);
                 String pageTmp;
                 if(jf != null&&jf.format().length()>0){
@@ -2606,7 +2607,8 @@ public class ExecutorMeter extends FormulaExecutor {
                     pageTmp = "第$1页 共" + total + "页";
                 }
                 if(pageTotal!=null){
-                    pageTotal.setValues(IntStream.rangeClosed(1, total).boxed().map(i -> new ElementData(total)).collect(Collectors.toList()));
+                    int finalTotal = total;
+                    pageTotal.setValues(IntStream.rangeClosed(1, total).boxed().map(i -> new ElementData(finalTotal)).collect(Collectors.toList()));
                 }
                 if(pageIndex!=null){
                     pageIndex.setValues(IntStream.rangeClosed(1, total).boxed().map(ElementData::new).collect(Collectors.toList()));