redis replace go redis

This commit is contained in:
Gordon 2022-05-31 15:18:54 +08:00 committed by Xinwei Xiong(cubxxw-openim)
parent b9597a139b
commit d990af7e71
1 changed files with 2 additions and 7 deletions

View File

@ -7,10 +7,9 @@ import (
pbCommon "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
"encoding/json"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/mitchellh/mapstructure"
"strconv"
"time"
)
@ -51,11 +50,7 @@ func (d *DataBases) NewGetMessageListBySeq(userID string, seqList []uint32, oper
}
func Map2Pb(m map[string]string) (*pbCommon.MsgData, error) {
var data pbCommon.MsgData
b, err := json.Marshal(m)
if err != nil {
return nil, err
}
err = proto.Unmarshal(b, &data)
err := mapstructure.Decode(m, &data)
if err != nil {
return nil, err
}