Explorar el Código

fix:没有数据,直接返回

Roc hace 1 año
padre
commit
5272260378
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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