...
|
...
|
@@ -42,6 +42,14 @@ func Statistics(header *protocol.RequestHeader, request *protocol.DividendStatis |
|
|
// 业务分红统计
|
|
|
if bonus, e := BusinessBonusRepository.FindOne(map[string]interface{}{"partner_id": header.UserId, "isDisable": 1}); e == nil {
|
|
|
bonusAll.Receivable += bonus.Bonus
|
|
|
bonusAll.Received += bonus.BonusHas
|
|
|
bonusAll.Outstanding += bonus.BonusNot
|
|
|
if bonus.UpdateAt.Unix() >= (request.StartTime/1000) && bonus.UpdateAt.Unix() < (request.EndTime/1000) {
|
|
|
q := quarter(bonus.UpdateAt)
|
|
|
bonusQuarters[q].Receivable += bonus.Bonus
|
|
|
bonusQuarters[q].Received += bonus.BonusHas
|
|
|
bonusQuarters[q].Outstanding += bonus.BonusNot
|
|
|
}
|
|
|
}
|
|
|
|
|
|
rsp = &protocol.DividendStatisticsResponse{}
|
...
|
...
|
|