This commit is contained in:
eson 2023-09-01 14:19:13 +08:00
parent 8bd87c77e5
commit 94a2e8f129

View File

@ -116,7 +116,7 @@ func (l *InfoLogic) Info(req *types.UserInfoRequest, userinfo *auth.UserInfo) (r
for _, mquery := range mquerys {
sqlstr := fmt.Sprintf("select id, module, %s as querydata from %s where %s ", mquery.EncodeQuery("metadata"), mquery.TableName, cond)
var info InfoType
raw := l.svcCtx.MysqlConn.Raw(sqlstr)
if raw.Error != nil {
@ -128,8 +128,9 @@ func (l *InfoLogic) Info(req *types.UserInfoRequest, userinfo *auth.UserInfo) (r
}
}
var a any
err := raw.Scan(&a).Error
var info InfoType
err := raw.Scan(&info).Error
logx.Error(info, err)
if err == gorm.ErrRecordNotFound {
continue
}