作者 yangfu

按月统计修改

@@ -635,11 +635,11 @@ func (ptr *CooperationStatisticsService) PaymentHistoryHistogramStatistics(query @@ -635,11 +635,11 @@ func (ptr *CooperationStatisticsService) PaymentHistoryHistogramStatistics(query
635 creditAccountDao, _ := dao.NewCreditAccountDao(ptr.transactionContext) 635 creditAccountDao, _ := dao.NewCreditAccountDao(ptr.transactionContext)
636 636
637 var request = struct { 637 var request = struct {
638 - OrgId int64 `json:"orgId"`  
639 - UserId int64 `json:"userId"`  
640 - UserBaseId int64 `json:"userBaseId"`  
641 - BeginTime time.Time `json:"beginTime"`  
642 - EndTime time.Time `json:"endTime"` 638 + OrgId int64 `json:"orgId"`
  639 + UserId int64 `json:"userId"`
  640 + UserBaseId int64 `json:"userBaseId"`
  641 + PaymentBeginTime time.Time `json:"beginTime"`
  642 + PaymentEndTime time.Time `json:"endTime"`
643 }{} 643 }{}
644 if err := LoadQueryObject(queryOptions, &request); err != nil { 644 if err := LoadQueryObject(queryOptions, &request); err != nil {
645 return nil, err 645 return nil, err
@@ -665,10 +665,10 @@ func (ptr *CooperationStatisticsService) PaymentHistoryHistogramStatistics(query @@ -665,10 +665,10 @@ func (ptr *CooperationStatisticsService) PaymentHistoryHistogramStatistics(query
665 var xAxisData []string 665 var xAxisData []string
666 var values []float64 666 var values []float64
667 var queryItems []queryItem 667 var queryItems []queryItem
668 - if !request.BeginTime.IsZero() && request.BeginTime.AddDate(0, 3, 0).Before(request.EndTime) {  
669 - queryItems, xAxisData = histogramStatisticsByYear(request.BeginTime) 668 + if !request.PaymentBeginTime.IsZero() && request.PaymentBeginTime.AddDate(0, 3, 0).Before(request.PaymentEndTime) {
  669 + queryItems, xAxisData = histogramStatisticsByYear(request.PaymentBeginTime)
670 } else { 670 } else {
671 - queryItems, xAxisData = histogramStatisticsByMonth(request.BeginTime) 671 + queryItems, xAxisData = histogramStatisticsByMonth(request.PaymentBeginTime)
672 } 672 }
673 for i := range queryItems { 673 for i := range queryItems {
674 item := queryItems[i] 674 item := queryItems[i]