Browse Source

Merge branch 'fix/2023-01-04' into debug

Roc 2 years ago
parent
commit
b10276ce64
2 changed files with 3 additions and 2 deletions
  1. 1 1
      controllers/base_from_smm.go
  2. 2 1
      models/edb_info.go

+ 1 - 1
controllers/base_from_smm.go

@@ -82,7 +82,7 @@ func (this *SmmController) Refresh() {
 		br.ErrMsg = "请输入指标编码,指标编码为空"
 		return
 	}
-	if req.EdbInfoId <= 0 {
+	if req.EdbInfoId < 0 {
 		br.Msg = "请输入指标ID!"
 		br.ErrMsg = "请输入指标ID"
 		return

+ 2 - 1
models/edb_info.go

@@ -667,10 +667,11 @@ 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, 2, -1)
+			currDate = time.Date(currDate.Year(), currDate.Month(), 1, 0, 0, 0, 0, time.Now().Location()).AddDate(0, 1, -1)
 			if !currDate.After(endDate) {
 				dayList = append(dayList, currDate)
 			}
+			currDate = currDate.AddDate(0, 0, 1)
 		}
 	}
 	return