作者 yangfu

按月统计修改

... ... @@ -638,8 +638,8 @@ func (ptr *CooperationStatisticsService) PaymentHistoryHistogramStatistics(query
OrgId int64 `json:"orgId"`
UserId int64 `json:"userId"`
UserBaseId int64 `json:"userBaseId"`
BeginTime time.Time `json:"beginTime"`
EndTime time.Time `json:"endTime"`
PaymentBeginTime time.Time `json:"beginTime"`
PaymentEndTime time.Time `json:"endTime"`
}{}
if err := LoadQueryObject(queryOptions, &request); err != nil {
return nil, err
... ... @@ -665,10 +665,10 @@ func (ptr *CooperationStatisticsService) PaymentHistoryHistogramStatistics(query
var xAxisData []string
var values []float64
var queryItems []queryItem
if !request.BeginTime.IsZero() && request.BeginTime.AddDate(0, 3, 0).Before(request.EndTime) {
queryItems, xAxisData = histogramStatisticsByYear(request.BeginTime)
if !request.PaymentBeginTime.IsZero() && request.PaymentBeginTime.AddDate(0, 3, 0).Before(request.PaymentEndTime) {
queryItems, xAxisData = histogramStatisticsByYear(request.PaymentBeginTime)
} else {
queryItems, xAxisData = histogramStatisticsByMonth(request.BeginTime)
queryItems, xAxisData = histogramStatisticsByMonth(request.PaymentBeginTime)
}
for i := range queryItems {
item := queryItems[i]
... ...