From c95450849c64ebbdf0b2254f0b468e111fe4c0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9F=91=E8=9E=82?= Date: Tue, 14 Apr 2026 18:14:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BA=97=E9=93=BA=E6=A6=82=E8=A7=88?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=A0=87=E9=A2=98=E6=98=BE=E7=A4=BA=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ShopOverviewStatisticsVO 增加 shopId 字段 - Service 层通过 shopService 查询店铺名写入响应 - 前端 OverviewStatistics 类型增加 shopId - Page title 改为「店铺经营概览(店铺名)」格式 --- .../ecom/overview/model/vo/ShopOverviewStatisticsVO.java | 6 ++++++ .../service/impl/ShopOverviewStatisticsServiceImpl.java | 6 ++++++ .../apps/web-antd/src/api/ecommerce/shop/types/types.vo.ts | 2 ++ .../web-antd/src/views/ecommerce/shop/overview/index.vue | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/vo/ShopOverviewStatisticsVO.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/vo/ShopOverviewStatisticsVO.java index 8bbf7a1d..ae463b10 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/vo/ShopOverviewStatisticsVO.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/vo/ShopOverviewStatisticsVO.java @@ -15,6 +15,12 @@ import java.util.List; @Schema(description = "单店铺概览统计VO") public class ShopOverviewStatisticsVO { + /** + * 店铺ID + */ + @Schema(description = "店铺ID", example = "1") + private Long shopId; + /** * 店铺名称 */ diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/ShopOverviewStatisticsServiceImpl.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/ShopOverviewStatisticsServiceImpl.java index 0b574905..7c8ce329 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/ShopOverviewStatisticsServiceImpl.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/ShopOverviewStatisticsServiceImpl.java @@ -147,6 +147,12 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics // 构建返回对象 ShopOverviewStatisticsVO overviewVO = new ShopOverviewStatisticsVO(); + overviewVO.setShopId(queryDTO.getShopId()); + // 获取店铺名称 + ShopPO shopEntity = shopService.getById(queryDTO.getShopId()); + if (shopEntity != null) { + overviewVO.setShopName(shopEntity.getName()); + } // 1. 计算店铺总销售额 BigDecimal totalSalesAmount = orders.stream() diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/ecommerce/shop/types/types.vo.ts b/ecom-dmb-frontend/apps/web-antd/src/api/ecommerce/shop/types/types.vo.ts index 77db66a2..f1fb012d 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/api/ecommerce/shop/types/types.vo.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/api/ecommerce/shop/types/types.vo.ts @@ -107,6 +107,8 @@ export namespace ShopVO { /** 店铺概览统计信息 */ export interface OverviewStatistics { + /** 店铺ID */ + shopId?: number; /** 店铺名称 */ shopName: string; /** 店铺总销售额 */ diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue index 92c5b885..aa31e61f 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue @@ -694,7 +694,7 @@ onActivated(async () => {