diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/vo/CompanyOverviewVO.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/vo/CompanyOverviewVO.java index f104fad7..6f2d3d99 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/vo/CompanyOverviewVO.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/vo/CompanyOverviewVO.java @@ -85,13 +85,13 @@ public class CompanyOverviewVO { * 多店铺数据横向汇总(包含合计行和店铺列表) */ @Schema(description = "多店铺数据横向汇总") - private ShopOverview shopComparisons; + private ShopOverview shopSummary; /** * 多品类数据横向汇总(包含合计行和品类列表) */ @Schema(description = "多品类数据横向汇总") - private CategoryOverview categoryComparisons; + private CategoryOverview categorySummary; /** * 平台维度概览(包含合计行和平台列表) @@ -113,10 +113,10 @@ public class CompanyOverviewVO { @Schema(description = "多店铺概览") public static class ShopOverview { @Schema(description = "合计行") - private ShopComparison total; + private ShopSummary total; @Schema(description = "各店铺汇总列表") - private List shops; + private List shops; } /** @@ -126,10 +126,10 @@ public class CompanyOverviewVO { @Schema(description = "多品类概览") public static class CategoryOverview { @Schema(description = "合计行") - private CategoryComparison total; + private CategorySummary total; @Schema(description = "各品类汇总列表") - private List categories; + private List categories; } /** @@ -245,7 +245,7 @@ public class CompanyOverviewVO { */ @Data @Schema(description = "店铺汇总数据") - public static class ShopComparison { + public static class ShopSummary { @Schema(description = "店铺ID", example = "1") private Long shopId; @@ -318,7 +318,7 @@ public class CompanyOverviewVO { */ @Data @Schema(description = "品类汇总数据") - public static class CategoryComparison { + public static class CategorySummary { @Schema(description = "品类ID(未分配为null)", example = "1") private Long categoryId; 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 9e769fad..74a6ec94 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 @@ -176,9 +176,9 @@ public class ShopOverviewStatisticsVO { @Schema(description = "商品概览") public static class ProductOverview { @Schema(description = "合计行") - private ProductComparison total; + private ProductSummary total; @Schema(description = "各商品汇总列表") - private List products; + private List products; } /** @@ -188,9 +188,9 @@ public class ShopOverviewStatisticsVO { @Schema(description = "品类概览") public static class CategoryOverview { @Schema(description = "合计行") - private CategoryComparison total; + private CategorySummary total; @Schema(description = "各品类汇总列表") - private List categories; + private List categories; } /** @@ -198,7 +198,7 @@ public class ShopOverviewStatisticsVO { */ @Data @Schema(description = "商品汇总数据") - public static class ProductComparison { + public static class ProductSummary { @Schema(description = "商品ID", example = "1") private Long productId; @@ -259,7 +259,7 @@ public class ShopOverviewStatisticsVO { */ @Data @Schema(description = "品类汇总数据") - public static class CategoryComparison { + public static class CategorySummary { @Schema(description = "品类ID", example = "1") private Long categoryId; diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/CategoryExportExcelServiceImpl.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/CategoryExportExcelServiceImpl.java index 3ab8a709..176df879 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/CategoryExportExcelServiceImpl.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/CategoryExportExcelServiceImpl.java @@ -154,7 +154,7 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic Map categoryNameMap = allCategories.stream() .collect(Collectors.toMap(CategoryPO::getId, CategoryPO::getName)); - List categoryDataList = new ArrayList<>(); + List categoryDataList = new ArrayList<>(); for (Map.Entry> entry : ordersByCategory.entrySet()) { Long categoryId = entry.getKey(); List categoryOrders = entry.getValue(); @@ -213,7 +213,7 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic ? "未分配品类" : categoryNameMap.getOrDefault(categoryId, "Unknown"); - CompanyOverviewVO.CategoryComparison data = new CompanyOverviewVO.CategoryComparison(); + CompanyOverviewVO.CategorySummary data = new CompanyOverviewVO.CategorySummary(); data.setCategoryId(categoryId == -1L ? null : categoryId); data.setCategoryName(categoryName); data.setSalesAmount(salesAmount); @@ -241,7 +241,7 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic .collect(Collectors.toList()); } - categoryDataList.sort(Comparator.comparing(CompanyOverviewVO.CategoryComparison::getSalesAmount).reversed()); + categoryDataList.sort(Comparator.comparing(CompanyOverviewVO.CategorySummary::getSalesAmount).reversed()); String dateRangeLabel = startDate.format(DATE_FMT) + " 至 " + endDate.format(DATE_FMT); @@ -258,7 +258,7 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic } private void createCategoryDetailSheet(Sheet sheet, String dateRangeLabel, - List dataList, + List dataList, BigDecimal taxRate) { CellStyle titleStyle = createTitleStyle(sheet.getWorkbook()); CellStyle headerStyle = createHeaderStyle(sheet.getWorkbook()); @@ -285,7 +285,7 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic } int rowIdx = 2; - for (CompanyOverviewVO.CategoryComparison data : dataList) { + for (CompanyOverviewVO.CategorySummary data : dataList) { Row row = sheet.createRow(rowIdx++); setCell(row, 0, data.getCategoryName(), dataStyle); setCell(row, 1, objToDouble(data.getSalesAmount()), dataStyle); diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/CompanyOverviewServiceImpl.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/CompanyOverviewServiceImpl.java index 552c4a7d..4cced44b 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/CompanyOverviewServiceImpl.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/service/impl/CompanyOverviewServiceImpl.java @@ -232,14 +232,14 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { overviewVO.setShopEfficiencyQuadrants(shopEfficiencyQuadrants); // 9. 多店铺数据横向汇总 - CompanyOverviewVO.ShopOverview shopOverview = calculateShopComparisons( + CompanyOverviewVO.ShopOverview shopOverview = calculateShopSummary( shops, orders, promotionFees, brushOrders, stat, companyId, startDate, endDate); - overviewVO.setShopComparisons(shopOverview); + overviewVO.setShopSummary(shopOverview); // 10. 多品类数据横向汇总 - CompanyOverviewVO.CategoryOverview categoryOverview = calculateCategoryComparisons( + CompanyOverviewVO.CategoryOverview categoryOverview = calculateCategorySummary( orders, promotionFees, brushOrders, stat, companyId, startDate, endDate); - overviewVO.setCategoryComparisons(categoryOverview); + overviewVO.setCategorySummary(categoryOverview); // 11. 平台维度汇总 CompanyOverviewVO.PlatformOverview platformOverview = calculatePlatformSummary( @@ -470,10 +470,10 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { /** * 计算多店铺数据横向汇总 */ - private CompanyOverviewVO.ShopOverview calculateShopComparisons( + private CompanyOverviewVO.ShopOverview calculateShopSummary( List shops, List orders, List promotionFees, List brushOrders, OrderStatusStatSets stat, Long companyId, LocalDate startDate, LocalDate endDate) { - List comparisons = new ArrayList<>(); + List summaries = new ArrayList<>(); // 按店铺分组数据 Map> ordersByShop = orders.stream() @@ -590,49 +590,49 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { orderCountAchievementRate = new BigDecimal("100"); } - CompanyOverviewVO.ShopComparison comparison = new CompanyOverviewVO.ShopComparison(); - comparison.setShopId(shop.getId()); - comparison.setShopName(shop.getName()); - comparison.setPlatform(shop.getPlatformId() != null ? getPlatformNameById(shop.getPlatformId()) : null); - comparison.setTargetOrderCount(targetOrderCount); - comparison.setOrderCountAchievementRate(orderCountAchievementRate); - comparison.setTargetAmount(targetAmount); - comparison.setSalesAmountAchievementRate(salesAmountAchievementRate); - comparison.setSalesAmount(salesAmount); - comparison.setOrderCount(orderCount); - comparison.setAverageOrderValue(averageOrderValue); - comparison.setProductCost(productCost); - comparison.setShippingCost(shippingCost); - comparison.setOtherCost(otherCost); - comparison.setTotalCost(productCost.add(shippingCost).add(otherCost)); - comparison.setRefundAmount(refundAmount); - comparison.setTotalPromotionFee(totalPromotionFee); - comparison.setBrushFee(brushFee); - comparison.setFeeRatio(feeRatio); - comparison.setTotalProfitBeforeTax(profitBeforeTax); - comparison.setSalesTaxAmount(salesTaxAmount); - comparison.setProfitAfterTax(profitAfterTax.setScale(2, RoundingMode.HALF_UP)); - comparison.setRoi(roi); - comparisons.add(comparison); + CompanyOverviewVO.ShopSummary summary = new CompanyOverviewVO.ShopSummary(); + summary.setShopId(shop.getId()); + summary.setShopName(shop.getName()); + summary.setPlatform(shop.getPlatformId() != null ? getPlatformNameById(shop.getPlatformId()) : null); + summary.setTargetOrderCount(targetOrderCount); + summary.setOrderCountAchievementRate(orderCountAchievementRate); + summary.setTargetAmount(targetAmount); + summary.setSalesAmountAchievementRate(salesAmountAchievementRate); + summary.setSalesAmount(salesAmount); + summary.setOrderCount(orderCount); + summary.setAverageOrderValue(averageOrderValue); + summary.setProductCost(productCost); + summary.setShippingCost(shippingCost); + summary.setOtherCost(otherCost); + summary.setTotalCost(productCost.add(shippingCost).add(otherCost)); + summary.setRefundAmount(refundAmount); + summary.setTotalPromotionFee(totalPromotionFee); + summary.setBrushFee(brushFee); + summary.setFeeRatio(feeRatio); + summary.setTotalProfitBeforeTax(profitBeforeTax); + summary.setSalesTaxAmount(salesTaxAmount); + summary.setProfitAfterTax(profitAfterTax.setScale(2, RoundingMode.HALF_UP)); + summary.setRoi(roi); + summaries.add(summary); } // 按销售额降序排序 - comparisons.sort(Comparator.comparing(CompanyOverviewVO.ShopComparison::getSalesAmount).reversed()); + summaries.sort(Comparator.comparing(CompanyOverviewVO.ShopSummary::getSalesAmount).reversed()); // 计算合计行 - CompanyOverviewVO.ShopComparison total = computeShopTotal(comparisons); + CompanyOverviewVO.ShopSummary total = computeShopTotal(summaries); // 封装为 ShopOverview CompanyOverviewVO.ShopOverview overview = new CompanyOverviewVO.ShopOverview(); overview.setTotal(total); - overview.setShops(comparisons); + overview.setShops(summaries); return overview; } /** * 计算店铺汇总的合计行 */ - private CompanyOverviewVO.ShopComparison computeShopTotal(List shops) { + private CompanyOverviewVO.ShopSummary computeShopTotal(List shops) { BigDecimal totalSales = BigDecimal.ZERO; int totalOrders = 0; BigDecimal totalTargetAmount = BigDecimal.ZERO; @@ -644,7 +644,7 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { BigDecimal totalPromoFee = BigDecimal.ZERO; BigDecimal totalBrushFee = BigDecimal.ZERO; - for (CompanyOverviewVO.ShopComparison s : shops) { + for (CompanyOverviewVO.ShopSummary s : shops) { totalSales = totalSales.add(s.getSalesAmount() != null ? s.getSalesAmount() : BigDecimal.ZERO); totalOrders += s.getOrderCount() != null ? s.getOrderCount() : 0; totalTargetAmount = totalTargetAmount.add(s.getTargetAmount() != null ? s.getTargetAmount() : BigDecimal.ZERO); @@ -679,7 +679,7 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { .multiply(new BigDecimal("100")) : totalOrders > 0 ? new BigDecimal("100") : BigDecimal.ZERO; - CompanyOverviewVO.ShopComparison total = new CompanyOverviewVO.ShopComparison(); + CompanyOverviewVO.ShopSummary total = new CompanyOverviewVO.ShopSummary(); total.setShopId(0L); total.setShopName("合计"); total.setSalesAmount(totalSales); @@ -776,7 +776,7 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { /** * Calculate category comparison data */ - private CompanyOverviewVO.CategoryOverview calculateCategoryComparisons( + private CompanyOverviewVO.CategoryOverview calculateCategorySummary( List orders, List promotionFees, List brushOrders, OrderStatusStatSets stat, Long companyId, LocalDate startDate, LocalDate endDate) { @@ -828,7 +828,7 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { brush -> brush.getBrushAmount() != null ? brush.getBrushAmount() : BigDecimal.ZERO, BigDecimal::add))); - List comparisons = new ArrayList<>(); + List summaries = new ArrayList<>(); for (Map.Entry> entry : ordersByCategory.entrySet()) { Long categoryId = entry.getKey(); List categoryOrders = entry.getValue(); @@ -902,43 +902,43 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { String categoryName = categoryId == -1L ? "其他品类" : categoryNameMap.getOrDefault(categoryId, "Unknown"); - CompanyOverviewVO.CategoryComparison comparison = new CompanyOverviewVO.CategoryComparison(); - comparison.setCategoryId(categoryId == -1L ? null : categoryId); - comparison.setCategoryName(categoryName); - comparison.setSalesAmount(salesAmount); - comparison.setOrderCount(orderCount); - comparison.setAverageOrderValue(averageOrderValue); - comparison.setProductCost(productCost); - comparison.setShippingCost(shippingCost); - comparison.setOtherCost(otherCost); - comparison.setTotalCost(totalCost); - comparison.setRefundAmount(refundAmount); - comparison.setTotalPromotionFee(totalPromotionFee); - comparison.setBrushFee(totalBrushFee); - comparison.setFeeRatio(feeRatio); - comparison.setTotalProfitBeforeTax(profitBeforeTax); - comparison.setSalesTaxAmount(salesTaxAmount); - comparison.setProfitAfterTax(profitAfterTax.setScale(2, RoundingMode.HALF_UP)); - comparison.setRoi(roi); - comparisons.add(comparison); + CompanyOverviewVO.CategorySummary summary = new CompanyOverviewVO.CategorySummary(); + summary.setCategoryId(categoryId == -1L ? null : categoryId); + summary.setCategoryName(categoryName); + summary.setSalesAmount(salesAmount); + summary.setOrderCount(orderCount); + summary.setAverageOrderValue(averageOrderValue); + summary.setProductCost(productCost); + summary.setShippingCost(shippingCost); + summary.setOtherCost(otherCost); + summary.setTotalCost(totalCost); + summary.setRefundAmount(refundAmount); + summary.setTotalPromotionFee(totalPromotionFee); + summary.setBrushFee(totalBrushFee); + summary.setFeeRatio(feeRatio); + summary.setTotalProfitBeforeTax(profitBeforeTax); + summary.setSalesTaxAmount(salesTaxAmount); + summary.setProfitAfterTax(profitAfterTax.setScale(2, RoundingMode.HALF_UP)); + summary.setRoi(roi); + summaries.add(summary); } - comparisons.sort(Comparator.comparing(CompanyOverviewVO.CategoryComparison::getSalesAmount).reversed()); + summaries.sort(Comparator.comparing(CompanyOverviewVO.CategorySummary::getSalesAmount).reversed()); // 计算合计行 - CompanyOverviewVO.CategoryComparison total = computeCategoryTotal(comparisons); + CompanyOverviewVO.CategorySummary total = computeCategoryTotal(summaries); // 封装为 CategoryOverview CompanyOverviewVO.CategoryOverview overview = new CompanyOverviewVO.CategoryOverview(); overview.setTotal(total); - overview.setCategories(comparisons); + overview.setCategories(summaries); return overview; } /** * 计算品类汇总的合计行 */ - private CompanyOverviewVO.CategoryComparison computeCategoryTotal(List categories) { + private CompanyOverviewVO.CategorySummary computeCategoryTotal(List categories) { BigDecimal totalSales = BigDecimal.ZERO; int totalOrders = 0; BigDecimal totalProductCost = BigDecimal.ZERO; @@ -948,7 +948,7 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { BigDecimal totalPromoFee = BigDecimal.ZERO; BigDecimal totalBrushFee = BigDecimal.ZERO; - for (CompanyOverviewVO.CategoryComparison c : categories) { + for (CompanyOverviewVO.CategorySummary c : categories) { totalSales = totalSales.add(c.getSalesAmount() != null ? c.getSalesAmount() : BigDecimal.ZERO); totalOrders += c.getOrderCount() != null ? c.getOrderCount() : 0; totalProductCost = totalProductCost.add(c.getProductCost() != null ? c.getProductCost() : BigDecimal.ZERO); @@ -974,7 +974,7 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { ? totalPromoFee.add(totalBrushFee).divide(totalSales, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO; - CompanyOverviewVO.CategoryComparison total = new CompanyOverviewVO.CategoryComparison(); + CompanyOverviewVO.CategorySummary total = new CompanyOverviewVO.CategorySummary(); total.setCategoryId(0L); total.setCategoryName("合计"); total.setSalesAmount(totalSales); 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 16a3ea13..af81b840 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 @@ -248,12 +248,12 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics overviewVO.setOrderCountTrend(orderCountTrend); // 10. 多商品数据横向汇总 - ShopOverviewStatisticsVO.ProductOverview productOverview = calculateProductComparisons( + ShopOverviewStatisticsVO.ProductOverview productOverview = calculateProductSummary( orders, promotionFees, brushOrders, stat); overviewVO.setProductOverview(productOverview); // 11. 品类多维度数据汇总 - ShopOverviewStatisticsVO.CategoryOverview categoryOverview = calculateCategoryComparisons( + ShopOverviewStatisticsVO.CategoryOverview categoryOverview = calculateCategorySummary( orders, promotionFees, brushOrders, stat); overviewVO.setCategoryOverview(categoryOverview); @@ -273,7 +273,7 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics } List top10 = po.getProducts().stream() .sorted(Comparator.comparing( - (ShopOverviewStatisticsVO.ProductComparison p) -> + (ShopOverviewStatisticsVO.ProductSummary p) -> p.getOrderCount() != null ? p.getOrderCount() : 0, Comparator.reverseOrder())) .limit(10) @@ -414,10 +414,10 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics /** * 计算多商品数据横向汇总 */ - private ShopOverviewStatisticsVO.ProductOverview calculateProductComparisons( + private ShopOverviewStatisticsVO.ProductOverview calculateProductSummary( List orders, List promotionFees, List brushOrders, OrderStatusStatSets stat) { - List comparisons = new ArrayList<>(); + List summaries = new ArrayList<>(); Map specToProduct = orderSpecIdToProductIdMap(orders); Map> ordersByProduct = orders.stream() @@ -530,45 +530,45 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics averageOrderValue = salesAmount.divide(new BigDecimal(orderCount), 2, RoundingMode.HALF_UP); } - ShopOverviewStatisticsVO.ProductComparison comparison = new ShopOverviewStatisticsVO.ProductComparison(); - comparison.setProductId(productId); - comparison.setProductName(product.getName()); - comparison.setProductCode(product.getProductCode()); - comparison.setSalesAmount(salesAmount); - comparison.setOrderCount(orderCount); - comparison.setAverageOrderValue(averageOrderValue); - comparison.setProductCost(productCost); - comparison.setShippingCost(shippingCost); - comparison.setOtherCost(otherCost); - comparison.setTotalCost(productCost.add(shippingCost).add(otherCost)); - comparison.setRefundAmount(refundAmount); - comparison.setTotalPromotionFee(productPromotionFee); - comparison.setBrushFee(brushFee); - comparison.setFeeRatio(feeRatio); - comparison.setTotalProfitBeforeTax(profitBeforeTax); - comparison.setSalesTaxAmount(salesTaxAmount); - comparison.setProfitAfterTax(profitAfterTax.setScale(2, RoundingMode.HALF_UP)); - comparison.setRoi(roi); - comparisons.add(comparison); + ShopOverviewStatisticsVO.ProductSummary summary = new ShopOverviewStatisticsVO.ProductSummary(); + summary.setProductId(productId); + summary.setProductName(product.getName()); + summary.setProductCode(product.getProductCode()); + summary.setSalesAmount(salesAmount); + summary.setOrderCount(orderCount); + summary.setAverageOrderValue(averageOrderValue); + summary.setProductCost(productCost); + summary.setShippingCost(shippingCost); + summary.setOtherCost(otherCost); + summary.setTotalCost(productCost.add(shippingCost).add(otherCost)); + summary.setRefundAmount(refundAmount); + summary.setTotalPromotionFee(productPromotionFee); + summary.setBrushFee(brushFee); + summary.setFeeRatio(feeRatio); + summary.setTotalProfitBeforeTax(profitBeforeTax); + summary.setSalesTaxAmount(salesTaxAmount); + summary.setProfitAfterTax(profitAfterTax.setScale(2, RoundingMode.HALF_UP)); + summary.setRoi(roi); + summaries.add(summary); } // 按销售额降序排序 - comparisons.sort(Comparator.comparing(ShopOverviewStatisticsVO.ProductComparison::getSalesAmount).reversed()); + summaries.sort(Comparator.comparing(ShopOverviewStatisticsVO.ProductSummary::getSalesAmount).reversed()); // 计算合计行 - ShopOverviewStatisticsVO.ProductComparison total = computeProductTotal(comparisons); + ShopOverviewStatisticsVO.ProductSummary total = computeProductTotal(summaries); // 封装为 ProductOverview ShopOverviewStatisticsVO.ProductOverview overview = new ShopOverviewStatisticsVO.ProductOverview(); overview.setTotal(total); - overview.setProducts(comparisons); + overview.setProducts(summaries); return overview; } /** * 计算商品汇总的合计行 */ - private ShopOverviewStatisticsVO.ProductComparison computeProductTotal(List products) { + private ShopOverviewStatisticsVO.ProductSummary computeProductTotal(List products) { BigDecimal totalSales = BigDecimal.ZERO; int totalOrders = 0; BigDecimal totalProductCost = BigDecimal.ZERO; @@ -578,7 +578,7 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics BigDecimal totalPromoFee = BigDecimal.ZERO; BigDecimal totalBrushFee = BigDecimal.ZERO; - for (ShopOverviewStatisticsVO.ProductComparison p : products) { + for (ShopOverviewStatisticsVO.ProductSummary p : products) { totalSales = totalSales.add(p.getSalesAmount() != null ? p.getSalesAmount() : BigDecimal.ZERO); totalOrders += p.getOrderCount() != null ? p.getOrderCount() : 0; totalProductCost = totalProductCost.add(p.getProductCost() != null ? p.getProductCost() : BigDecimal.ZERO); @@ -604,7 +604,7 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics ? totalPromoFee.add(totalBrushFee).divide(totalSales, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO; - ShopOverviewStatisticsVO.ProductComparison total = new ShopOverviewStatisticsVO.ProductComparison(); + ShopOverviewStatisticsVO.ProductSummary total = new ShopOverviewStatisticsVO.ProductSummary(); total.setProductId(0L); total.setProductName("合计"); total.setSalesAmount(totalSales); @@ -719,7 +719,7 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics /** * 计算品类多维度数据汇总 */ - private ShopOverviewStatisticsVO.CategoryOverview calculateCategoryComparisons( + private ShopOverviewStatisticsVO.CategoryOverview calculateCategorySummary( List orders, List promotionFees, List brushOrders, OrderStatusStatSets stat) { @@ -783,7 +783,7 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics .reduce(BigDecimal.ZERO, BigDecimal::add); // 按品类聚合 - List results = new ArrayList<>(); + List results = new ArrayList<>(); for (Map.Entry> entry : ordersByCategory.entrySet()) { Long categoryId = entry.getKey(); List catOrders = entry.getValue(); @@ -849,31 +849,31 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics ? salesAmount.divide(new BigDecimal(orderCount), 2, RoundingMode.HALF_UP) : BigDecimal.ZERO; - ShopOverviewStatisticsVO.CategoryComparison cc = new ShopOverviewStatisticsVO.CategoryComparison(); - cc.setCategoryId(categoryId); - cc.setCategoryName(categoryId == 0L ? "未分类" : categoryMap.get(categoryId).getName()); - cc.setSalesAmount(salesAmount); - cc.setOrderCount(orderCount); - cc.setAverageOrderValue(averageOrderValue); - cc.setProductCost(productCost); - cc.setShippingCost(shippingCost); - cc.setOtherCost(otherCost); - cc.setTotalCost(totalCost); - cc.setRefundAmount(refundAmount); - cc.setTotalPromotionFee(catPromotionFee); - cc.setBrushFee(catBrushFee); - cc.setFeeRatio(feeRatio); - cc.setTotalProfitBeforeTax(profitBeforeTax); - cc.setSalesTaxAmount(salesTaxAmount); - cc.setProfitAfterTax(profitAfterTax.setScale(2, RoundingMode.HALF_UP)); - cc.setRoi(roi); - results.add(cc); + ShopOverviewStatisticsVO.CategorySummary summary = new ShopOverviewStatisticsVO.CategorySummary(); + summary.setCategoryId(categoryId); + summary.setCategoryName(categoryId == 0L ? "未分类" : categoryMap.get(categoryId).getName()); + summary.setSalesAmount(salesAmount); + summary.setOrderCount(orderCount); + summary.setAverageOrderValue(averageOrderValue); + summary.setProductCost(productCost); + summary.setShippingCost(shippingCost); + summary.setOtherCost(otherCost); + summary.setTotalCost(totalCost); + summary.setRefundAmount(refundAmount); + summary.setTotalPromotionFee(catPromotionFee); + summary.setBrushFee(catBrushFee); + summary.setFeeRatio(feeRatio); + summary.setTotalProfitBeforeTax(profitBeforeTax); + summary.setSalesTaxAmount(salesTaxAmount); + summary.setProfitAfterTax(profitAfterTax.setScale(2, RoundingMode.HALF_UP)); + summary.setRoi(roi); + results.add(summary); } - results.sort(Comparator.comparing(ShopOverviewStatisticsVO.CategoryComparison::getSalesAmount).reversed()); + results.sort(Comparator.comparing(ShopOverviewStatisticsVO.CategorySummary::getSalesAmount).reversed()); // 计算合计行 - ShopOverviewStatisticsVO.CategoryComparison total = computeCategoryTotalForShop(results); + ShopOverviewStatisticsVO.CategorySummary total = computeCategoryTotalForShop(results); // 封装为 CategoryOverview ShopOverviewStatisticsVO.CategoryOverview overview = new ShopOverviewStatisticsVO.CategoryOverview(); @@ -885,7 +885,7 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics /** * 计算店铺视角品类汇总的合计行 */ - private ShopOverviewStatisticsVO.CategoryComparison computeCategoryTotalForShop(List categories) { + private ShopOverviewStatisticsVO.CategorySummary computeCategoryTotalForShop(List categories) { BigDecimal totalSales = BigDecimal.ZERO; int totalOrders = 0; BigDecimal totalProductCost = BigDecimal.ZERO; @@ -895,7 +895,7 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics BigDecimal totalPromoFee = BigDecimal.ZERO; BigDecimal totalBrushFee = BigDecimal.ZERO; - for (ShopOverviewStatisticsVO.CategoryComparison c : categories) { + for (ShopOverviewStatisticsVO.CategorySummary c : categories) { totalSales = totalSales.add(c.getSalesAmount() != null ? c.getSalesAmount() : BigDecimal.ZERO); totalOrders += c.getOrderCount() != null ? c.getOrderCount() : 0; totalProductCost = totalProductCost.add(c.getProductCost() != null ? c.getProductCost() : BigDecimal.ZERO); @@ -921,7 +921,7 @@ public class ShopOverviewStatisticsServiceImpl implements ShopOverviewStatistics ? totalPromoFee.add(totalBrushFee).divide(totalSales, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO; - ShopOverviewStatisticsVO.CategoryComparison total = new ShopOverviewStatisticsVO.CategoryComparison(); + ShopOverviewStatisticsVO.CategorySummary total = new ShopOverviewStatisticsVO.CategorySummary(); total.setCategoryId(0L); total.setCategoryName("合计"); total.setSalesAmount(totalSales); diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/shop/service/impl/ShopExportServiceImpl.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/shop/service/impl/ShopExportServiceImpl.java index e064e7cb..4bbbf15d 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/shop/service/impl/ShopExportServiceImpl.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/shop/service/impl/ShopExportServiceImpl.java @@ -190,7 +190,7 @@ public class ShopExportServiceImpl implements ShopExportService { } private void createProductDetailSheetFromVO(Sheet sheet, String dateRangeLabel, - List products, + List products, BigDecimal taxRate) { Row titleRow = sheet.createRow(0); Cell titleCell = titleRow.createCell(0); @@ -216,7 +216,7 @@ public class ShopExportServiceImpl implements ShopExportService { } int rowIdx = 2; - for (ShopOverviewStatisticsVO.ProductComparison p : products) { + for (ShopOverviewStatisticsVO.ProductSummary p : products) { Row row = sheet.createRow(rowIdx++); setCell(row, 0, p.getProductName() + (p.getProductCode() != null ? "\n编码: " + p.getProductCode() : ""), dataStyle); setCell(row, 1, nvl(p.getSalesAmount(), BigDecimal.ZERO).setScale(2, RoundingMode.HALF_UP).doubleValue(), dataStyle); 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 4d024a67..f7d98790 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 @@ -113,7 +113,7 @@ export namespace ShopVO { } /** 商品汇总数据 */ - export interface ProductComparison { + export interface ProductSummary { /** 商品ID */ productId: number; /** 商品名称 */ @@ -153,7 +153,7 @@ export namespace ShopVO { } /** 品类汇总数据 */ - export interface CategoryComparison { + export interface CategorySummary { /** 品类ID */ categoryId: number; /** 品类名称 */ @@ -209,17 +209,17 @@ export namespace ShopVO { /** 商品概览(含合计行和商品列表) */ export interface ProductOverview { /** 合计行 */ - total: ProductComparison; + total: ProductSummary; /** 各商品汇总列表 */ - products: ProductComparison[]; + products: ProductSummary[]; } /** 品类概览(含合计行和品类列表) */ export interface CategoryOverview { /** 合计行 */ - total: CategoryComparison; + total: CategorySummary; /** 各品类汇总列表 */ - categories: CategoryComparison[]; + categories: CategorySummary[]; } // ========== 店铺详情看板 ========== diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/ecommerce/store-overview/types/types.vo.ts b/ecom-dmb-frontend/apps/web-antd/src/api/ecommerce/store-overview/types/types.vo.ts index 600c974b..9e90eec7 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/api/ecommerce/store-overview/types/types.vo.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/api/ecommerce/store-overview/types/types.vo.ts @@ -28,9 +28,9 @@ export namespace CompanyOverviewVO { /** 单量趋势分析 */ orderCountTrend?: TrendData; /** 多店铺数据横向汇总 */ - shopComparisons?: ShopOverview; + shopSummary?: ShopOverview; /** 多品类数据横向汇总 */ - categoryComparisons?: CategoryOverview; + categorySummary?: CategoryOverview; /** 平台维度概览(包含合计行和平台列表) */ platformSummary?: PlatformOverview; /** 汇总ROI */ @@ -90,7 +90,7 @@ export namespace CompanyOverviewVO { } /** 店铺汇总数据(16维度) */ - export interface ShopComparison { + export interface ShopSummary { /** 店铺ID */ shopId: number; /** 店铺名称 */ @@ -138,7 +138,7 @@ export namespace CompanyOverviewVO { } /** 品类汇总数据 */ - export interface CategoryComparison { + export interface CategorySummary { /** 品类ID(未分配为null) */ categoryId?: number; /** 品类名称(未分配为"未分配品类") */ @@ -232,16 +232,16 @@ export namespace CompanyOverviewVO { /** 多店铺概览 */ export interface ShopOverview { /** 合计行 */ - total: ShopComparison; + total: ShopSummary; /** 各店铺汇总列表 */ - shops: ShopComparison[]; + shops: ShopSummary[]; } /** 多品类概览 */ export interface CategoryOverview { /** 合计行 */ - total: CategoryComparison; + total: CategorySummary; /** 各品类汇总列表 */ - categories: CategoryComparison[]; + categories: CategorySummary[]; } } diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/components/CategoryComparisonTable.vue b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/components/CategoryComparisonTable.vue index b4789879..f0e67789 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/components/CategoryComparisonTable.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/components/CategoryComparisonTable.vue @@ -15,7 +15,7 @@ import { defineOptions({ name: 'CategoryComparisonTable' }); interface Props { - categoryComparisons?: CompanyOverviewVO.CategoryOverview; + categorySummary?: CompanyOverviewVO.CategoryOverview; taxRate: number; categoryExportMode?: boolean; selectedExportCategoryIds?: number[]; @@ -35,7 +35,7 @@ const props = withDefaults(defineProps(), { const emit = defineEmits(); const allCategoriesSelected = computed(() => { - const total = props.categoryComparisons?.categories?.length || 0; + const total = props.categorySummary?.categories?.length || 0; return total > 0 && props.selectedExportCategoryIds.length === total; }); @@ -122,7 +122,7 @@ const cellRoi = (v: number | null | undefined) => 'update:selectedExportCategoryIds', allCategoriesSelected ? [] - : (categoryComparisons?.categories ?? []).map((c) => c.categoryId!) + : (categorySummary?.categories ?? []).map((c) => c.categoryId!) ) " /> @@ -210,7 +210,7 @@ const cellRoi = (v: number | null | undefined) => @@ -274,39 +274,39 @@ const cellRoi = (v: number | null | undefined) => {{ cellMoney(cat.profitAfterTax) }} - + 暂无数据 - + 合计 - {{ cellMoney(categoryComparisons?.total?.salesAmount) }} - {{ formatIntCell(categoryComparisons?.total?.orderCount) }} + {{ cellMoney(categorySummary?.total?.salesAmount) }} + {{ formatIntCell(categorySummary?.total?.orderCount) }} - {{ cellMoney(categoryComparisons?.total?.averageOrderValue) }} + {{ cellMoney(categorySummary?.total?.averageOrderValue) }} - {{ cellMoney(categoryComparisons?.total?.productCost) }} - {{ cellMoney(categoryComparisons?.total?.shippingCost) }} - {{ cellMoney(categoryComparisons?.total?.otherCost) }} - {{ cellMoney(categoryComparisons?.total?.totalCost) }} - {{ cellMoney(categoryComparisons?.total?.refundAmount) }} - {{ cellMoney(categoryComparisons?.total?.totalPromotionFee) }} - {{ cellMoney(categoryComparisons?.total?.brushFee) }} - {{ categoryComparisons?.total?.feeRatio !== undefined ? formatFeeRatioPercent(categoryComparisons?.total?.feeRatio) : '-' }} + {{ cellMoney(categorySummary?.total?.productCost) }} + {{ cellMoney(categorySummary?.total?.shippingCost) }} + {{ cellMoney(categorySummary?.total?.otherCost) }} + {{ cellMoney(categorySummary?.total?.totalCost) }} + {{ cellMoney(categorySummary?.total?.refundAmount) }} + {{ cellMoney(categorySummary?.total?.totalPromotionFee) }} + {{ cellMoney(categorySummary?.total?.brushFee) }} + {{ categorySummary?.total?.feeRatio !== undefined ? formatFeeRatioPercent(categorySummary?.total?.feeRatio) : '-' }} - {{ cellMoney(categoryComparisons?.total?.totalProfitBeforeTax) }} - {{ cellMoney(categoryComparisons?.total?.salesTaxAmount) }} - {{ cellRoi(categoryComparisons?.total?.roi) }} + {{ cellMoney(categorySummary?.total?.totalProfitBeforeTax) }} + {{ cellMoney(categorySummary?.total?.salesTaxAmount) }} + {{ cellRoi(categorySummary?.total?.roi) }} {{ cellMoney(categoryComparisons?.total?.profitAfterTax) }} + :class="(categorySummary?.total?.profitAfterTax ?? 0) < 0 ? 'text-rose-600 dark:text-rose-400' : 'text-emerald-700 dark:text-emerald-300'" + >{{ cellMoney(categorySummary?.total?.profitAfterTax) }} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/components/ComparisonSwitcher.vue b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/components/ComparisonSwitcher.vue index 7c4bcb7c..3e1cb9e7 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/components/ComparisonSwitcher.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/components/ComparisonSwitcher.vue @@ -16,10 +16,10 @@ interface Props { platformSummary?: CompanyOverviewVO.PlatformOverview; platformExportMode: boolean; selectedExportPlatformIds: number[]; - shopComparisons?: CompanyOverviewVO.ShopOverview; + shopSummary?: CompanyOverviewVO.ShopOverview; shopExportMode: boolean; selectedExportShopIds: number[]; - categoryComparisons?: CompanyOverviewVO.CategoryOverview; + categorySummary?: CompanyOverviewVO.CategoryOverview; categoryExportMode: boolean; selectedExportCategoryIds: number[]; } @@ -83,7 +83,7 @@ const modeOptions = [ (); const emit = defineEmits(); const allShopsSelected = computed(() => { - const total = props.shopComparisons?.shops?.length || 0; + const total = props.shopSummary?.shops?.length || 0; return total > 0 && props.selectedExportShopIds.length === total; }); const someShopsSelected = computed(() => { @@ -122,7 +122,7 @@ const cellRoi = (v: number | null | undefined) => if ((e.target as HTMLInputElement).checked) { emit( 'update:selectedExportShopIds', - shopComparisons?.shops?.map((s) => s.shopId) || [], + shopSummary?.shops?.map((s) => s.shopId) || [], ); } else { emit('update:selectedExportShopIds', []); @@ -247,7 +247,7 @@ const cellRoi = (v: number | null | undefined) => @@ -355,56 +355,56 @@ const cellRoi = (v: number | null | undefined) => {{ cellMoney(shop.profitAfterTax) }} - + 暂无数据 - + 合计 - {{ formatIntCell(shopComparisons?.total?.targetOrderCount) }} + {{ formatIntCell(shopSummary?.total?.targetOrderCount) }} {{ - shopComparisons?.total?.orderCountAchievementRate !== undefined - ? formatPercentPlain(shopComparisons?.total?.orderCountAchievementRate) + shopSummary?.total?.orderCountAchievementRate !== undefined + ? formatPercentPlain(shopSummary?.total?.orderCountAchievementRate) : '-' }} - {{ cellMoney(shopComparisons?.total?.targetAmount) }} + {{ cellMoney(shopSummary?.total?.targetAmount) }} {{ - shopComparisons?.total?.salesAmountAchievementRate !== undefined - ? formatPercentPlain(shopComparisons?.total?.salesAmountAchievementRate) + shopSummary?.total?.salesAmountAchievementRate !== undefined + ? formatPercentPlain(shopSummary?.total?.salesAmountAchievementRate) : '-' }} - {{ cellMoney(shopComparisons?.total?.salesAmount) }} - {{ formatIntCell(shopComparisons?.total?.orderCount) }} + {{ cellMoney(shopSummary?.total?.salesAmount) }} + {{ formatIntCell(shopSummary?.total?.orderCount) }} - {{ cellMoney(shopComparisons?.total?.averageOrderValue) }} + {{ cellMoney(shopSummary?.total?.averageOrderValue) }} - {{ cellMoney(shopComparisons?.total?.productCost) }} - {{ cellMoney(shopComparisons?.total?.shippingCost) }} - {{ cellMoney(shopComparisons?.total?.otherCost) }} - {{ cellMoney(shopComparisons?.total?.totalCost) }} - {{ cellMoney(shopComparisons?.total?.refundAmount) }} - {{ cellMoney(shopComparisons?.total?.totalPromotionFee) }} - {{ cellMoney(shopComparisons?.total?.brushFee) }} - {{ shopComparisons?.total?.feeRatio !== undefined ? formatFeeRatioPercent(shopComparisons?.total?.feeRatio) : '-' }} + {{ cellMoney(shopSummary?.total?.productCost) }} + {{ cellMoney(shopSummary?.total?.shippingCost) }} + {{ cellMoney(shopSummary?.total?.otherCost) }} + {{ cellMoney(shopSummary?.total?.totalCost) }} + {{ cellMoney(shopSummary?.total?.refundAmount) }} + {{ cellMoney(shopSummary?.total?.totalPromotionFee) }} + {{ cellMoney(shopSummary?.total?.brushFee) }} + {{ shopSummary?.total?.feeRatio !== undefined ? formatFeeRatioPercent(shopSummary?.total?.feeRatio) : '-' }} - {{ cellMoney(shopComparisons?.total?.totalProfitBeforeTax) }} - {{ cellMoney(shopComparisons?.total?.salesTaxAmount) }} - {{ cellRoi(shopComparisons?.total?.roi) }} + {{ cellMoney(shopSummary?.total?.totalProfitBeforeTax) }} + {{ cellMoney(shopSummary?.total?.salesTaxAmount) }} + {{ cellRoi(shopSummary?.total?.roi) }} {{ cellMoney(shopComparisons?.total?.profitAfterTax) }} + :class="(shopSummary?.total?.profitAfterTax ?? 0) < 0 ? 'text-rose-600 dark:text-rose-400' : 'text-emerald-700 dark:text-emerald-300'" + >{{ cellMoney(shopSummary?.total?.profitAfterTax) }} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/index.vue index ef41fe49..998d2d57 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/store-overview/index.vue @@ -325,9 +325,9 @@ const handleExportCompanyOverview = async () => { exportLoading.value = true; const [startDate, endDate] = dateRange.value; - let dataToExport: CompanyOverviewVO.ShopComparison[] = []; - if (overviewData.value?.shopComparisons) { - const shops = overviewData.value.shopComparisons.shops; + let dataToExport: CompanyOverviewVO.ShopSummary[] = []; + if (overviewData.value?.shopSummary) { + const shops = overviewData.value.shopSummary.shops; dataToExport = selectedExportShopIds.value.length > 0 ? shops.filter((s) => @@ -554,7 +554,7 @@ const navigateToShopOverview = (shopId: number) => { @@ -565,10 +565,10 @@ const navigateToShopOverview = (shopId: number) => { :platform-summary="overviewData?.platformSummary" :platform-export-mode="platformExportMode" :selected-export-platform-ids="selectedExportPlatformIds" - :shop-comparisons="overviewData?.shopComparisons" + :shop-summary="overviewData?.shopSummary" :shop-export-mode="shopExportMode" :selected-export-shop-ids="selectedExportShopIds" - :category-comparisons="overviewData?.categoryComparisons" + :category-summary="overviewData?.categorySummary" :category-export-mode="categoryExportMode" :selected-export-category-ids="selectedExportCategoryIds" @update:selected-export-platform-ids="(ids) => (selectedExportPlatformIds = ids)" 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 32190b84..7c4eae11 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 @@ -252,7 +252,7 @@ const handleCategorySelectAllChange = (event: Event) => { const target = event.target as HTMLInputElement | null; if (!target) return; selectedExportCategoryIds.value = target.checked - ? (overviewData.value?.categoryOverview?.categories?.map((c: ShopVO.CategoryComparison) => c.categoryId) ?? []) + ? (overviewData.value?.categoryOverview?.categories?.map((c: ShopVO.CategorySummary) => c.categoryId) ?? []) : []; };