f
This commit is contained in:
@@ -413,6 +413,8 @@ type (
|
|||||||
LevelName string `json:"level_name"` // 等级名称
|
LevelName string `json:"level_name"` // 等级名称
|
||||||
Mobile string `json:"mobile"` // 手机号
|
Mobile string `json:"mobile"` // 手机号
|
||||||
CreateTime string `json:"create_time"` // 加入团队时间
|
CreateTime string `json:"create_time"` // 加入团队时间
|
||||||
|
TotalRebateAmount float64 `json:"total_rebate_amount"` // 返佣给我的总金额
|
||||||
|
TodayRebateAmount float64 `json:"today_rebate_amount"` // 返佣给我的今日金额
|
||||||
TodayInvites int64 `json:"today_invites"` // 邀请加入团队的今日人数
|
TodayInvites int64 `json:"today_invites"` // 邀请加入团队的今日人数
|
||||||
MonthInvites int64 `json:"month_invites"` // 邀请加入团队的本月人数
|
MonthInvites int64 `json:"month_invites"` // 邀请加入团队的本月人数
|
||||||
TotalInvites int64 `json:"total_invites"` // 邀请加入团队的总人数
|
TotalInvites int64 `json:"total_invites"` // 邀请加入团队的总人数
|
||||||
|
|||||||
@@ -314,7 +314,8 @@ func (l *GetTeamListLogic) buildTeamMemberItem(agentId string, member *model.Age
|
|||||||
monthQueries := l.countDistinctOrdersForMember(l.ctx, monthRebateBuilder)
|
monthQueries := l.countDistinctOrdersForMember(l.ctx, monthRebateBuilder)
|
||||||
|
|
||||||
// 统计返佣给我的金额(从agent_rebate表,source_agent_id = member.Id, agent_id = agentId)
|
// 统计返佣给我的金额(从agent_rebate表,source_agent_id = member.Id, agent_id = agentId)
|
||||||
// 原返佣统计字段已在新需求中不再下发给前端,这里暂不计算金额,后续如有需要可在 .api 中重新定义并补充实现
|
totalRebateAmount, _ := l.svcCtx.AgentRebateModel.FindSum(l.ctx, rebateBuilder, "rebate_amount")
|
||||||
|
todayRebateAmount, _ := l.svcCtx.AgentRebateModel.FindSum(l.ctx, rebateBuilder.Where("create_time >= ?", todayStart), "rebate_amount")
|
||||||
|
|
||||||
// 统计邀请人数(从agent_relation表,parent_id = member.Id)
|
// 统计邀请人数(从agent_relation表,parent_id = member.Id)
|
||||||
inviteBuilder := l.svcCtx.AgentRelationModel.SelectBuilder().
|
inviteBuilder := l.svcCtx.AgentRelationModel.SelectBuilder().
|
||||||
@@ -338,6 +339,8 @@ func (l *GetTeamListLogic) buildTeamMemberItem(agentId string, member *model.Age
|
|||||||
TodayQueries: todayQueries,
|
TodayQueries: todayQueries,
|
||||||
MonthQueries: monthQueries,
|
MonthQueries: monthQueries,
|
||||||
TotalQueries: totalQueries,
|
TotalQueries: totalQueries,
|
||||||
|
TotalRebateAmount: totalRebateAmount,
|
||||||
|
TodayRebateAmount: todayRebateAmount,
|
||||||
IsDirect: isDirect,
|
IsDirect: isDirect,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -505,6 +505,8 @@ type TeamMemberItem struct {
|
|||||||
LevelName string `json:"level_name"` // 等级名称
|
LevelName string `json:"level_name"` // 等级名称
|
||||||
Mobile string `json:"mobile"` // 手机号
|
Mobile string `json:"mobile"` // 手机号
|
||||||
CreateTime string `json:"create_time"` // 加入团队时间
|
CreateTime string `json:"create_time"` // 加入团队时间
|
||||||
|
TotalRebateAmount float64 `json:"total_rebate_amount"` // 返佣给我的总金额
|
||||||
|
TodayRebateAmount float64 `json:"today_rebate_amount"` // 返佣给我的今日金额
|
||||||
TodayInvites int64 `json:"today_invites"` // 邀请加入团队的今日人数
|
TodayInvites int64 `json:"today_invites"` // 邀请加入团队的今日人数
|
||||||
MonthInvites int64 `json:"month_invites"` // 邀请加入团队的本月人数
|
MonthInvites int64 `json:"month_invites"` // 邀请加入团队的本月人数
|
||||||
TotalInvites int64 `json:"total_invites"` // 邀请加入团队的总人数
|
TotalInvites int64 `json:"total_invites"` // 邀请加入团队的总人数
|
||||||
|
|||||||
Reference in New Issue
Block a user