From d842708c23d7fe302b9be2c14e395a124576ba23 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 16 Oct 2023 23:42:54 +0800 Subject: [PATCH] =?UTF-8?q?code=20review=EF=BC=9A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/service/article/ArticleCategoryServiceImpl.java | 3 +++ .../controller/admin/member/MemberStatisticsController.java | 2 ++ .../controller/admin/trade/TradeStatisticsController.java | 1 + 3 files changed, 6 insertions(+) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleCategoryServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleCategoryServiceImpl.java index 5dad55f9e..c6e249589 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleCategoryServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleCategoryServiceImpl.java @@ -9,6 +9,7 @@ import cn.iocoder.yudao.module.promotion.convert.article.ArticleCategoryConvert; import cn.iocoder.yudao.module.promotion.dal.dataobject.article.ArticleCategoryDO; import cn.iocoder.yudao.module.promotion.dal.dataobject.article.ArticleDO; import cn.iocoder.yudao.module.promotion.dal.mysql.article.ArticleCategoryMapper; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -30,7 +31,9 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService { @Resource private ArticleCategoryMapper articleCategoryMapper; + @Resource + @Lazy // 延迟加载,解决循环依赖问题 private ArticleService articleService; @Override diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/MemberStatisticsController.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/MemberStatisticsController.java index 59d2dd2b4..fc89625c9 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/MemberStatisticsController.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/MemberStatisticsController.java @@ -103,6 +103,8 @@ public class MemberStatisticsController { return success(memberStatisticsService.getRegisterTerminalStatisticsList()); } + // TODO 芋艿:已经 review + // TODO @疯狂:要注意 date 的排序; @GetMapping("/user-count-comparison") @Operation(summary = "获得用户数量对照") @PreAuthorize("@ss.hasPermission('statistics:member:query')") diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/trade/TradeStatisticsController.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/trade/TradeStatisticsController.java index 457988986..985d6952e 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/trade/TradeStatisticsController.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/trade/TradeStatisticsController.java @@ -124,6 +124,7 @@ public class TradeStatisticsController { @Operation(summary = "获得订单量趋势统计") @PreAuthorize("@ss.hasPermission('statistics:trade:query')") public CommonResult>> getOrderCountTrendComparison(@Valid TradeOrderTrendReqVO reqVO) { + // TODO @疯狂:要注意 date 的排序; return success(tradeOrderStatisticsService.getOrderCountTrendComparison(reqVO)); }