瀏覽代碼

刷新设置批量停用启用

kobe6258 1 周之前
父節點
當前提交
8f7e01e120
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      controllers/data_manage/edb_info.go

+ 6 - 1
controllers/data_manage/edb_info.go

@@ -3005,7 +3005,7 @@ func (this *EdbInfoController) EdbInfoRefresh() {
 		br.ErrMsg = "参数错误"
 		return
 	}
-	_, err := data_manage.GetEdbInfoById(edbInfoId)
+	edbInfo, err := data_manage.GetEdbInfoById(edbInfoId)
 	if err != nil {
 		if utils.IsErrNoRow(err) {
 			br.Msg = "数据已被删除,请刷新页面"
@@ -3016,6 +3016,11 @@ func (this *EdbInfoController) EdbInfoRefresh() {
 		br.ErrMsg = "获取指标信息失败,Err:" + err.Error()
 		return
 	}
+	if edbInfo.NoUpdate == 1 {
+		br.Msg = "该指标已停用"
+		br.ErrMsg = "该指标已停用,edbCode:" + edbInfo.EdbCode
+		return
+	}
 	err, isAsync := data.EdbInfoRefreshAllFromBaseV2(edbInfoId, false, false)
 	if err != nil {
 		br.Msg = "刷新失败"