From 2342be5b7da23eb6207ccf67379658a19e765cb3 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Fri, 5 Dec 2025 11:01:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7=E9=A1=B5=E9=9D=A2=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BD=93=E6=97=A5=E6=96=B0=E5=A2=9E=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/app/command/activity/GetIncomeStatisticsExe.java | 7 +++++++ .../clientobject/activity/InviteIncomeStatisticsCO.java | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/GetIncomeStatisticsExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/GetIncomeStatisticsExe.java index f0a97716..b34d22aa 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/GetIncomeStatisticsExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/GetIncomeStatisticsExe.java @@ -66,6 +66,7 @@ public class GetIncomeStatisticsExe { statistics.setTotalIncome(totalIncome); statistics.setTodayIncome(todayIncome); statistics.setValidInviteCount(validInvitedUserIds.size()); + statistics.setTodayInviteCount(getTodayInviteCount(allInvites)); log.info("邀请收益统计, userId={}, totalIncome={}, todayIncome={}, validCount={}", userId, totalIncome, todayIncome, validInvitedUserIds.size()); @@ -73,6 +74,12 @@ public class GetIncomeStatisticsExe { return statistics; } + private Integer getTodayInviteCount(List allInvites) { + return (int) allInvites.stream() + .filter(e -> e.getCreateTime().toLocalDateTime().toLocalDate().equals(LocalDate.now())) + .count(); + } + /** * 获取有效邀请用户ID列表 */ diff --git a/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/activity/InviteIncomeStatisticsCO.java b/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/activity/InviteIncomeStatisticsCO.java index 8d671520..35f9657b 100644 --- a/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/activity/InviteIncomeStatisticsCO.java +++ b/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/activity/InviteIncomeStatisticsCO.java @@ -32,4 +32,9 @@ public class InviteIncomeStatisticsCO implements Serializable { * 有效邀请用户数量 */ private Integer validInviteCount; + + /** + * 当日邀请数量 + */ + private Integer todayInviteCount; }