From 109cbb50d48867083e1a2c746a7ebc3c95cf3569 Mon Sep 17 00:00:00 2001 From: zepengdev <lzpsmith@outlook.com> Date: Thu, 26 Jun 2025 22:54:12 +0800 Subject: [PATCH] fix: 修正分页查询返回错误总数的问题 --- oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreCustomerController.java | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreCustomerController.java b/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreCustomerController.java index 3a12592..59900e0 100644 --- a/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreCustomerController.java +++ b/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreCustomerController.java @@ -46,11 +46,9 @@ @GetMapping(value = "/page") @ApiOperation("查询店铺") public ResponseEntity<?> getStoresByPage(StoreQueryCriteria criteria) { + criteria.setLimit(1000); PageResult<Store> pagedStores = storeQueryService.findPagedStores(criteria); - List<Store> stores = pagedStores.getContent(); - for (Store store : stores) { - store.setProducts(this.getProductsByStoreId(store.getStoreId())); - } + pagedStores.getContent().forEach(store -> store.setProducts(this.getProductsByStoreId(store.getStoreId()))); return ResponseEntity.ok(R.success(pagedStores)); } -- Gitblit v1.9.3