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

View File

@ -118,8 +118,14 @@ 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) sqlstr := fmt.Sprintf("select id, module, %s as querydata from %s where %s ", mquery.EncodeQuery("metadata"), mquery.TableName, cond)
var info InfoType var info InfoType
raw := l.svcCtx.MysqlConn.Raw(sqlstr) raw := l.svcCtx.MysqlConn.Raw(sqlstr)
if raw.Error == gorm.ErrRecordNotFound {
continue if raw.Error != nil {
if raw.Error == gorm.ErrRecordNotFound {
continue
} else {
logx.Error(raw.Error)
return resp.SetStatusWithMessage(basic.CodeApiErr, raw.Error.Error())
}
} }
err := raw.Scan(&info).Error err := raw.Scan(&info).Error