fix add
This commit is contained in:
@@ -50,10 +50,26 @@ func (l *AdminGetWithdrawalStatisticsLogic) AdminGetWithdrawalStatistics(req *ty
|
||||
return nil, fmt.Errorf("查询今日提现金额失败: %w", err)
|
||||
}
|
||||
|
||||
// 查询总实际到账金额(status=2表示成功)
|
||||
totalActualAmount, err := l.svcCtx.AgentWithdrawalModel.FindSum(l.ctx, totalBuilder, "actual_amount")
|
||||
if err != nil {
|
||||
logx.Errorf("查询总实际到账金额失败: %v", err)
|
||||
return nil, fmt.Errorf("查询总实际到账金额失败: %w", err)
|
||||
}
|
||||
|
||||
// 查询总扣税金额(status=2表示成功)
|
||||
totalTaxAmount, err := l.svcCtx.AgentWithdrawalModel.FindSum(l.ctx, totalBuilder, "tax_amount")
|
||||
if err != nil {
|
||||
logx.Errorf("查询总扣税金额失败: %v", err)
|
||||
return nil, fmt.Errorf("查询总扣税金额失败: %w", err)
|
||||
}
|
||||
|
||||
// 构建响应
|
||||
resp = &types.AdminGetWithdrawalStatisticsResp{
|
||||
TotalWithdrawalAmount: totalWithdrawalAmount,
|
||||
TodayWithdrawalAmount: todayWithdrawalAmount,
|
||||
TotalActualAmount: totalActualAmount,
|
||||
TotalTaxAmount: totalTaxAmount,
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
|
||||
Reference in New Issue
Block a user