diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/package-info.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/package-info.java deleted file mode 100644 index f3a5e3fff..000000000 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * TODO - * 1. 会员总数据 - * 2. 性别统计 - * 3. 渠道统计 - * 4. 地域统计 - * 5. 会员概览 - */ -package cn.iocoder.yudao.module.statistics.controller.admin.member; diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsService.java index 7c60affeb..1f30eeb8d 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsService.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsService.java @@ -15,6 +15,13 @@ import java.util.List; */ public interface MemberStatisticsService { + /** + * 获取会员统计 + * + * @return 会员统计 + */ + MemberSummaryRespVO getMemberSummary(); + /** * 按照省份,获得会员统计列表 * @@ -38,11 +45,4 @@ public interface MemberStatisticsService { */ MemberAnalyseRespVO getMemberAnalyse(LocalDateTime beginTime, LocalDateTime endTime); - /** - * 获取会员统计 - * - * @return 会员统计 - */ - MemberSummaryRespVO getMemberSummary(); - } diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsServiceImpl.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsServiceImpl.java index 02623e7de..a93938b06 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsServiceImpl.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsServiceImpl.java @@ -44,6 +44,18 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService { @Resource private ApiAccessLogStatisticsService apiAccessLogStatisticsService; + @Override + public MemberSummaryRespVO getMemberSummary() { + MemberSummaryRespVO vo = payWalletStatisticsService.getUserRechargeSummary(null, null); + Integer expensePrice = tradeStatisticsService.getExpensePrice(null, null); + Integer userCount = memberStatisticsMapper.selectUserCount(null, null); + // 拼接数据 + if (vo == null) { + vo = new MemberSummaryRespVO().setRechargeUserCount(0).setRechargePrice(0); + } + return vo.setUserCount(userCount).setExpensePrice(expensePrice); + } + @Override public List getMemberAreaStatisticsList() { // 统计用户 @@ -89,19 +101,6 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService { .setComparison(new TradeStatisticsComparisonRespVO<>(vo, reference)); } - @Override - public MemberSummaryRespVO getMemberSummary() { - MemberSummaryRespVO vo = payWalletStatisticsService.getUserRechargeSummary(null, null); - Integer expensePrice = tradeStatisticsService.getExpensePrice(null, null); - Integer userCount = memberStatisticsMapper.selectUserCount(null, null); - - if (vo == null) { - vo = new MemberSummaryRespVO().setRechargeUserCount(0).setRechargePrice(0); - } - - return vo.setUserCount(userCount).setExpensePrice(expensePrice); - } - private MemberAnalyseComparisonRespVO getMemberAnalyseComparisonData(LocalDateTime beginTime, LocalDateTime endTime) { Integer rechargeUserCount = Optional.ofNullable(payWalletStatisticsService.getUserRechargeSummary(beginTime, endTime)) .map(MemberSummaryRespVO::getRechargeUserCount).orElse(0); diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeOrderStatisticsMapper.xml b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeOrderStatisticsMapper.xml index dbc3a11c7..2cecd468e 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeOrderStatisticsMapper.xml +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeOrderStatisticsMapper.xml @@ -24,20 +24,18 @@