...
|
...
|
@@ -146,7 +146,13 @@ func getJoinWays(transactionContext *transaction.TransactionContext) (joinWays [ |
|
|
return
|
|
|
}
|
|
|
|
|
|
// 获取公司统计
|
|
|
/**
|
|
|
* @Author SteveChan
|
|
|
* @Description //TODO 获取公司统计,增加销售日期限制
|
|
|
* @Date 02:45 2021/2/3
|
|
|
* @Param
|
|
|
* @return
|
|
|
**/
|
|
|
func getStatistics(userId int64, transactionContext *transaction.TransactionContext) (interface{}, error) {
|
|
|
var (
|
|
|
UsersRepository, _ = factory.CreateUsersRepository(transactionContext)
|
...
|
...
|
@@ -174,19 +180,19 @@ func getStatistics(userId int64, transactionContext *transaction.TransactionCont |
|
|
if count, e := PartnerInfoDao.PartnerStatic(map[string]interface{}{"inPartnerIds": partnerIds, "inPartnerCategory": domain.App}); e == nil {
|
|
|
Statistics["appCount"] = count
|
|
|
}
|
|
|
if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Career}); e == nil {
|
|
|
if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Career, EndTime: utils.GetDayEnd().Unix() * 1000}); e == nil {
|
|
|
Statistics["careerOrdersMoney"] = bonus.TotalOrderAmount
|
|
|
Statistics["careerDividend"] = bonus.Bonus
|
|
|
}
|
|
|
if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Business}); e == nil {
|
|
|
if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Business, EndTime: utils.GetDayEnd().Unix() * 1000}); e == nil {
|
|
|
Statistics["businessOrdersMoney"] = bonus.TotalOrderAmount
|
|
|
Statistics["businessDividend"] = bonus.Bonus
|
|
|
}
|
|
|
if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Develop}); e == nil {
|
|
|
if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Develop, EndTime: utils.GetDayEnd().Unix() * 1000}); e == nil {
|
|
|
Statistics["developOrdersMoney"] = bonus.TotalOrderAmount
|
|
|
Statistics["developDividend"] = bonus.Bonus
|
|
|
}
|
|
|
if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.App}); e == nil {
|
|
|
if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.App, EndTime: utils.GetDayEnd().Unix() * 1000}); e == nil {
|
|
|
Statistics["appOrdersMoney"] = bonus.TotalOrderAmount
|
|
|
Statistics["appDividend"] = bonus.Bonus
|
|
|
}
|
...
|
...
|
|