...
|
...
|
@@ -152,9 +152,7 @@ func getStatistics(userId int64, transactionContext *transaction.TransactionCont |
|
|
UsersRepository, _ = factory.CreateUsersRepository(transactionContext)
|
|
|
PartnerInfoDao, _ = factory.CreatePartnerInfoDao(transactionContext)
|
|
|
OrderBaseDao, _ = factory.CreateOrderBaseDao(transactionContext)
|
|
|
//BusinessBonusDao, _ = factory.CreateBusinessBonusDao(transactionContext)
|
|
|
//user *domain.Users
|
|
|
partnerIds []int64
|
|
|
partnerIds []int64
|
|
|
)
|
|
|
if user, e := UsersRepository.FindOne(map[string]interface{}{"id": userId}); e != nil || user == nil {
|
|
|
return struct {
|
...
|
...
|
@@ -163,10 +161,7 @@ func getStatistics(userId int64, transactionContext *transaction.TransactionCont |
|
|
partnerIds = user.AccessPartnerIds()
|
|
|
}
|
|
|
Statistics := make(map[string]interface{})
|
|
|
//Statistics["developDividend"] = 0
|
|
|
//Statistics["developOrdersMoney"] = 0
|
|
|
//Statistics["appDividend"] = 0
|
|
|
//Statistics["appOrdersMoney"] = 0
|
|
|
// TODO:分组统计
|
|
|
if count, e := PartnerInfoDao.PartnerStatic(map[string]interface{}{"inPartnerIds": partnerIds, "inPartnerCategory": domain.Career}); e == nil {
|
|
|
Statistics["careerCount"] = count
|
|
|
}
|
...
|
...
|
@@ -195,11 +190,6 @@ func getStatistics(userId int64, transactionContext *transaction.TransactionCont |
|
|
Statistics["appOrdersMoney"] = bonus.TotalOrderAmount
|
|
|
Statistics["appDividend"] = bonus.Bonus
|
|
|
}
|
|
|
//if businessBonus, e := BusinessBonusDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, IsDisable: 1}); e == nil {
|
|
|
// Statistics["businessDividend"] = businessBonus.Bonus
|
|
|
// Statistics["businessOrdersMoney"] = businessBonus.TotalOrderAmount
|
|
|
//}
|
|
|
|
|
|
Statistics["totalCount"] = len(partnerIds)
|
|
|
return Statistics, nil
|
|
|
}
|
...
|
...
|
|