Browse Source

fix:修复月度数据

Roc 2 years ago
parent
commit
0c89bd3830
1 changed files with 1 additions and 1 deletions
  1. 1 1
      services/data/predict_edb_info.go

+ 1 - 1
services/data/predict_edb_info.go

@@ -78,7 +78,7 @@ func getPredictEdbDayList(startDate, endDate time.Time, frequency string) (dayLi
 	case "月度":
 		for currDate := startDate; currDate.Before(endDate) || currDate.Equal(endDate); {
 			currDate = time.Date(currDate.Year(), currDate.Month(), 1, 0, 0, 0, 0, time.Now().Location()).AddDate(0, 1, -1)
-			if !currDate.After(endDate) {
+			if !currDate.After(endDate) && !currDate.Equal(startDate) {
 				dayList = append(dayList, currDate)
 			}
 			currDate = currDate.AddDate(0, 0, 1)