add: anowflake email kafka, refa: redis connectg
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"juwan-backend/app/users/rpc/internal/svc"
|
||||
"juwan-backend/app/users/rpc/pb"
|
||||
"juwan-backend/common/converter"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
@@ -25,6 +26,12 @@ func NewGetUsersByIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetU
|
||||
|
||||
func (l *GetUsersByIdLogic) GetUsersById(in *pb.GetUsersByIdReq) (*pb.GetUsersByIdResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
user, err := l.svcCtx.UsersModelRO.FindOne(l.ctx, in.Id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pbUser := &pb.Users{}
|
||||
converter.StructToStruct(&user, &pbUser)
|
||||
|
||||
return &pb.GetUsersByIdResp{}, nil
|
||||
return &pb.GetUsersByIdResp{Users: pbUser}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user