Browse Source

Merge branch 'feature/eta2.5.7_purang' into debug

xyxie 1 week ago
parent
commit
beb7e94901
2 changed files with 2 additions and 2 deletions
  1. 1 1
      controllers/data_manage/edb_info.go
  2. 1 1
      models/data_manage/edb_data_base.go

+ 1 - 1
controllers/data_manage/edb_info.go

@@ -2123,7 +2123,7 @@ func (this *EdbInfoController) EdbInfoSearch() {
 
 				//edb指标信息
 				edbInfoItem, err := data_manage.GetEdbInfoByEdbCode(source, edbCode)
-				if edbInfoItem != nil {
+				if edbInfoItem != nil && edbInfoItem.EdbInfoId > 0 {
 					searchItem.EdbName = edbInfoItem.EdbName
 				}
 			}

+ 1 - 1
models/data_manage/edb_data_base.go

@@ -353,7 +353,7 @@ func GetBaseIndexInfoByEdbCode(edbCode string, source int) (item *BaseIndexInfo,
 
 	sql = fmt.Sprintf(sql, tableName)
 	//err = o.Raw(sql, pars).QueryRow(&item)
-	err = global.DbMap[utils.DbNameIndex].Raw(sql, pars...).Find(&item).Error
+	err = global.DbMap[utils.DbNameIndex].Raw(sql, pars...).First(&item).Error
 	return
 }