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; }