作者 yangfu

统计修改

@@ -147,9 +147,9 @@ func (dao *CreditAccountDao) CooperationUsersDividendsStatistics(queryOptions ma @@ -147,9 +147,9 @@ func (dao *CreditAccountDao) CooperationUsersDividendsStatistics(queryOptions ma
147 if v, ok := queryOptions["sortByActuallyPaidAmount"]; ok { 147 if v, ok := queryOptions["sortByActuallyPaidAmount"]; ok {
148 vInt := v.(int) 148 vInt := v.(int)
149 if vInt == 1 { 149 if vInt == 1 {
150 - query.Order("divides_amount asc") 150 + query.Order("actually_paid_amount asc")
151 } else { 151 } else {
152 - query.Order("divides_amount desc") 152 + query.Order("actually_paid_amount desc")
153 } 153 }
154 } 154 }
155 query.GroupExpr("participator->>'userId'") 155 query.GroupExpr("participator->>'userId'")
@@ -68,7 +68,7 @@ func (ptr *CooperationStatisticsService) CooperationGoodsStatistics(queryOptions @@ -68,7 +68,7 @@ func (ptr *CooperationStatisticsService) CooperationGoodsStatistics(queryOptions
68 // 2.计算百分比 68 // 2.计算百分比
69 var totalAmount float64 69 var totalAmount float64
70 for i := range goods { 70 for i := range goods {
71 - goods[i].Rank = int32(i + 1) 71 + goods[i].Rank = int32(i+1) + int32(request.Offset)
72 totalAmount += goods[i].GoodAmount 72 totalAmount += goods[i].GoodAmount
73 } 73 }
74 for i := range goods { 74 for i := range goods {
@@ -437,7 +437,6 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st @@ -437,7 +437,6 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st
437 if err := creditAccountDao.DividendsStatistics(map[string]interface{}{ 437 if err := creditAccountDao.DividendsStatistics(map[string]interface{}{
438 "companyId": request.CompanyId, 438 "companyId": request.CompanyId,
439 "orgId": request.OrgId, 439 "orgId": request.OrgId,
440 - "userId": request.UserId,  
441 "userBaseId": request.UserBaseId, 440 "userBaseId": request.UserBaseId,
442 "paymentBeginTime": queryOptions["beginTime"], 441 "paymentBeginTime": queryOptions["beginTime"],
443 "paymentEndTime": queryOptions["endTime"], 442 "paymentEndTime": queryOptions["endTime"],
@@ -453,7 +452,6 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st @@ -453,7 +452,6 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st
453 if err := creditAccountDao.DividendsStatistics(map[string]interface{}{ 452 if err := creditAccountDao.DividendsStatistics(map[string]interface{}{
454 "companyId": request.CompanyId, 453 "companyId": request.CompanyId,
455 "orgId": request.OrgId, 454 "orgId": request.OrgId,
456 - "userId": request.UserId,  
457 "userBaseId": request.UserBaseId, 455 "userBaseId": request.UserBaseId,
458 "paymentBeginTime": queryOptions["beginTime"], 456 "paymentBeginTime": queryOptions["beginTime"],
459 "paymentEndTime": queryOptions["endTime"], 457 "paymentEndTime": queryOptions["endTime"],