mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 04:25:59 +08:00
Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode
This commit is contained in:
@@ -45,7 +45,7 @@ func (u *UserGorm) Find(ctx context.Context, userIDs []string) (users []*relatio
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userIDs", userIDs, "users", users)
|
||||
}()
|
||||
err = utils.Wrap(u.DB.Where("user_id in (?)", userIDs).Find(&users).Error, "")
|
||||
err = utils.Wrap(u.DB.Debug().Where("user_id in ?", userIDs).Find(&users).Error, "")
|
||||
return users, err
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ func rpcServerInterceptor(ctx context.Context, req interface{}, info *grpc.Unary
|
||||
opUserID = opts[0]
|
||||
}
|
||||
ctx = tracelog.SetFuncInfos(ctx, funcName, operationID)
|
||||
ctx = context.WithValue(ctx, OperationID, operationID)
|
||||
ctx = context.WithValue(ctx, OpUserID, opUserID)
|
||||
tracelog.SetCtxInfo(ctx, funcName, err, "opUserID", opUserID, "rpcReq", rpcString(req))
|
||||
resp, err = handler(ctx, req)
|
||||
if err != nil {
|
||||
@@ -58,6 +60,7 @@ func rpcClientInterceptor(ctx context.Context, method string, req, reply interfa
|
||||
}
|
||||
operationID, ok := ctx.Value(constant.OperationID).(string)
|
||||
if !ok {
|
||||
log.Error("1111", "ctx missing operationID")
|
||||
return errs.ErrArgs.Wrap("ctx missing operationID")
|
||||
}
|
||||
md := metadata.Pairs(constant.OperationID, operationID)
|
||||
|
||||
Reference in New Issue
Block a user