@@ -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
}
@@ -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