邀请页面 新增当日新增字段
This commit is contained in:
parent
5d9bde5a35
commit
2342be5b7d
@ -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<UserInviteUser> allInvites) {
|
||||
return (int) allInvites.stream()
|
||||
.filter(e -> e.getCreateTime().toLocalDateTime().toLocalDate().equals(LocalDate.now()))
|
||||
.count();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取有效邀请用户ID列表
|
||||
*/
|
||||
|
||||
@ -32,4 +32,9 @@ public class InviteIncomeStatisticsCO implements Serializable {
|
||||
* 有效邀请用户数量
|
||||
*/
|
||||
private Integer validInviteCount;
|
||||
|
||||
/**
|
||||
* 当日邀请数量
|
||||
*/
|
||||
private Integer todayInviteCount;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user