From 3e8aabf67e56fd795c01161876e3ddf897ff3772 Mon Sep 17 00:00:00 2001 From: AndrewZuo01 Date: Fri, 5 Jan 2024 11:07:55 +0800 Subject: [PATCH] fix type = 0 --- internal/rpc/user/user.go | 2 ++ pkg/common/db/mgo/user.go | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index c34b9f0a1..7933be29b 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -435,6 +435,7 @@ func (s *userServer) ProcessUserCommandGet(ctx context.Context, req *pbuser.Proc for _, command := range commands { // No need to use index since command is already a pointer commandInfoSlice = append(commandInfoSlice, &pbuser.CommandInfoResp{ + Type: command.Type, Uuid: command.Uuid, Value: command.Value, CreateTime: command.CreateTime, @@ -458,6 +459,7 @@ func (s *userServer) ProcessUserCommandGetAll(ctx context.Context, req *pbuser.P for _, command := range commands { // No need to use index since command is already a pointer commandInfoSlice = append(commandInfoSlice, &pbuser.AllCommandInfoResp{ + Type: command.Type, Uuid: command.Uuid, Value: command.Value, CreateTime: command.CreateTime, diff --git a/pkg/common/db/mgo/user.go b/pkg/common/db/mgo/user.go index ff5929c2f..7121c18ec 100644 --- a/pkg/common/db/mgo/user.go +++ b/pkg/common/db/mgo/user.go @@ -17,7 +17,6 @@ package mgo import ( "context" "github.com/OpenIMSDK/protocol/user" - "github.com/OpenIMSDK/tools/log" "time" "github.com/OpenIMSDK/tools/mgoutil" @@ -204,7 +203,6 @@ func (u *UserMgo) GetAllUserCommand(ctx context.Context, userID string) ([]*user if err := cursor.Err(); err != nil { return nil, err } - log.ZDebug(ctx, "usercommandget", "commands", commands) return commands, nil } func (u *UserMgo) CountRangeEverydayTotal(ctx context.Context, start time.Time, end time.Time) (map[string]int64, error) {