This commit is contained in:
eson 2023-09-01 14:08:46 +08:00
parent c81b4c309a
commit e73a262a6b

View File

@ -117,7 +117,12 @@ func (l *InfoLogic) Info(req *types.UserInfoRequest, userinfo *auth.UserInfo) (r
sqlstr := fmt.Sprintf("select id, module, %s as querydata from %s where %s ", mquery.EncodeQuery("metadata"), mquery.TableName, cond)
var info InfoType
err := l.svcCtx.MysqlConn.Raw(sqlstr).Scan(&info).Error
raw := l.svcCtx.MysqlConn.Raw(sqlstr)
if raw.Error == gorm.ErrRecordNotFound {
continue
}
err := raw.Scan(&info).Error
if err == gorm.ErrRecordNotFound {
continue
}