作者 yangfu

统计修改

... ... @@ -147,9 +147,9 @@ func (dao *CreditAccountDao) CooperationUsersDividendsStatistics(queryOptions ma
if v, ok := queryOptions["sortByActuallyPaidAmount"]; ok {
vInt := v.(int)
if vInt == 1 {
query.Order("divides_amount asc")
query.Order("actually_paid_amount asc")
} else {
query.Order("divides_amount desc")
query.Order("actually_paid_amount desc")
}
}
query.GroupExpr("participator->>'userId'")
... ...
... ... @@ -68,7 +68,7 @@ func (ptr *CooperationStatisticsService) CooperationGoodsStatistics(queryOptions
// 2.计算百分比
var totalAmount float64
for i := range goods {
goods[i].Rank = int32(i + 1)
goods[i].Rank = int32(i+1) + int32(request.Offset)
totalAmount += goods[i].GoodAmount
}
for i := range goods {
... ...
... ... @@ -437,7 +437,6 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st
if err := creditAccountDao.DividendsStatistics(map[string]interface{}{
"companyId": request.CompanyId,
"orgId": request.OrgId,
"userId": request.UserId,
"userBaseId": request.UserBaseId,
"paymentBeginTime": queryOptions["beginTime"],
"paymentEndTime": queryOptions["endTime"],
... ... @@ -453,7 +452,6 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st
if err := creditAccountDao.DividendsStatistics(map[string]interface{}{
"companyId": request.CompanyId,
"orgId": request.OrgId,
"userId": request.UserId,
"userBaseId": request.UserBaseId,
"paymentBeginTime": queryOptions["beginTime"],
"paymentEndTime": queryOptions["endTime"],
... ...