Przeglądaj źródła

分页字段统一:pageSize,pageNum

skyline 1 rok temu
rodzic
commit
5a796eddb4
29 zmienionych plików z 63 dodań i 63 usunięć
  1. 2 2
      admin-web/src/components/form/ExtPage.vue
  2. 2 2
      admin-web/src/components/form/ExtSContainer.vue
  3. 1 1
      admin-web/src/components/form/ExtSelect.vue
  4. 2 2
      admin-web/src/views/admin/account/index.vue
  5. 2 2
      admin-web/src/views/admin/activity/coupon/index.vue
  6. 2 2
      admin-web/src/views/admin/activity/index.vue
  7. 2 2
      admin-web/src/views/admin/activity/userCoupon/index.vue
  8. 2 2
      admin-web/src/views/admin/banner/index.vue
  9. 2 2
      admin-web/src/views/admin/config/dict/index.vue
  10. 4 4
      admin-web/src/views/admin/config/list/index.vue
  11. 1 1
      admin-web/src/views/admin/department/index.vue
  12. 2 2
      admin-web/src/views/admin/finance/index.vue
  13. 2 2
      admin-web/src/views/admin/investor/index.vue
  14. 2 2
      admin-web/src/views/admin/invoice/index.vue
  15. 2 2
      admin-web/src/views/admin/kanban/index.vue
  16. 2 2
      admin-web/src/views/admin/log/error/index.vue
  17. 2 2
      admin-web/src/views/admin/ordering/index.vue
  18. 2 2
      admin-web/src/views/admin/refund/index.vue
  19. 1 1
      admin-web/src/views/admin/role/index.vue
  20. 2 2
      admin-web/src/views/admin/station/endpoint/index.vue
  21. 2 2
      admin-web/src/views/admin/station/list/index.vue
  22. 2 2
      admin-web/src/views/admin/station/stat/index.vue
  23. 2 2
      admin-web/src/views/admin/station/statment/index.vue
  24. 2 2
      admin-web/src/views/admin/user/index.vue
  25. 1 1
      car-wash-jdbc/src/main/java/com/kym/jdbc/BasicQuery.java
  26. 3 3
      car-wash-jdbc/src/main/java/com/kym/jdbc/Bean.java
  27. 2 2
      car-wash-jdbc/src/main/java/com/kym/jdbc/OBuilder.java
  28. 2 2
      car-wash-jdbc/src/main/java/com/kym/jdbc/template/JdbcExecute.java
  29. 8 8
      car-wash-jdbc/src/main/java/com/kym/jdbc/template/JdbcHelper.java

+ 2 - 2
admin-web/src/components/form/ExtPage.vue

@@ -58,7 +58,7 @@ onMounted(() => {
 
 const setupPage = () => {
   if (props.value) {
-    state.page.pageNum = props.value.pageNum||props.value.pageIndex;
+    state.page.pageNum = props.value.pageNum||props.value.pageNum;
     state.page.pageSize = props.value.pageSize;
     state.page.total = props.value.total;
   }
@@ -76,4 +76,4 @@ const handleCurrentChange = (val: number) => {
   emit("change", state.page)
   console.log(`current page: ${val}`)
 }
-</script>
+</script>

+ 2 - 2
admin-web/src/components/form/ExtSContainer.vue

@@ -102,7 +102,7 @@ const state = reactive({
   show: false,
   queryForm: {},
   pageQuery: {
-    pageIndex: 1,
+    pageNum: 1,
     pageSize: 20,
     total: 0
   },
@@ -146,7 +146,7 @@ const handleCheckChange = (list: any) => {
 
 const loadData = (refresh: boolean = false) => {
   if (refresh) {
-    state.pageQuery.pageIndex = 1;
+    state.pageQuery.pageNum = 1;
   }
   let {url, domain, cols, query, method} = state.config;
   let requestQuery = {...state.pageQuery, ...query, ...state.queryForm}

+ 1 - 1
admin-web/src/components/form/ExtSelect.vue

@@ -119,7 +119,7 @@ const loadData = () => {
       return;
     }
     var query = {
-      pageIndex: 1,
+      pageNum: 1,
       pageSize: 200,
     };
     if (props.query) {

+ 2 - 2
admin-web/src/views/admin/account/index.vue

@@ -183,7 +183,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -279,4 +279,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/activity/coupon/index.vue

@@ -198,7 +198,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -325,4 +325,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/activity/index.vue

@@ -203,7 +203,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -291,4 +291,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/activity/userCoupon/index.vue

@@ -210,7 +210,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -298,4 +298,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/banner/index.vue

@@ -186,7 +186,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -267,4 +267,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/config/dict/index.vue

@@ -61,7 +61,7 @@ const state = reactive({
     height:500
   },
   pageQuery: {
-    pageIndex: 1,
+    pageNum: 1,
     pageSize: 10,
     total: 0
   },
@@ -114,7 +114,7 @@ const handleOpenDialog = (action: string, row: any) => {
 // 初始化表格数据
 const loadData = (refresh: boolean = false) => {
   if (refresh) {
-    state.pageQuery.pageIndex = 1;
+    state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
   const data = [];

+ 4 - 4
admin-web/src/views/admin/config/list/index.vue

@@ -84,7 +84,7 @@ const configDialogRef = ref();
 const state = reactive({
   formQuery: {},
   pageQuery: {
-    pageIndex: 1,
+    pageNum: 1,
     pageSize: 10,
     total: 0
   },
@@ -135,7 +135,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -169,7 +169,7 @@ onBeforeUnmount(() => {
 // 初始化表格数据
 const loadData = (refresh: boolean = false) => {
   if (refresh) {
-    state.pageQuery.pageIndex = 1;
+    state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
   $body(`/config/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
@@ -205,4 +205,4 @@ const onRowDel = (row: any) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 1 - 1
admin-web/src/views/admin/department/index.vue

@@ -118,7 +118,7 @@ const state = reactive({
     loading: false,
   },
   pageQuery: {
-    pageIndex: 1,
+    pageNum: 1,
     pageSize: 20,
     total: 0,
   },

+ 2 - 2
admin-web/src/views/admin/finance/index.vue

@@ -168,7 +168,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -255,4 +255,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/investor/index.vue

@@ -192,7 +192,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -273,4 +273,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/invoice/index.vue

@@ -272,7 +272,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -413,4 +413,4 @@ const handleCancelInvoice = (row:any) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/kanban/index.vue

@@ -175,7 +175,7 @@ const shortcuts = [
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -700,4 +700,4 @@ const buildMoneyChart = () => {
 
 //endregion
 
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/log/error/index.vue

@@ -38,7 +38,7 @@ const state = reactive({
     nickName: null
   },
   pageQuery: {
-    pageIndex: 1,
+    pageNum: 1,
     pageSize: 10,
     total: 0
   },
@@ -57,7 +57,7 @@ const state = reactive({
 // 初始化表格数据
 const loadData = (refresh: boolean = false) => {
   if (refresh) {
-    state.pageQuery.pageIndex = 1;
+    state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
   $body(`/errorLog/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {

+ 2 - 2
admin-web/src/views/admin/ordering/index.vue

@@ -318,7 +318,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -411,4 +411,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/refund/index.vue

@@ -210,7 +210,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -298,4 +298,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 1 - 1
admin-web/src/views/admin/role/index.vue

@@ -96,7 +96,7 @@ const state = reactive({
     loading: false,
   },
   pageQuery: {
-    pageIndex: 1,
+    pageNum: 1,
     pageSize: 20,
   },
   formQuery: {

+ 2 - 2
admin-web/src/views/admin/station/endpoint/index.vue

@@ -199,7 +199,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -297,4 +297,4 @@ const handleUploadVisible = () => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/station/list/index.vue

@@ -210,7 +210,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -311,4 +311,4 @@ const handleUploadVisible = () => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/station/stat/index.vue

@@ -180,7 +180,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -267,4 +267,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/station/statment/index.vue

@@ -204,7 +204,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -285,4 +285,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 2 - 2
admin-web/src/views/admin/user/index.vue

@@ -180,7 +180,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -262,4 +262,4 @@ const handleTableSortChange = (column, prop, order) => {
 // defineExpose({
 //     loadData,
 // });
-</script>
+</script>

+ 1 - 1
car-wash-jdbc/src/main/java/com/kym/jdbc/BasicQuery.java

@@ -11,7 +11,7 @@ public class BasicQuery {
     public Long companyId;
 
     @QF(ignore = true)
-    public int pageIndex = 1;
+    public int pageNum = 1;
 
     @QF(ignore = true)
     public int pageSize = 20;

+ 3 - 3
car-wash-jdbc/src/main/java/com/kym/jdbc/Bean.java

@@ -16,7 +16,7 @@ public class Bean<T> implements Serializable {
     @Serial
     private static final long serialVersionUID = 1L;
     public long count;
-    public int pageIndex;
+    public int pageNum;
     public int pageSize;
     public List<T> list;
 
@@ -28,8 +28,8 @@ public class Bean<T> implements Serializable {
         this.count = list.size();
     }
 
-    public Bean(List<T> list, long count, int pageIndex, int pageSize) {
-        this.pageIndex = pageIndex;
+    public Bean(List<T> list, long count, int pageNum, int pageSize) {
+        this.pageNum = pageNum;
         this.pageSize = pageSize;
         this.list = list;
         this.count = count;

+ 2 - 2
car-wash-jdbc/src/main/java/com/kym/jdbc/OBuilder.java

@@ -142,8 +142,8 @@ public class OBuilder extends IBuilder {
                         } else if ("pageSize".equals(fieldName)) {
                             int pageSize = (int) val;
                             if (pageSize > 0) {
-                                int pageIndex = (int) DbUtil.getFieldValue(query, "pageIndex");
-                                builder.limit(Math.max(0, (pageIndex - 1) * pageSize), pageSize);
+                                int pageNum = (int) DbUtil.getFieldValue(query, "pageNum");
+                                builder.limit(Math.max(0, (pageNum - 1) * pageSize), pageSize);
                             }
                         }
                     }

+ 2 - 2
car-wash-jdbc/src/main/java/com/kym/jdbc/template/JdbcExecute.java

@@ -220,7 +220,7 @@ public class JdbcExecute implements IHandler {
      */
     public final <T> Bean<T> selectPageBean(BasicQuery query) {
         Bean<T> pageBean = new Bean<>();
-        pageBean.pageIndex = query.pageIndex;
+        pageBean.pageNum = query.pageNum;
         pageBean.pageSize = query.pageSize;
         beforeSelect(query);
         long count = selectCount(query);
@@ -242,7 +242,7 @@ public class JdbcExecute implements IHandler {
         beforeSelect(clz, OBuilder);
         long count = selectCount(clz, OBuilder);
         pageBean.count = count;
-        pageBean.pageIndex = OBuilder.limitStart();
+        pageBean.pageNum = OBuilder.limitStart();
         pageBean.pageSize = OBuilder.limitDelta();
         if (0 == count) {
             pageBean.list = Collections.emptyList();

+ 8 - 8
car-wash-jdbc/src/main/java/com/kym/jdbc/template/JdbcHelper.java

@@ -918,24 +918,24 @@ public class JdbcHelper {
             if (query.pageSize > 0) {
                 if (DIALECT_MYSQL == dialect) {
                     sbr.append(" LIMIT ");
-                    if (query.pageIndex > 0) {
-                        sbr.append((query.pageIndex - 1) * query.pageSize).append(",");
+                    if (query.pageNum > 0) {
+                        sbr.append((query.pageNum - 1) * query.pageSize).append(",");
                     }
                     if (query.pageSize > 0) {
                         sbr.append(query.pageSize);
                     }
                 } else if (DIALECT_MSSQL == dialect) {
                     sbr.append(" OFFSET ");
-                    if (query.pageIndex > 0) {
-                        sbr.append((query.pageIndex - 1) * query.pageSize).append(" ROWS ");
+                    if (query.pageNum > 0) {
+                        sbr.append((query.pageNum - 1) * query.pageSize).append(" ROWS ");
                     }
                     if (query.pageSize > 0) {
                         sbr.append(" FETCH NEXT ").append(query.pageSize).append(" ROWS ONLY  ");
                     }
                 } else if (DIALECT_PGSQL == dialect) {
                     sbr.append(" LIMIT ").append(query.pageSize);
-                    if (query.pageIndex > 0) {
-                        sbr.append(" OFFSET ").append((query.pageIndex - 1) * query.pageSize);
+                    if (query.pageNum > 0) {
+                        sbr.append(" OFFSET ").append((query.pageNum - 1) * query.pageSize);
                     }
                 } else if (DIALECT_ORACLE == dialect) {
                     StringBuilder sr = new StringBuilder();
@@ -943,8 +943,8 @@ public class JdbcHelper {
                     if (query.pageSize > 0) {
                         sr.append(" WHERE ROWNUM<=").append(query.pageSize).append(")  o1");
                     }
-                    if (query.pageIndex > 0) {
-                        sr.append(" WHERE o1.rowno>").append((query.pageIndex - 1) * query.pageSize).append(";");
+                    if (query.pageNum > 0) {
+                        sr.append(" WHERE o1.rowno>").append((query.pageNum - 1) * query.pageSize).append(";");
                     }
                     //聚合类使用子查询
                     if (!DbUtil.isEmptyOrNull(aggregate)) {