feat: 店铺概览页面标题显示店铺名称

- ShopOverviewStatisticsVO 增加 shopId 字段
- Service 层通过 shopService 查询店铺名写入响应
- 前端 OverviewStatistics 类型增加 shopId
- Page title 改为「店铺经营概览(店铺名)」格式
This commit is contained in:
小蟑螂
2026-04-14 18:14:41 +08:00
parent 92a6175edb
commit c95450849c
4 changed files with 15 additions and 1 deletions
@@ -15,6 +15,12 @@ import java.util.List;
@Schema(description = "单店铺概览统计VO")
public class ShopOverviewStatisticsVO {
/**
* 店铺ID
*/
@Schema(description = "店铺ID", example = "1")
private Long shopId;
/**
* 店铺名称
*/
@@ -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()