Преглед на файлове

fix:没有数据,直接返回

Roc преди 1 година
родител
ревизия
5272260378
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      models/predict_edb_info_rule.go

+ 5 - 0
models/predict_edb_info_rule.go

@@ -1492,6 +1492,11 @@ func GetChartPredictEdbInfoDataListByRuleAnnualValueInversion(edbInfoId int, con
 	newPredictEdbInfoData = predictEdbInfoData
 	index := len(allDataList)
 
+	// 没有数据,直接返回
+	if index <= 0 {
+		return
+	}
+
 	// 配置的年度值
 	yearValueConfig := annualValueInversionConf.Value