Browse Source

汾渭数据源对接-指标添加限制数

gmy 7 months ago
parent
commit
7b7703982b
1 changed files with 2 additions and 4 deletions
  1. 2 4
      controllers/data_manage/fenwei_data.go

+ 2 - 4
controllers/data_manage/fenwei_data.go

@@ -18,10 +18,6 @@ import (
 	"time"
 )
 
-const (
-	codeMax = 30
-)
-
 // FenweiClassify
 // @Title 汾渭数据分类
 // @Description 汾渭数据分类接口
@@ -602,6 +598,7 @@ func (this *EdbInfoController) LyIndexAddValidate() {
 	}
 
 	codeLen := len(req.IndexCodes)
+	var codeMax = 30
 	if codeLen > codeMax {
 		br.Msg = "批量添加指标数量不得超过" + strconv.Itoa(codeMax) + "个"
 		br.ErrMsg = "批量添加指标数量不得超过" + strconv.Itoa(codeMax) + "个"
@@ -666,6 +663,7 @@ func (this *EdbInfoController) LyIndexAdd() {
 		br.Msg = "请选择指标"
 		return
 	}
+	codeMax := 30
 	if len(req) > codeMax {
 		br.Msg = "批量添加指标数量不得超过" + strconv.Itoa(codeMax) + "个"
 		return