From cd7b484fc2c6f7396f97735f8b21effe3df0a5de Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Sat, 22 Oct 2022 17:53:15 +0800 Subject: [PATCH 01/32] message pull --- pkg/common/db/mongoModel.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 1e4d7b01d..8695bca35 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -370,6 +370,9 @@ func (d *DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, operatio } } } + if len(hasSeqList) == 0 { + return nil, errors.New("pull message is null") + } if len(hasSeqList) != len(seqList) { var diff []uint32 diff = utils.Difference(hasSeqList, seqList) From 0eeb2f6752f46f0a0782702bd4063a59343b69de Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 27 Oct 2022 11:45:42 +0800 Subject: [PATCH 02/32] log --- internal/api/manage/management_chat.go | 23 +++++++++-------------- pkg/common/token_verify/jwt_token_test.go | 12 ++++++++++++ 2 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 pkg/common/token_verify/jwt_token_test.go diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index d18dfc451..a2254a70a 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -138,12 +138,6 @@ func ManagementSendMsg(c *gin.Context) { data = VideoElem{} case constant.File: data = FileElem{} - //case constant.AtText: - // data = AtElem{} - //case constant.Merger: - // data = - //case constant.Card: - //case constant.Location: case constant.Custom: data = CustomElem{} case constant.Revoke: @@ -161,16 +155,16 @@ func ManagementSendMsg(c *gin.Context) { //case constant.Typing: //case constant.Quote: default: - c.JSON(http.StatusBadRequest, gin.H{"errCode": 404, "errMsg": "contentType err"}) + c.JSON(http.StatusOK, gin.H{"errCode": 404, "errMsg": "contentType err"}) log.Error(c.PostForm("operationID"), "contentType err", c.PostForm("content")) return } if err := mapstructure.WeakDecode(params.Content, &data); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": err.Error()}) + c.JSON(http.StatusOK, gin.H{"errCode": 401, "errMsg": err.Error()}) log.Error(c.PostForm("operationID"), "content to Data struct err", err.Error()) return } else if err := validate.Struct(data); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 403, "errMsg": err.Error()}) + c.JSON(http.StatusOK, gin.H{"errCode": 403, "errMsg": err.Error()}) log.Error(c.PostForm("operationID"), "data args validate err", err.Error()) return } @@ -178,12 +172,13 @@ func ManagementSendMsg(c *gin.Context) { token := c.Request.Header.Get("token") claims, err := token_verify.ParseToken(token, params.OperationID) if err != nil { - log.NewError(params.OperationID, "parse token failed", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "parse token failed", "sendTime": 0, "MsgID": ""}) + log.NewError(params.OperationID, "parse token failed", err.Error(), token) + c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": "parse token failed", "sendTime": 0, "MsgID": ""}) return } if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""}) + log.NewError(params.OperationID, "not authorized", token) + c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""}) return } @@ -191,13 +186,13 @@ func ManagementSendMsg(c *gin.Context) { case constant.SingleChatType: if len(params.RecvID) == 0 { log.NewError(params.OperationID, "recvID is a null string") - c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""}) + c.JSON(http.StatusOK, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""}) return } case constant.GroupChatType, constant.SuperGroupChatType: if len(params.GroupID) == 0 { log.NewError(params.OperationID, "groupID is a null string") - c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""}) + c.JSON(http.StatusOK, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""}) return } diff --git a/pkg/common/token_verify/jwt_token_test.go b/pkg/common/token_verify/jwt_token_test.go new file mode 100644 index 000000000..64d64f263 --- /dev/null +++ b/pkg/common/token_verify/jwt_token_test.go @@ -0,0 +1,12 @@ +package token_verify + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func Test_ParseToken(t *testing.T) { + token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVSUQiOiJvcGVuSU1BZG1pbiIsIlBsYXRmb3JtIjoiQVBhZCIsImV4cCI6MTY3NDYxNTA2MSwibmJmIjoxNjY2ODM4NzYxLCJpYXQiOjE2NjY4MzkwNjF9.l8RiIu6pR4ItwDOpNIDYA9LBzIcpk8r8n6NRtXjqOp8" + _, err := GetClaimFromToken(token) + assert.Nil(t, err) +} From eba25f1bb8a2e4cef117edaea1089792807669b9 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 27 Oct 2022 17:15:06 +0800 Subject: [PATCH 03/32] ws add logout remove push token --- internal/msg_gateway/gate/logic.go | 38 +- internal/msg_gateway/gate/ws_server.go | 3 +- internal/push/logic/push_rpc_server.go | 14 +- pkg/common/db/RedisModel.go | 12 +- pkg/common/db/model.go | 17 - pkg/proto/push/push.pb.go | 465 +++++++++++++------------ pkg/proto/push/push.proto | 11 + 7 files changed, 319 insertions(+), 241 deletions(-) diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index 7b77840a7..90ef3ce63 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -8,6 +8,7 @@ import ( promePkg "Open_IM/pkg/common/prometheus" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbChat "Open_IM/pkg/proto/msg" + push "Open_IM/pkg/proto/push" pbRtc "Open_IM/pkg/proto/rtc" sdk_ws "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" @@ -58,7 +59,7 @@ func (ws *WServer) msgParse(conn *UserConn, binaryMsg []byte) { promePkg.PromeInc(promePkg.PullMsgBySeqListTotalCounter) case constant.WsLogoutMsg: log.NewInfo(m.OperationID, "conn.Close()", m.SendID, m.MsgIncr, m.ReqIdentifier) - // conn.Close() + ws.userLogoutReq(conn, &m) default: log.Error(m.OperationID, "ReqIdentifier failed ", m.SendID, m.MsgIncr, m.ReqIdentifier) } @@ -157,7 +158,6 @@ func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { ws.pullMsgBySeqListResp(conn, m, nReply) } } - func (ws *WServer) pullMsgBySeqListResp(conn *UserConn, m *Req, pb *sdk_ws.PullMessageBySeqListResp) { log.NewInfo(m.OperationID, "pullMsgBySeqListResp come here ", pb.String()) c, _ := proto.Marshal(pb) @@ -173,7 +173,40 @@ func (ws *WServer) pullMsgBySeqListResp(conn *UserConn, m *Req, pb *sdk_ws.PullM len(mReply.Data)) ws.sendMsg(conn, mReply) } +func (ws *WServer) userLogoutReq(conn *UserConn, m *Req) { + log.NewInfo(m.OperationID, "Ws call success to userLogoutReq start", m.SendID, m.ReqIdentifier, m.MsgIncr, string(m.Data)) + rpcReq := push.DelUserPushTokenReq{} + rpcReq.UserID = m.SendID + rpcReq.OperationID = m.OperationID + grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImPushName, m.OperationID) + if grpcConn == nil { + errMsg := rpcReq.OperationID + "getcdv3.GetDefaultConn == nil" + log.NewError(rpcReq.OperationID, errMsg) + ws.userLogoutResp(conn, m) + return + } + msgClient := push.NewPushMsgServiceClient(grpcConn) + reply, err := msgClient.DelUserPushToken(context.Background(), &rpcReq) + if err != nil { + log.NewError(rpcReq.OperationID, "DelUserPushToken err", err.Error()) + ws.userLogoutResp(conn, m) + } else { + log.NewInfo(rpcReq.OperationID, "rpc call success to DelUserPushToken", reply.String()) + ws.userLogoutResp(conn, m) + } + ws.userLogoutResp(conn, m) + +} +func (ws *WServer) userLogoutResp(conn *UserConn, m *Req) { + mReply := Resp{ + ReqIdentifier: m.ReqIdentifier, + MsgIncr: m.MsgIncr, + OperationID: m.OperationID, + } + ws.sendMsg(conn, mReply) + _ = conn.Close() +} func (ws *WServer) sendMsgReq(conn *UserConn, m *Req) { sendMsgAllCountLock.Lock() sendMsgAllCount++ @@ -233,6 +266,7 @@ func (ws *WServer) sendMsgResp(conn *UserConn, m *Req, pb *pbChat.SendMsgResp) { Data: b, } ws.sendMsg(conn, mReply) + } func (ws *WServer) sendSignalMsgReq(conn *UserConn, m *Req) { diff --git a/internal/msg_gateway/gate/ws_server.go b/internal/msg_gateway/gate/ws_server.go index 240db5923..eb101f2ff 100644 --- a/internal/msg_gateway/gate/ws_server.go +++ b/internal/msg_gateway/gate/ws_server.go @@ -29,6 +29,7 @@ import ( type UserConn struct { *websocket.Conn w *sync.Mutex + platformID int32 PushedMaxSeq uint32 } type WServer struct { @@ -74,7 +75,7 @@ func (ws *WServer) wsHandler(w http.ResponseWriter, r *http.Request) { log.Error(operationID, "upgrade http conn err", err.Error(), query) return } else { - newConn := &UserConn{conn, new(sync.Mutex), 0} + newConn := &UserConn{conn, new(sync.Mutex), utils.StringToInt32(query["platformID"][0]), 0} userCount++ ws.addUserConn(query["sendID"][0], utils.StringToInt(query["platformID"][0]), newConn, query["token"][0], operationID) go ws.readMsg(newConn) diff --git a/internal/push/logic/push_rpc_server.go b/internal/push/logic/push_rpc_server.go index e48906c00..b2ac3570c 100644 --- a/internal/push/logic/push_rpc_server.go +++ b/internal/push/logic/push_rpc_server.go @@ -3,6 +3,7 @@ package logic import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" + "Open_IM/pkg/common/db" "Open_IM/pkg/common/log" promePkg "Open_IM/pkg/common/prometheus" "Open_IM/pkg/grpc-etcdv3/getcdv3" @@ -10,7 +11,6 @@ import ( "Open_IM/pkg/utils" "context" "net" - "strconv" "strings" @@ -91,3 +91,15 @@ func (r *RPCServer) PushMsg(_ context.Context, pbData *pbPush.PushMsgReq) (*pbPu }, nil } + +func (r *RPCServer) DelUserPushToken(c context.Context, req *pbPush.DelUserPushTokenReq) (*pbPush.DelUserPushTokenResp, error) { + var resp pbPush.DelUserPushTokenResp + err := db.DB.DelFcmToken(req.UserID, int(req.PlatformID)) + if err != nil { + errMsg := req.OperationID + " " + "SetFcmToken failed " + err.Error() + log.NewError(req.OperationID, errMsg) + resp.ErrCode = 500 + resp.ErrMsg = errMsg + } + return &resp, nil +} diff --git a/pkg/common/db/RedisModel.go b/pkg/common/db/RedisModel.go index d36202367..a0eab5c30 100644 --- a/pkg/common/db/RedisModel.go +++ b/pkg/common/db/RedisModel.go @@ -410,15 +410,19 @@ func (d *DataBases) GetSendMsgStatus(operationID string) (int, error) { return status, err } -func (d *DataBases) SetFcmToken(account string, platformid int, fcmToken string, expireTime int64) (err error) { - key := FcmToken + account + ":" + strconv.Itoa(platformid) +func (d *DataBases) SetFcmToken(account string, platformID int, fcmToken string, expireTime int64) (err error) { + key := FcmToken + account + ":" + strconv.Itoa(platformID) return d.RDB.Set(context.Background(), key, fcmToken, time.Duration(expireTime)*time.Second).Err() } -func (d *DataBases) GetFcmToken(account string, platformid int) (string, error) { - key := FcmToken + account + ":" + strconv.Itoa(platformid) +func (d *DataBases) GetFcmToken(account string, platformID int) (string, error) { + key := FcmToken + account + ":" + strconv.Itoa(platformID) return d.RDB.Get(context.Background(), key).Result() } +func (d *DataBases) DelFcmToken(account string, platformID int) error { + key := FcmToken + account + ":" + strconv.Itoa(platformID) + return d.RDB.Del(context.Background(), key).Err() +} func (d *DataBases) IncrUserBadgeUnreadCountSum(uid string) (int, error) { key := userBadgeUnreadCountSum + uid seq, err := d.RDB.Incr(context.Background(), key).Result() diff --git a/pkg/common/db/model.go b/pkg/common/db/model.go index 54d9c5726..5cdd83bb0 100644 --- a/pkg/common/db/model.go +++ b/pkg/common/db/model.go @@ -125,23 +125,6 @@ func init() { fmt.Println("createMongoIndex success") DB.mongoClient = mongoClient - // redis pool init - //DB.redisPool = &redis.Pool{ - // MaxIdle: config.Config.Redis.DBMaxIdle, - // MaxActive: config.Config.Redis.DBMaxActive, - // IdleTimeout: time.Duration(config.Config.Redis.DBIdleTimeout) * time.Second, - // Dial: func() (redis.Conn, error) { - // return redis.Dial( - // "tcp", - // config.Config.Redis.DBAddress, - // redis.DialReadTimeout(time.Duration(1000)*time.Millisecond), - // redis.DialWriteTimeout(time.Duration(1000)*time.Millisecond), - // redis.DialConnectTimeout(time.Duration(1000)*time.Millisecond), - // redis.DialDatabase(0), - // redis.DialPassword(config.Config.Redis.DBPassWord), - // ) - // }, - //} ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() if config.Config.Redis.EnableCluster { diff --git a/pkg/proto/push/push.pb.go b/pkg/proto/push/push.pb.go index 56faaad6f..1c4d10593 100644 --- a/pkg/proto/push/push.pb.go +++ b/pkg/proto/push/push.pb.go @@ -1,291 +1,274 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.15.5 // source: push/push.proto -package pbPush +package pbPush // import "Open_IM/pkg/proto/push" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import sdk_ws "Open_IM/pkg/proto/sdk_ws" import ( - sdk_ws "Open_IM/pkg/proto/sdk_ws" - context "context" + context "golang.org/x/net/context" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type PushMsgReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OperationID string `protobuf:"bytes,1,opt,name=operationID,proto3" json:"operationID,omitempty"` - MsgData *sdk_ws.MsgData `protobuf:"bytes,2,opt,name=msgData,proto3" json:"msgData,omitempty"` - PushToUserID string `protobuf:"bytes,3,opt,name=pushToUserID,proto3" json:"pushToUserID,omitempty"` + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,2,opt,name=msgData" json:"msgData,omitempty"` + PushToUserID string `protobuf:"bytes,3,opt,name=pushToUserID" json:"pushToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *PushMsgReq) Reset() { - *x = PushMsgReq{} - if protoimpl.UnsafeEnabled { - mi := &file_push_push_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushMsgReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushMsgReq) ProtoMessage() {} - -func (x *PushMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_push_push_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PushMsgReq.ProtoReflect.Descriptor instead. +func (m *PushMsgReq) Reset() { *m = PushMsgReq{} } +func (m *PushMsgReq) String() string { return proto.CompactTextString(m) } +func (*PushMsgReq) ProtoMessage() {} func (*PushMsgReq) Descriptor() ([]byte, []int) { - return file_push_push_proto_rawDescGZIP(), []int{0} + return fileDescriptor_push_17f752d1b1c8edd5, []int{0} +} +func (m *PushMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PushMsgReq.Unmarshal(m, b) +} +func (m *PushMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PushMsgReq.Marshal(b, m, deterministic) +} +func (dst *PushMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_PushMsgReq.Merge(dst, src) +} +func (m *PushMsgReq) XXX_Size() int { + return xxx_messageInfo_PushMsgReq.Size(m) +} +func (m *PushMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_PushMsgReq.DiscardUnknown(m) } -func (x *PushMsgReq) GetOperationID() string { - if x != nil { - return x.OperationID +var xxx_messageInfo_PushMsgReq proto.InternalMessageInfo + +func (m *PushMsgReq) GetOperationID() string { + if m != nil { + return m.OperationID } return "" } -func (x *PushMsgReq) GetMsgData() *sdk_ws.MsgData { - if x != nil { - return x.MsgData +func (m *PushMsgReq) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData } return nil } -func (x *PushMsgReq) GetPushToUserID() string { - if x != nil { - return x.PushToUserID +func (m *PushMsgReq) GetPushToUserID() string { + if m != nil { + return m.PushToUserID } return "" } type PushMsgResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResultCode int32 `protobuf:"varint,1,opt,name=ResultCode,proto3" json:"ResultCode,omitempty"` + ResultCode int32 `protobuf:"varint,1,opt,name=ResultCode" json:"ResultCode,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *PushMsgResp) Reset() { - *x = PushMsgResp{} - if protoimpl.UnsafeEnabled { - mi := &file_push_push_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushMsgResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushMsgResp) ProtoMessage() {} - -func (x *PushMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_push_push_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PushMsgResp.ProtoReflect.Descriptor instead. +func (m *PushMsgResp) Reset() { *m = PushMsgResp{} } +func (m *PushMsgResp) String() string { return proto.CompactTextString(m) } +func (*PushMsgResp) ProtoMessage() {} func (*PushMsgResp) Descriptor() ([]byte, []int) { - return file_push_push_proto_rawDescGZIP(), []int{1} + return fileDescriptor_push_17f752d1b1c8edd5, []int{1} +} +func (m *PushMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PushMsgResp.Unmarshal(m, b) +} +func (m *PushMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PushMsgResp.Marshal(b, m, deterministic) +} +func (dst *PushMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PushMsgResp.Merge(dst, src) +} +func (m *PushMsgResp) XXX_Size() int { + return xxx_messageInfo_PushMsgResp.Size(m) +} +func (m *PushMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_PushMsgResp.DiscardUnknown(m) } -func (x *PushMsgResp) GetResultCode() int32 { - if x != nil { - return x.ResultCode +var xxx_messageInfo_PushMsgResp proto.InternalMessageInfo + +func (m *PushMsgResp) GetResultCode() int32 { + if m != nil { + return m.ResultCode } return 0 } -var File_push_push_proto protoreflect.FileDescriptor - -var file_push_push_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x70, 0x75, 0x73, 0x68, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x04, 0x70, 0x75, 0x73, 0x68, 0x1a, 0x28, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, - 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x73, 0x64, 0x6b, 0x5f, 0x77, 0x73, 0x2f, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, - 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x12, 0x34, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x75, 0x73, 0x68, - 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x70, 0x75, 0x73, 0x68, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x2d, 0x0a, 0x0b, - 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x32, 0x40, 0x0a, 0x0e, 0x50, - 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, - 0x07, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x12, 0x10, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2e, - 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x75, 0x73, - 0x68, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x42, 0x1f, 0x5a, - 0x1d, 0x4f, 0x70, 0x65, 0x6e, 0x5f, 0x49, 0x4d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x3b, 0x70, 0x62, 0x50, 0x75, 0x73, 0x68, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +type DelUserPushTokenReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + PlatformID int32 `protobuf:"varint,3,opt,name=platformID" json:"platformID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -var ( - file_push_push_proto_rawDescOnce sync.Once - file_push_push_proto_rawDescData = file_push_push_proto_rawDesc -) - -func file_push_push_proto_rawDescGZIP() []byte { - file_push_push_proto_rawDescOnce.Do(func() { - file_push_push_proto_rawDescData = protoimpl.X.CompressGZIP(file_push_push_proto_rawDescData) - }) - return file_push_push_proto_rawDescData +func (m *DelUserPushTokenReq) Reset() { *m = DelUserPushTokenReq{} } +func (m *DelUserPushTokenReq) String() string { return proto.CompactTextString(m) } +func (*DelUserPushTokenReq) ProtoMessage() {} +func (*DelUserPushTokenReq) Descriptor() ([]byte, []int) { + return fileDescriptor_push_17f752d1b1c8edd5, []int{2} +} +func (m *DelUserPushTokenReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DelUserPushTokenReq.Unmarshal(m, b) +} +func (m *DelUserPushTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DelUserPushTokenReq.Marshal(b, m, deterministic) +} +func (dst *DelUserPushTokenReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelUserPushTokenReq.Merge(dst, src) +} +func (m *DelUserPushTokenReq) XXX_Size() int { + return xxx_messageInfo_DelUserPushTokenReq.Size(m) +} +func (m *DelUserPushTokenReq) XXX_DiscardUnknown() { + xxx_messageInfo_DelUserPushTokenReq.DiscardUnknown(m) } -var file_push_push_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_push_push_proto_goTypes = []interface{}{ - (*PushMsgReq)(nil), // 0: push.PushMsgReq - (*PushMsgResp)(nil), // 1: push.PushMsgResp - (*sdk_ws.MsgData)(nil), // 2: server_api_params.MsgData -} -var file_push_push_proto_depIdxs = []int32{ - 2, // 0: push.PushMsgReq.msgData:type_name -> server_api_params.MsgData - 0, // 1: push.PushMsgService.PushMsg:input_type -> push.PushMsgReq - 1, // 2: push.PushMsgService.PushMsg:output_type -> push.PushMsgResp - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} +var xxx_messageInfo_DelUserPushTokenReq proto.InternalMessageInfo -func init() { file_push_push_proto_init() } -func file_push_push_proto_init() { - if File_push_push_proto != nil { - return +func (m *DelUserPushTokenReq) GetOperationID() string { + if m != nil { + return m.OperationID } - if !protoimpl.UnsafeEnabled { - file_push_push_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushMsgReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_push_push_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushMsgResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } + return "" +} + +func (m *DelUserPushTokenReq) GetUserID() string { + if m != nil { + return m.UserID } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_push_push_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_push_push_proto_goTypes, - DependencyIndexes: file_push_push_proto_depIdxs, - MessageInfos: file_push_push_proto_msgTypes, - }.Build() - File_push_push_proto = out.File - file_push_push_proto_rawDesc = nil - file_push_push_proto_goTypes = nil - file_push_push_proto_depIdxs = nil + return "" +} + +func (m *DelUserPushTokenReq) GetPlatformID() int32 { + if m != nil { + return m.PlatformID + } + return 0 +} + +type DelUserPushTokenResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DelUserPushTokenResp) Reset() { *m = DelUserPushTokenResp{} } +func (m *DelUserPushTokenResp) String() string { return proto.CompactTextString(m) } +func (*DelUserPushTokenResp) ProtoMessage() {} +func (*DelUserPushTokenResp) Descriptor() ([]byte, []int) { + return fileDescriptor_push_17f752d1b1c8edd5, []int{3} +} +func (m *DelUserPushTokenResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DelUserPushTokenResp.Unmarshal(m, b) +} +func (m *DelUserPushTokenResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DelUserPushTokenResp.Marshal(b, m, deterministic) +} +func (dst *DelUserPushTokenResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelUserPushTokenResp.Merge(dst, src) +} +func (m *DelUserPushTokenResp) XXX_Size() int { + return xxx_messageInfo_DelUserPushTokenResp.Size(m) +} +func (m *DelUserPushTokenResp) XXX_DiscardUnknown() { + xxx_messageInfo_DelUserPushTokenResp.DiscardUnknown(m) +} + +var xxx_messageInfo_DelUserPushTokenResp proto.InternalMessageInfo + +func (m *DelUserPushTokenResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *DelUserPushTokenResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func init() { + proto.RegisterType((*PushMsgReq)(nil), "push.PushMsgReq") + proto.RegisterType((*PushMsgResp)(nil), "push.PushMsgResp") + proto.RegisterType((*DelUserPushTokenReq)(nil), "push.DelUserPushTokenReq") + proto.RegisterType((*DelUserPushTokenResp)(nil), "push.DelUserPushTokenResp") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConnInterface +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 +const _ = grpc.SupportPackageIsVersion4 + +// Client API for PushMsgService service -// PushMsgServiceClient is the client API for PushMsgService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type PushMsgServiceClient interface { PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgResp, error) + DelUserPushToken(ctx context.Context, in *DelUserPushTokenReq, opts ...grpc.CallOption) (*DelUserPushTokenResp, error) } type pushMsgServiceClient struct { - cc grpc.ClientConnInterface + cc *grpc.ClientConn } -func NewPushMsgServiceClient(cc grpc.ClientConnInterface) PushMsgServiceClient { +func NewPushMsgServiceClient(cc *grpc.ClientConn) PushMsgServiceClient { return &pushMsgServiceClient{cc} } func (c *pushMsgServiceClient) PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgResp, error) { out := new(PushMsgResp) - err := c.cc.Invoke(ctx, "/push.PushMsgService/PushMsg", in, out, opts...) + err := grpc.Invoke(ctx, "/push.PushMsgService/PushMsg", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -// PushMsgServiceServer is the server API for PushMsgService service. +func (c *pushMsgServiceClient) DelUserPushToken(ctx context.Context, in *DelUserPushTokenReq, opts ...grpc.CallOption) (*DelUserPushTokenResp, error) { + out := new(DelUserPushTokenResp) + err := grpc.Invoke(ctx, "/push.PushMsgService/DelUserPushToken", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for PushMsgService service + type PushMsgServiceServer interface { PushMsg(context.Context, *PushMsgReq) (*PushMsgResp, error) -} - -// UnimplementedPushMsgServiceServer can be embedded to have forward compatible implementations. -type UnimplementedPushMsgServiceServer struct { -} - -func (*UnimplementedPushMsgServiceServer) PushMsg(context.Context, *PushMsgReq) (*PushMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushMsg not implemented") + DelUserPushToken(context.Context, *DelUserPushTokenReq) (*DelUserPushTokenResp, error) } func RegisterPushMsgServiceServer(s *grpc.Server, srv PushMsgServiceServer) { @@ -310,6 +293,24 @@ func _PushMsgService_PushMsg_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _PushMsgService_DelUserPushToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DelUserPushTokenReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PushMsgServiceServer).DelUserPushToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/push.PushMsgService/DelUserPushToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PushMsgServiceServer).DelUserPushToken(ctx, req.(*DelUserPushTokenReq)) + } + return interceptor(ctx, in, info, handler) +} + var _PushMsgService_serviceDesc = grpc.ServiceDesc{ ServiceName: "push.PushMsgService", HandlerType: (*PushMsgServiceServer)(nil), @@ -318,7 +319,39 @@ var _PushMsgService_serviceDesc = grpc.ServiceDesc{ MethodName: "PushMsg", Handler: _PushMsgService_PushMsg_Handler, }, + { + MethodName: "DelUserPushToken", + Handler: _PushMsgService_DelUserPushToken_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "push/push.proto", } + +func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_17f752d1b1c8edd5) } + +var fileDescriptor_push_17f752d1b1c8edd5 = []byte{ + // 342 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4f, 0x4b, 0xfb, 0x40, + 0x10, 0x25, 0xfd, 0xfd, 0xda, 0xe2, 0x54, 0xb4, 0xae, 0x22, 0x31, 0xa0, 0x96, 0x9c, 0x7a, 0x69, + 0x02, 0xd5, 0x9b, 0x37, 0xcd, 0xc1, 0x1c, 0x82, 0x25, 0xea, 0xc5, 0x4b, 0xd8, 0xda, 0x35, 0x2d, + 0xfd, 0xb3, 0xe3, 0x4e, 0x62, 0xbf, 0x82, 0xe0, 0x97, 0x96, 0xdd, 0x24, 0x1a, 0xab, 0x82, 0x97, + 0x65, 0xe7, 0xcd, 0xdb, 0x79, 0x6f, 0x76, 0x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0xb9, + 0xac, 0x42, 0xad, 0x24, 0x94, 0x8a, 0x28, 0xad, 0x94, 0x8a, 0x68, 0xf8, 0x66, 0xc1, 0x4e, 0xd9, + 0xaa, 0x1e, 0xd0, 0xec, 0x51, 0x30, 0x0f, 0xda, 0x25, 0xc2, 0xba, 0x9e, 0x99, 0xe7, 0xe7, 0x54, + 0x9c, 0xbd, 0x0d, 0x84, 0x90, 0x85, 0xd0, 0xdd, 0x34, 0xc3, 0x8e, 0x0a, 0xda, 0x0f, 0xbf, 0xe2, + 0x38, 0xbf, 0xa5, 0x08, 0x2f, 0x4f, 0x1f, 0x8e, 0xf5, 0xba, 0x24, 0x61, 0x54, 0xdb, 0x13, 0x4d, + 0xbf, 0xc0, 0xb1, 0x66, 0x8e, 0x5b, 0x06, 0x3a, 0x7b, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x44, + 0x0e, 0xd2, 0x6d, 0x02, 0x00, 0x00, +} diff --git a/pkg/proto/push/push.proto b/pkg/proto/push/push.proto index ce46692df..d9f864510 100644 --- a/pkg/proto/push/push.proto +++ b/pkg/proto/push/push.proto @@ -11,6 +11,16 @@ message PushMsgReq { message PushMsgResp{ int32 ResultCode = 1; } +message DelUserPushTokenReq{ + string operationID = 1; + string userID =2; + int32 platformID = 3; +} +message DelUserPushTokenResp{ + int32 errCode = 1; + string errMsg = 2; +} + //message InternalPushMsgReq{ // int32 ReqIdentifier = 1; // string Token = 2; @@ -33,6 +43,7 @@ message PushMsgResp{ service PushMsgService { rpc PushMsg(PushMsgReq) returns(PushMsgResp); + rpc DelUserPushToken(DelUserPushTokenReq) returns(DelUserPushTokenResp); // rpc InternalPushMsg(InternalPushMsgReq)returns(PushMsgResp); } From 2610a2789478aa3036a7d17711c069ba48bd1583 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 28 Oct 2022 15:42:37 +0800 Subject: [PATCH 04/32] add birthStr field --- internal/rpc/auth/auth.go | 9 +- internal/rpc/user/user.go | 17 +- pkg/base_info/public_struct.go | 1 + .../mysql_model/im_mysql_model/user_model.go | 9 +- pkg/common/utils/utils.go | 5 +- pkg/proto/sdk_ws/ws.pb.go | 653 +++++++++--------- pkg/proto/sdk_ws/ws.proto | 2 + pkg/utils/time_format.go | 4 + 8 files changed, 367 insertions(+), 333 deletions(-) diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index dfa7f47cc..5e929fd4e 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -28,8 +28,13 @@ func (rpc *rpcAuth) UserRegister(_ context.Context, req *pbAuth.UserRegisterReq) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String()) var user db.User utils.CopyStructFields(&user, req.UserInfo) - if req.UserInfo.Birth != 0 { - user.Birth = utils.UnixSecondToTime(int64(req.UserInfo.Birth)) + if req.UserInfo.BirthStr != "" { + time, err := utils.TimeStringToTime(req.UserInfo.BirthStr) + if err != nil { + log.NewError(req.OperationID, "TimeStringToTime failed ", err.Error(), req.UserInfo.BirthStr) + return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: "TimeStringToTime failed:" + err.Error()}}, nil + } + user.Birth = time } log.Debug(req.OperationID, "copy ", user, req.UserInfo) err := imdb.UserRegister(user) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 80bf1ca89..27db600ec 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -125,7 +125,6 @@ func syncPeerUserConversation(conversation *pbConversation.Conversation, operati func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq) (*pbUser.GetUserInfoResp, error) { log.NewInfo(req.OperationID, "GetUserInfo args ", req.String()) - var userInfoList []*sdkws.UserInfo if len(req.UserIDList) > 0 { for _, userID := range req.UserIDList { @@ -136,7 +135,7 @@ func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq continue } utils.CopyStructFields(&userInfo, user) - userInfo.Birth = uint32(user.Birth.Unix()) + userInfo.BirthStr = utils.TimeToString(user.Birth) userInfoList = append(userInfoList, &userInfo) } } else { @@ -411,8 +410,14 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI } var user db.User utils.CopyStructFields(&user, req.UserInfo) - if req.UserInfo.Birth != 0 { - user.Birth = utils.UnixSecondToTime(int64(req.UserInfo.Birth)) + + if req.UserInfo.BirthStr != "" { + time, err := utils.TimeStringToTime(req.UserInfo.BirthStr) + if err != nil { + log.NewError(req.OperationID, "TimeStringToTime failed ", err.Error(), req.UserInfo.BirthStr) + return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: "TimeStringToTime failed:" + err.Error()}}, nil + } + user.Birth = time } err := imdb.UpdateUserInfo(user) @@ -600,7 +605,7 @@ func (s *userServer) GetUsers(ctx context.Context, req *pbUser.GetUsersReq) (*pb var user sdkws.UserInfo utils.CopyStructFields(&user, userDB) user.CreateTime = uint32(userDB.CreateTime.Unix()) - user.Birth = uint32(userDB.Birth.Unix()) + user.BirthStr = utils.TimeToString(userDB.Birth) resp.UserList = append(resp.UserList, &pbUser.CmsUser{User: &user}) } @@ -628,7 +633,7 @@ func (s *userServer) GetUsers(ctx context.Context, req *pbUser.GetUsersReq) (*pb func (s *userServer) AddUser(ctx context.Context, req *pbUser.AddUserReq) (*pbUser.AddUserResp, error) { log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) resp := &pbUser.AddUserResp{CommonResp: &pbUser.CommonResp{}} - err := imdb.AddUser(req.UserInfo.UserID, req.UserInfo.PhoneNumber, req.UserInfo.Nickname, req.UserInfo.Email, req.UserInfo.Gender, req.UserInfo.FaceURL, req.UserInfo.Birth) + err := imdb.AddUser(req.UserInfo.UserID, req.UserInfo.PhoneNumber, req.UserInfo.Nickname, req.UserInfo.Email, req.UserInfo.Gender, req.UserInfo.FaceURL, req.UserInfo.BirthStr) if err != nil { log.NewError(req.OperationID, utils.GetSelfFuncName(), "AddUser", err.Error(), req.String()) resp.CommonResp.ErrCode = constant.ErrDB.ErrCode diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go index b3b918b45..ba7195d62 100644 --- a/pkg/base_info/public_struct.go +++ b/pkg/base_info/public_struct.go @@ -17,6 +17,7 @@ type ApiUserInfo struct { CreateTime int64 `json:"createTime"` LoginLimit int32 `json:"loginLimit" binding:"omitempty"` Ex string `json:"ex" binding:"omitempty,max=1024"` + BirthStr string `json:"birthStr" binding:"omitempty"` } //type Conversation struct { diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 8cb6803a7..37dcf4034 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -7,7 +7,6 @@ import ( "Open_IM/pkg/utils" "errors" "fmt" - "strconv" "time" ) @@ -116,10 +115,10 @@ func GetUsers(showNumber, pageNumber int32) ([]db.User, error) { return users, err } -func AddUser(userID string, phoneNumber string, name string, email string, gender int32, faceURL string, birth uint32) error { - _birth, _err := time.ParseInLocation("2006-01-02", strconv.Itoa(int(birth)), time.Local) - if _err != nil { - _birth = time.Now() +func AddUser(userID string, phoneNumber string, name string, email string, gender int32, faceURL string, birth string) error { + _birth, err := utils.TimeStringToTime(birth) + if err != nil { + return err } user := db.User{ UserID: userID, diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index e437203ce..00c86c454 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -146,14 +146,15 @@ func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src *db.GroupReques func UserOpenIMCopyDB(dst *db.User, src *open_im_sdk.UserInfo) { utils.CopyStructFields(dst, src) - dst.Birth = utils.UnixSecondToTime(int64(src.Birth)) + dst.Birth, _ = utils.TimeStringToTime(src.BirthStr) dst.CreateTime = utils.UnixSecondToTime(int64(src.CreateTime)) } func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src *db.User) { utils.CopyStructFields(dst, src) dst.CreateTime = uint32(src.CreateTime.Unix()) - dst.Birth = uint32(src.Birth.Unix()) + //dst.Birth = uint32(src.Birth.Unix()) + dst.BirthStr = utils.TimeToString(src.Birth) } func UserDBCopyOpenIMPublicUser(dst *open_im_sdk.PublicUserInfo, src *db.User) { diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 5cb5d1a81..4303f5d56 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -46,7 +46,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{0} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -204,7 +204,7 @@ func (m *GroupInfoForSet) Reset() { *m = GroupInfoForSet{} } func (m *GroupInfoForSet) String() string { return proto.CompactTextString(m) } func (*GroupInfoForSet) ProtoMessage() {} func (*GroupInfoForSet) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{1} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{1} } func (m *GroupInfoForSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoForSet.Unmarshal(m, b) @@ -309,7 +309,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{2} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{2} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -428,7 +428,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{3} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{3} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -495,6 +495,7 @@ type UserInfo struct { CreateTime uint32 `protobuf:"varint,9,opt,name=createTime" json:"createTime,omitempty"` AppMangerLevel int32 `protobuf:"varint,10,opt,name=appMangerLevel" json:"appMangerLevel,omitempty"` GlobalRecvMsgOpt int32 `protobuf:"varint,11,opt,name=globalRecvMsgOpt" json:"globalRecvMsgOpt,omitempty"` + BirthStr string `protobuf:"bytes,12,opt,name=birthStr" json:"birthStr,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -504,7 +505,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{4} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{4} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -601,6 +602,13 @@ func (m *UserInfo) GetGlobalRecvMsgOpt() int32 { return 0 } +func (m *UserInfo) GetBirthStr() string { + if m != nil { + return m.BirthStr + } + return "" +} + type FriendInfo struct { OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"` Remark string `protobuf:"bytes,2,opt,name=remark" json:"remark,omitempty"` @@ -618,7 +626,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{5} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{5} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -703,7 +711,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{6} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{6} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -786,7 +794,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{7} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{7} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -908,7 +916,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{8} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{8} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -1053,7 +1061,7 @@ func (m *Department) Reset() { *m = Department{} } func (m *Department) String() string { return proto.CompactTextString(m) } func (*Department) ProtoMessage() {} func (*Department) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{9} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{9} } func (m *Department) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Department.Unmarshal(m, b) @@ -1155,6 +1163,7 @@ type OrganizationUser struct { Email string `protobuf:"bytes,9,opt,name=email" json:"email,omitempty"` CreateTime uint32 `protobuf:"varint,10,opt,name=createTime" json:"createTime,omitempty"` Ex string `protobuf:"bytes,11,opt,name=ex" json:"ex,omitempty"` + BirthStr string `protobuf:"bytes,12,opt,name=birthStr" json:"birthStr,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1164,7 +1173,7 @@ func (m *OrganizationUser) Reset() { *m = OrganizationUser{} } func (m *OrganizationUser) String() string { return proto.CompactTextString(m) } func (*OrganizationUser) ProtoMessage() {} func (*OrganizationUser) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{10} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{10} } func (m *OrganizationUser) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OrganizationUser.Unmarshal(m, b) @@ -1261,6 +1270,13 @@ func (m *OrganizationUser) GetEx() string { return "" } +func (m *OrganizationUser) GetBirthStr() string { + if m != nil { + return m.BirthStr + } + return "" +} + type DepartmentMember struct { UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` DepartmentID string `protobuf:"bytes,2,opt,name=departmentID" json:"departmentID,omitempty"` @@ -1278,7 +1294,7 @@ func (m *DepartmentMember) Reset() { *m = DepartmentMember{} } func (m *DepartmentMember) String() string { return proto.CompactTextString(m) } func (*DepartmentMember) ProtoMessage() {} func (*DepartmentMember) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{11} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{11} } func (m *DepartmentMember) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DepartmentMember.Unmarshal(m, b) @@ -1359,7 +1375,7 @@ func (m *UserDepartmentMember) Reset() { *m = UserDepartmentMember{} } func (m *UserDepartmentMember) String() string { return proto.CompactTextString(m) } func (*UserDepartmentMember) ProtoMessage() {} func (*UserDepartmentMember) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{12} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{12} } func (m *UserDepartmentMember) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserDepartmentMember.Unmarshal(m, b) @@ -1405,7 +1421,7 @@ func (m *UserInDepartment) Reset() { *m = UserInDepartment{} } func (m *UserInDepartment) String() string { return proto.CompactTextString(m) } func (*UserInDepartment) ProtoMessage() {} func (*UserInDepartment) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{13} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{13} } func (m *UserInDepartment) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInDepartment.Unmarshal(m, b) @@ -1454,7 +1470,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{14} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{14} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -1513,7 +1529,7 @@ func (m *SeqList) Reset() { *m = SeqList{} } func (m *SeqList) String() string { return proto.CompactTextString(m) } func (*SeqList) ProtoMessage() {} func (*SeqList) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{15} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{15} } func (m *SeqList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SeqList.Unmarshal(m, b) @@ -1551,7 +1567,7 @@ func (m *MsgDataList) Reset() { *m = MsgDataList{} } func (m *MsgDataList) String() string { return proto.CompactTextString(m) } func (*MsgDataList) ProtoMessage() {} func (*MsgDataList) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{16} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{16} } func (m *MsgDataList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataList.Unmarshal(m, b) @@ -1592,7 +1608,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{17} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{17} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -1653,7 +1669,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{18} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{18} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1706,7 +1722,7 @@ func (m *MaxAndMinSeq) Reset() { *m = MaxAndMinSeq{} } func (m *MaxAndMinSeq) String() string { return proto.CompactTextString(m) } func (*MaxAndMinSeq) ProtoMessage() {} func (*MaxAndMinSeq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{19} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{19} } func (m *MaxAndMinSeq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MaxAndMinSeq.Unmarshal(m, b) @@ -1755,7 +1771,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{20} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{20} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1823,7 +1839,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{21} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{21} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1896,7 +1912,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{22} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{22} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -2085,7 +2101,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{23} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{23} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -2153,7 +2169,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{24} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{24} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -2210,7 +2226,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{25} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{25} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -2279,7 +2295,7 @@ func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} } func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoSetTips) ProtoMessage() {} func (*GroupInfoSetTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{26} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{26} } func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b) @@ -2334,7 +2350,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{27} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{27} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -2390,7 +2406,7 @@ func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} } func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) } func (*MemberQuitTips) ProtoMessage() {} func (*MemberQuitTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{28} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{28} } func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b) @@ -2445,7 +2461,7 @@ func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAc func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationAcceptedTips) ProtoMessage() {} func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{29} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{29} } func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b) @@ -2500,7 +2516,7 @@ func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRe func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationRejectedTips) ProtoMessage() {} func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{30} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{30} } func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b) @@ -2556,7 +2572,7 @@ func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferred func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) } func (*GroupOwnerTransferredTips) ProtoMessage() {} func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{31} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{31} } func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b) @@ -2619,7 +2635,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{32} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{32} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -2682,7 +2698,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{33} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{33} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -2744,7 +2760,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{34} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{34} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -2798,7 +2814,7 @@ func (m *GroupDismissedTips) Reset() { *m = GroupDismissedTips{} } func (m *GroupDismissedTips) String() string { return proto.CompactTextString(m) } func (*GroupDismissedTips) ProtoMessage() {} func (*GroupDismissedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{35} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{35} } func (m *GroupDismissedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupDismissedTips.Unmarshal(m, b) @@ -2854,7 +2870,7 @@ func (m *GroupMemberMutedTips) Reset() { *m = GroupMemberMutedTips{} } func (m *GroupMemberMutedTips) String() string { return proto.CompactTextString(m) } func (*GroupMemberMutedTips) ProtoMessage() {} func (*GroupMemberMutedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{36} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{36} } func (m *GroupMemberMutedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberMutedTips.Unmarshal(m, b) @@ -2923,7 +2939,7 @@ func (m *GroupMemberCancelMutedTips) Reset() { *m = GroupMemberCancelMut func (m *GroupMemberCancelMutedTips) String() string { return proto.CompactTextString(m) } func (*GroupMemberCancelMutedTips) ProtoMessage() {} func (*GroupMemberCancelMutedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{37} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{37} } func (m *GroupMemberCancelMutedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberCancelMutedTips.Unmarshal(m, b) @@ -2984,7 +3000,7 @@ func (m *GroupMutedTips) Reset() { *m = GroupMutedTips{} } func (m *GroupMutedTips) String() string { return proto.CompactTextString(m) } func (*GroupMutedTips) ProtoMessage() {} func (*GroupMutedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{38} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{38} } func (m *GroupMutedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMutedTips.Unmarshal(m, b) @@ -3038,7 +3054,7 @@ func (m *GroupCancelMutedTips) Reset() { *m = GroupCancelMutedTips{} } func (m *GroupCancelMutedTips) String() string { return proto.CompactTextString(m) } func (*GroupCancelMutedTips) ProtoMessage() {} func (*GroupCancelMutedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{39} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{39} } func (m *GroupCancelMutedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCancelMutedTips.Unmarshal(m, b) @@ -3093,7 +3109,7 @@ func (m *GroupMemberInfoSetTips) Reset() { *m = GroupMemberInfoSetTips{} func (m *GroupMemberInfoSetTips) String() string { return proto.CompactTextString(m) } func (*GroupMemberInfoSetTips) ProtoMessage() {} func (*GroupMemberInfoSetTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{40} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{40} } func (m *GroupMemberInfoSetTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberInfoSetTips.Unmarshal(m, b) @@ -3153,7 +3169,7 @@ func (m *OrganizationChangedTips) Reset() { *m = OrganizationChangedTips func (m *OrganizationChangedTips) String() string { return proto.CompactTextString(m) } func (*OrganizationChangedTips) ProtoMessage() {} func (*OrganizationChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{41} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{41} } func (m *OrganizationChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OrganizationChangedTips.Unmarshal(m, b) @@ -3200,7 +3216,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{42} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{42} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -3253,7 +3269,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{43} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{43} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -3299,7 +3315,7 @@ func (m *FriendApplicationTips) Reset() { *m = FriendApplicationTips{} } func (m *FriendApplicationTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationTips) ProtoMessage() {} func (*FriendApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{44} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{44} } func (m *FriendApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationTips.Unmarshal(m, b) @@ -3339,7 +3355,7 @@ func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplication func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationApprovedTips) ProtoMessage() {} func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{45} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{45} } func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b) @@ -3386,7 +3402,7 @@ func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplication func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationRejectedTips) ProtoMessage() {} func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{46} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{46} } func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b) @@ -3434,7 +3450,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{47} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{47} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -3487,7 +3503,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{48} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{48} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -3525,7 +3541,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{49} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{49} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -3563,7 +3579,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{50} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{50} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -3601,7 +3617,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{51} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{51} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -3640,7 +3656,7 @@ func (m *UserInfoUpdatedTips) Reset() { *m = UserInfoUpdatedTips{} } func (m *UserInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*UserInfoUpdatedTips) ProtoMessage() {} func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{52} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{52} } func (m *UserInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfoUpdatedTips.Unmarshal(m, b) @@ -3681,7 +3697,7 @@ func (m *ConversationUpdateTips) Reset() { *m = ConversationUpdateTips{} func (m *ConversationUpdateTips) String() string { return proto.CompactTextString(m) } func (*ConversationUpdateTips) ProtoMessage() {} func (*ConversationUpdateTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{53} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{53} } func (m *ConversationUpdateTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConversationUpdateTips.Unmarshal(m, b) @@ -3735,7 +3751,7 @@ func (m *ConversationSetPrivateTips) Reset() { *m = ConversationSetPriva func (m *ConversationSetPrivateTips) String() string { return proto.CompactTextString(m) } func (*ConversationSetPrivateTips) ProtoMessage() {} func (*ConversationSetPrivateTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{54} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{54} } func (m *ConversationSetPrivateTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConversationSetPrivateTips.Unmarshal(m, b) @@ -3790,7 +3806,7 @@ func (m *DeleteMessageTips) Reset() { *m = DeleteMessageTips{} } func (m *DeleteMessageTips) String() string { return proto.CompactTextString(m) } func (*DeleteMessageTips) ProtoMessage() {} func (*DeleteMessageTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{55} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{55} } func (m *DeleteMessageTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteMessageTips.Unmarshal(m, b) @@ -3844,7 +3860,7 @@ func (m *RequestPagination) Reset() { *m = RequestPagination{} } func (m *RequestPagination) String() string { return proto.CompactTextString(m) } func (*RequestPagination) ProtoMessage() {} func (*RequestPagination) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{56} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{56} } func (m *RequestPagination) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RequestPagination.Unmarshal(m, b) @@ -3890,7 +3906,7 @@ func (m *ResponsePagination) Reset() { *m = ResponsePagination{} } func (m *ResponsePagination) String() string { return proto.CompactTextString(m) } func (*ResponsePagination) ProtoMessage() {} func (*ResponsePagination) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{57} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{57} } func (m *ResponsePagination) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ResponsePagination.Unmarshal(m, b) @@ -3947,7 +3963,7 @@ func (m *SignalReq) Reset() { *m = SignalReq{} } func (m *SignalReq) String() string { return proto.CompactTextString(m) } func (*SignalReq) ProtoMessage() {} func (*SignalReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{58} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{58} } func (m *SignalReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalReq.Unmarshal(m, b) @@ -4336,7 +4352,7 @@ func (m *SignalResp) Reset() { *m = SignalResp{} } func (m *SignalResp) String() string { return proto.CompactTextString(m) } func (*SignalResp) ProtoMessage() {} func (*SignalResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{59} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{59} } func (m *SignalResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalResp.Unmarshal(m, b) @@ -4666,7 +4682,7 @@ func (m *InvitationInfo) Reset() { *m = InvitationInfo{} } func (m *InvitationInfo) String() string { return proto.CompactTextString(m) } func (*InvitationInfo) ProtoMessage() {} func (*InvitationInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{60} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{60} } func (m *InvitationInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InvitationInfo.Unmarshal(m, b) @@ -4776,7 +4792,7 @@ func (m *ParticipantMetaData) Reset() { *m = ParticipantMetaData{} } func (m *ParticipantMetaData) String() string { return proto.CompactTextString(m) } func (*ParticipantMetaData) ProtoMessage() {} func (*ParticipantMetaData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{61} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{61} } func (m *ParticipantMetaData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ParticipantMetaData.Unmarshal(m, b) @@ -4831,7 +4847,7 @@ func (m *SignalInviteReq) Reset() { *m = SignalInviteReq{} } func (m *SignalInviteReq) String() string { return proto.CompactTextString(m) } func (*SignalInviteReq) ProtoMessage() {} func (*SignalInviteReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{62} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{62} } func (m *SignalInviteReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalInviteReq.Unmarshal(m, b) @@ -4893,7 +4909,7 @@ func (m *SignalInviteReply) Reset() { *m = SignalInviteReply{} } func (m *SignalInviteReply) String() string { return proto.CompactTextString(m) } func (*SignalInviteReply) ProtoMessage() {} func (*SignalInviteReply) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{63} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{63} } func (m *SignalInviteReply) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalInviteReply.Unmarshal(m, b) @@ -4955,7 +4971,7 @@ func (m *SignalInviteInGroupReq) Reset() { *m = SignalInviteInGroupReq{} func (m *SignalInviteInGroupReq) String() string { return proto.CompactTextString(m) } func (*SignalInviteInGroupReq) ProtoMessage() {} func (*SignalInviteInGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{64} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{64} } func (m *SignalInviteInGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalInviteInGroupReq.Unmarshal(m, b) @@ -5017,7 +5033,7 @@ func (m *SignalInviteInGroupReply) Reset() { *m = SignalInviteInGroupRep func (m *SignalInviteInGroupReply) String() string { return proto.CompactTextString(m) } func (*SignalInviteInGroupReply) ProtoMessage() {} func (*SignalInviteInGroupReply) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{65} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{65} } func (m *SignalInviteInGroupReply) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalInviteInGroupReply.Unmarshal(m, b) @@ -5079,7 +5095,7 @@ func (m *SignalCancelReq) Reset() { *m = SignalCancelReq{} } func (m *SignalCancelReq) String() string { return proto.CompactTextString(m) } func (*SignalCancelReq) ProtoMessage() {} func (*SignalCancelReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{66} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{66} } func (m *SignalCancelReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalCancelReq.Unmarshal(m, b) @@ -5137,7 +5153,7 @@ func (m *SignalCancelReply) Reset() { *m = SignalCancelReply{} } func (m *SignalCancelReply) String() string { return proto.CompactTextString(m) } func (*SignalCancelReply) ProtoMessage() {} func (*SignalCancelReply) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{67} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{67} } func (m *SignalCancelReply) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalCancelReply.Unmarshal(m, b) @@ -5172,7 +5188,7 @@ func (m *SignalAcceptReq) Reset() { *m = SignalAcceptReq{} } func (m *SignalAcceptReq) String() string { return proto.CompactTextString(m) } func (*SignalAcceptReq) ProtoMessage() {} func (*SignalAcceptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{68} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{68} } func (m *SignalAcceptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalAcceptReq.Unmarshal(m, b) @@ -5240,7 +5256,7 @@ func (m *SignalAcceptReply) Reset() { *m = SignalAcceptReply{} } func (m *SignalAcceptReply) String() string { return proto.CompactTextString(m) } func (*SignalAcceptReply) ProtoMessage() {} func (*SignalAcceptReply) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{69} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{69} } func (m *SignalAcceptReply) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalAcceptReply.Unmarshal(m, b) @@ -5294,7 +5310,7 @@ func (m *SignalHungUpReq) Reset() { *m = SignalHungUpReq{} } func (m *SignalHungUpReq) String() string { return proto.CompactTextString(m) } func (*SignalHungUpReq) ProtoMessage() {} func (*SignalHungUpReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{70} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{70} } func (m *SignalHungUpReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalHungUpReq.Unmarshal(m, b) @@ -5345,7 +5361,7 @@ func (m *SignalHungUpReply) Reset() { *m = SignalHungUpReply{} } func (m *SignalHungUpReply) String() string { return proto.CompactTextString(m) } func (*SignalHungUpReply) ProtoMessage() {} func (*SignalHungUpReply) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{71} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{71} } func (m *SignalHungUpReply) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalHungUpReply.Unmarshal(m, b) @@ -5380,7 +5396,7 @@ func (m *SignalRejectReq) Reset() { *m = SignalRejectReq{} } func (m *SignalRejectReq) String() string { return proto.CompactTextString(m) } func (*SignalRejectReq) ProtoMessage() {} func (*SignalRejectReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{72} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{72} } func (m *SignalRejectReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalRejectReq.Unmarshal(m, b) @@ -5445,7 +5461,7 @@ func (m *SignalRejectReply) Reset() { *m = SignalRejectReply{} } func (m *SignalRejectReply) String() string { return proto.CompactTextString(m) } func (*SignalRejectReply) ProtoMessage() {} func (*SignalRejectReply) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{73} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{73} } func (m *SignalRejectReply) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalRejectReply.Unmarshal(m, b) @@ -5478,7 +5494,7 @@ func (m *SignalGetRoomByGroupIDReq) Reset() { *m = SignalGetRoomByGroupI func (m *SignalGetRoomByGroupIDReq) String() string { return proto.CompactTextString(m) } func (*SignalGetRoomByGroupIDReq) ProtoMessage() {} func (*SignalGetRoomByGroupIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{74} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{74} } func (m *SignalGetRoomByGroupIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalGetRoomByGroupIDReq.Unmarshal(m, b) @@ -5532,7 +5548,7 @@ func (m *SignalGetRoomByGroupIDReply) Reset() { *m = SignalGetRoomByGrou func (m *SignalGetRoomByGroupIDReply) String() string { return proto.CompactTextString(m) } func (*SignalGetRoomByGroupIDReply) ProtoMessage() {} func (*SignalGetRoomByGroupIDReply) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{75} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{75} } func (m *SignalGetRoomByGroupIDReply) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalGetRoomByGroupIDReply.Unmarshal(m, b) @@ -5586,7 +5602,7 @@ func (m *SignalOnRoomParticipantConnectedReq) Reset() { *m = SignalOnRoo func (m *SignalOnRoomParticipantConnectedReq) String() string { return proto.CompactTextString(m) } func (*SignalOnRoomParticipantConnectedReq) ProtoMessage() {} func (*SignalOnRoomParticipantConnectedReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{76} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{76} } func (m *SignalOnRoomParticipantConnectedReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalOnRoomParticipantConnectedReq.Unmarshal(m, b) @@ -5642,7 +5658,7 @@ func (m *SignalOnRoomParticipantDisconnectedReq) Reset() { func (m *SignalOnRoomParticipantDisconnectedReq) String() string { return proto.CompactTextString(m) } func (*SignalOnRoomParticipantDisconnectedReq) ProtoMessage() {} func (*SignalOnRoomParticipantDisconnectedReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{77} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{77} } func (m *SignalOnRoomParticipantDisconnectedReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalOnRoomParticipantDisconnectedReq.Unmarshal(m, b) @@ -5697,7 +5713,7 @@ func (m *SignalGetTokenByRoomIDReq) Reset() { *m = SignalGetTokenByRoomI func (m *SignalGetTokenByRoomIDReq) String() string { return proto.CompactTextString(m) } func (*SignalGetTokenByRoomIDReq) ProtoMessage() {} func (*SignalGetTokenByRoomIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{78} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{78} } func (m *SignalGetTokenByRoomIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalGetTokenByRoomIDReq.Unmarshal(m, b) @@ -5757,7 +5773,7 @@ func (m *SignalGetTokenByRoomIDReply) Reset() { *m = SignalGetTokenByRoo func (m *SignalGetTokenByRoomIDReply) String() string { return proto.CompactTextString(m) } func (*SignalGetTokenByRoomIDReply) ProtoMessage() {} func (*SignalGetTokenByRoomIDReply) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{79} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{79} } func (m *SignalGetTokenByRoomIDReply) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalGetTokenByRoomIDReply.Unmarshal(m, b) @@ -5805,7 +5821,7 @@ func (m *DelMsgListReq) Reset() { *m = DelMsgListReq{} } func (m *DelMsgListReq) String() string { return proto.CompactTextString(m) } func (*DelMsgListReq) ProtoMessage() {} func (*DelMsgListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{80} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{80} } func (m *DelMsgListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DelMsgListReq.Unmarshal(m, b) @@ -5865,7 +5881,7 @@ func (m *DelMsgListResp) Reset() { *m = DelMsgListResp{} } func (m *DelMsgListResp) String() string { return proto.CompactTextString(m) } func (*DelMsgListResp) ProtoMessage() {} func (*DelMsgListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e432db7a8e0b4bb9, []int{81} + return fileDescriptor_ws_a86e2552dd17ddaa, []int{81} } func (m *DelMsgListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DelMsgListResp.Unmarshal(m, b) @@ -5988,247 +6004,248 @@ func init() { proto.RegisterType((*DelMsgListResp)(nil), "server_api_params.DelMsgListResp") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_e432db7a8e0b4bb9) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_a86e2552dd17ddaa) } -var fileDescriptor_ws_e432db7a8e0b4bb9 = []byte{ - // 3820 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3c, 0xdd, 0x6f, 0x1c, 0x57, - 0xf5, 0x9d, 0x59, 0xef, 0xda, 0x7b, 0xd6, 0x1f, 0xeb, 0x49, 0xe2, 0x6e, 0xdd, 0x34, 0x3f, 0xff, - 0xa6, 0x51, 0x7e, 0xfd, 0x85, 0xd4, 0x41, 0xe9, 0x87, 0xe8, 0x57, 0x50, 0x6c, 0x37, 0x8e, 0xdb, - 0x6c, 0xec, 0xce, 0x26, 0x2d, 0x6a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, 0xcc, 0x43, 0x98, 0x82, 0x09, 0x98, 0xcd, 0xc9, - 0xad, 0x86, 0x81, 0x20, 0xe1, 0xa8, 0x8b, 0x11, 0x66, 0x0c, 0xb0, 0xd9, 0x12, 0x30, 0x85, 0x5e, - 0x4b, 0x5e, 0xac, 0xa1, 0xb0, 0x58, 0x17, 0x96, 0xd4, 0x46, 0xd9, 0x92, 0xfa, 0x97, 0x0a, 0xcc, - 0x60, 0x12, 0x26, 0xae, 0x39, 0x43, 0xb3, 0xc5, 0xeb, 0x4b, 0xb1, 0x28, 0x60, 0xa8, 0x2e, 0x14, - 0xba, 0x21, 0x2f, 0x6d, 0x12, 0x8e, 0x06, 0x34, 0x85, 0xaf, 0x4a, 0x4b, 0x9c, 0x88, 0x4a, 0x66, - 0x59, 0x17, 0x97, 0x3a, 0x01, 0x43, 0x17, 0xcf, 0xc8, 0x93, 0x62, 0x2c, 0x85, 0x29, 0x6d, 0xe4, - 0xa5, 0xf3, 0x63, 0x94, 0x09, 0x18, 0xea, 0xa5, 0xc8, 0x4b, 0xe6, 0x46, 0x53, 0x67, 0x08, 0xe4, - 0xcc, 0xe7, 0xc5, 0x12, 0x97, 0xc2, 0x85, 0xd8, 0xa8, 0x0f, 0x8d, 0x0d, 0x90, 0x62, 0x43, 0x4e, - 0xd1, 0x46, 0x21, 0x45, 0xcf, 0xc2, 0x0c, 0xf2, 0xc9, 0x95, 0x38, 0x09, 0x29, 0x47, 0xd8, 0x4c, - 0x3e, 0xc2, 0xe4, 0x18, 0x99, 0x1d, 0x10, 0x23, 0x73, 0x69, 0xde, 0xfd, 0x4c, 0x05, 0x58, 0x23, - 0xbe, 0x19, 0x44, 0x7d, 0xe2, 0x46, 0x54, 0x3d, 0x2b, 0x85, 0x52, 0xe7, 0x4a, 0x38, 0xb1, 0x32, - 0xa9, 0x72, 0x65, 0xd2, 0x60, 0x82, 0x19, 0x1c, 0xbd, 0xc9, 0xfe, 0xa6, 0xc6, 0xf4, 0xcd, 0x00, - 0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 0x0c, 0xd6, 0x2d, 0x98, 0xc3, 0x93, - 0xf6, 0xa3, 0x1a, 0x20, 0x4f, 0x3e, 0xa6, 0x05, 0x7e, 0xa1, 0xc0, 0x1c, 0x72, 0x7a, 0xd5, 0x8d, - 0x48, 0x70, 0x64, 0xfd, 0xaf, 0x41, 0x83, 0xb8, 0x51, 0x60, 0xba, 0x47, 0x59, 0x21, 0x45, 0xd2, - 0x31, 0x17, 0xc9, 0xf7, 0x15, 0xd0, 0x18, 0xab, 0x35, 0x3b, 0xec, 0xdb, 0x61, 0x78, 0x1f, 0x5d, - 0x37, 0x9e, 0xc0, 0xdf, 0x53, 0xe1, 0xa4, 0xc0, 0xa5, 0x1d, 0x47, 0x0f, 0xba, 0xc8, 0xda, 0x1a, - 0xd4, 0x69, 0x8f, 0x20, 0xde, 0x83, 0x8e, 0x3b, 0x51, 0x46, 0x48, 0xbb, 0x58, 0x06, 0x74, 0x48, - 0xd7, 0x73, 0xad, 0x90, 0x35, 0x47, 0x33, 0x86, 0x84, 0xa3, 0xcb, 0xd0, 0xa2, 0xc0, 0x66, 0xd5, - 0x74, 0xbb, 0xc4, 0x79, 0x68, 0x4c, 0xa4, 0xff, 0x58, 0x81, 0x59, 0x1c, 0xf2, 0xe0, 0xab, 0x4c, - 0x6b, 0x3d, 0x06, 0xf2, 0xc7, 0xc6, 0x4b, 0x34, 0xbc, 0x16, 0x04, 0x2e, 0x62, 0x5f, 0xfd, 0xe0, +var fileDescriptor_ws_a86e2552dd17ddaa = []byte{ + // 3837 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3c, 0x5b, 0x6f, 0x1d, 0x57, + 0xd5, 0x9d, 0x39, 0x3e, 0xc7, 0x3e, 0xeb, 0xf8, 0x72, 0x3c, 0x49, 0xdc, 0x53, 0x37, 0xcd, 0xe7, + 0x6f, 0x1a, 0xe5, 0xeb, 0x97, 0x2f, 0x75, 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9, 0xec, 0x5b, + 0x86, 0xd0, 0x74, 0x98, 0x76, 0xbd, 0xc8, 0xde, 0xb1, 0xbb, 0x66, 0x64, 0x7b, 0x6e, 0xab, 0xc2, + 0x06, 0x48, 0x38, 0x3a, 0xc6, 0x76, 0xa3, 0xc0, 0xb3, 0xe2, 0x2e, 0x1b, 0x33, 0x81, 0x63, 0x44, + 0x1c, 0x9d, 0x7f, 0xc7, 0xec, 0x92, 0x5b, 0xc6, 0xf5, 0x56, 0x15, 0xe7, 0xe7, 0xa0, 0xb6, 0x04, + 0x0d, 0xef, 0x8e, 0x4b, 0x82, 0x5b, 0x21, 0x09, 0x36, 0xd6, 0x5a, 0x35, 0xf6, 0x55, 0x44, 0x69, + 0x67, 0x00, 0xba, 0x01, 0x31, 0x23, 0x72, 0xd3, 0xee, 0x93, 0xd6, 0xe4, 0x92, 0xf2, 0xd4, 0x8c, + 0x21, 0x60, 0x28, 0x87, 0x3e, 0xe9, 0x6f, 0x93, 0x60, 0xd5, 0x8b, 0xdd, 0xa8, 0x35, 0xc5, 0x06, + 0x88, 0x28, 0x6d, 0x16, 0x54, 0x72, 0xb7, 0x55, 0x67, 0xac, 0x55, 0x72, 0x57, 0x5b, 0x80, 0x5a, + 0x18, 0x99, 0x51, 0x1c, 0xb6, 0x60, 0x49, 0x79, 0xaa, 0x6a, 0x70, 0x48, 0x3b, 0x0b, 0x33, 0x8c, + 0xaf, 0x97, 0x48, 0xd3, 0x60, 0x24, 0x32, 0x32, 0xb5, 0xd8, 0xcd, 0x43, 0x9f, 0xb4, 0xa6, 0x19, + 0x83, 0x0c, 0xa1, 0x9d, 0x87, 0xa6, 0x4b, 0x88, 0xf5, 0x26, 0x09, 0x32, 0xab, 0xcd, 0xb0, 0x41, + 0x05, 0xbc, 0x76, 0x0e, 0x66, 0x1d, 0xcf, 0xdb, 0x6b, 0x33, 0x51, 0xa9, 0x9f, 0x5a, 0xb3, 0x6c, + 0x64, 0x0e, 0xab, 0x5d, 0x80, 0x79, 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 0xaa, 0x67, 0xa5, 0x50, 0xea, 0x5c, 0x09, 0x27, 0xae, 0x5a, 0xaa, 0xbc, 0x6a, 0x69, 0x30, + 0xc1, 0x0c, 0x8e, 0xde, 0x64, 0x7f, 0x53, 0x63, 0xfa, 0x66, 0x80, 0xdc, 0x30, 0x55, 0x52, 0x98, + 0xae, 0x4a, 0x5e, 0x60, 0xf1, 0x75, 0xac, 0x6a, 0x20, 0x40, 0x4b, 0x48, 0x36, 0x1f, 0xdb, 0x05, + 0xd4, 0x70, 0x95, 0x91, 0xb1, 0x23, 0x37, 0x2e, 0xe7, 0xa1, 0x19, 0xc6, 0xdb, 0x99, 0x72, 0x37, + 0xe2, 0x3e, 0x4f, 0x9a, 0x02, 0x9e, 0x1a, 0x15, 0x77, 0x34, 0x74, 0x10, 0x2e, 0x7c, 0x19, 0x22, + 0xdf, 0xc9, 0xe8, 0xbf, 0x55, 0xa1, 0xb9, 0x19, 0xf4, 0x4c, 0xd7, 0xfe, 0x54, 0xda, 0xb1, 0x1f, + 0xa9, 0x01, 0x58, 0x82, 0x06, 0x71, 0x7b, 0x8e, 0x1d, 0xee, 0xde, 0xc8, 0xec, 0x26, 0xa2, 0x44, + 0x63, 0x4f, 0x0c, 0x6a, 0x11, 0xaa, 0x52, 0x8b, 0xb0, 0x00, 0xb5, 0xbe, 0xb7, 0x6d, 0x3b, 0x49, + 0xdc, 0x73, 0x88, 0xc5, 0x3c, 0x71, 0x08, 0xeb, 0x15, 0xd2, 0x98, 0x4f, 0x10, 0x59, 0xdb, 0x30, + 0x55, 0xda, 0x36, 0xd4, 0xc5, 0xb6, 0x41, 0x36, 0x3c, 0x14, 0x0c, 0x8f, 0xe6, 0x6a, 0xa4, 0x75, + 0x68, 0xd8, 0x12, 0xff, 0x2b, 0x05, 0x9a, 0x99, 0x2b, 0xb0, 0xa7, 0x1e, 0x68, 0xca, 0x7c, 0x74, + 0xaa, 0x25, 0xd1, 0x99, 0xc6, 0x54, 0x45, 0x8c, 0x29, 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2, 0xdb, 0x8a, 0x95, 0x0b, 0x6f, 0x9f, 0xdf, 0xf4, 0x89, 0x7b, + 0x7b, 0xa3, 0x5d, 0xf8, 0xdf, 0x27, 0x2f, 0x15, 0x9c, 0xb0, 0x5d, 0x63, 0xdf, 0x9f, 0xf9, 0x77, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xb6, 0x74, 0x2a, 0x5b, 0x45, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 76f133356..95d17fa6b 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -75,6 +75,7 @@ message UserInfo{ uint32 createTime = 9; int32 appMangerLevel = 10; int32 globalRecvMsgOpt = 11; + string birthStr = 12; } message FriendInfo{ @@ -157,6 +158,7 @@ message OrganizationUser { string email = 9; uint32 createTime = 10; string ex = 11; + string birthStr = 12; } message DepartmentMember { diff --git a/pkg/utils/time_format.go b/pkg/utils/time_format.go index c8f6e21fa..db1d3ac82 100644 --- a/pkg/utils/time_format.go +++ b/pkg/utils/time_format.go @@ -83,3 +83,7 @@ func TimeStringToTime(timeString string) (time.Time, error) { t, err := time.Parse("2006-01-02", timeString) return t, err } + +func TimeToString(t time.Time) string { + return t.Format("2006-01-02") +} From 9025d8bd90382fef688d004a1516182ced5bb27f Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 16:54:23 +0800 Subject: [PATCH 05/32] test cron --- internal/cron_task/clear_msg_test.go | 34 ++++++++++++++++++++++++++++ internal/cron_task/cron_task.go | 8 ++++--- pkg/common/db/mongoModel.go | 6 ++--- 3 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 internal/cron_task/clear_msg_test.go diff --git a/internal/cron_task/clear_msg_test.go b/internal/cron_task/clear_msg_test.go new file mode 100644 index 000000000..b1621c26d --- /dev/null +++ b/internal/cron_task/clear_msg_test.go @@ -0,0 +1,34 @@ +package cronTask + +import ( + "Open_IM/pkg/common/constant" + "Open_IM/pkg/common/log" + "Open_IM/pkg/utils" + "testing" +) + +func TestDeleteMongoMsgAndResetRedisSeq(t *testing.T) { + operationID := getCronTaskOperationID() + testUserIDList := []string{"test_del_id1", "test_del_id2", "test_del_id3", "test_del_id4", "test_del_id5"} + for _, userID := range testUserIDList { + operationID = userID + "-" + operationID + if err := DeleteMongoMsgAndResetRedisSeq(operationID, userID); err != nil { + t.Error("checkMaxSeqWithMongo failed", userID) + } + if err := checkMaxSeqWithMongo(operationID, userID, constant.WriteDiffusion); err != nil { + t.Error("checkMaxSeqWithMongo failed", userID) + } + } + + testWorkingGroupIDList := []string{"test_del_id1", "test_del_id2", "test_del_id3", "test_del_id4", "test_del_id5"} + for _, groupID := range testWorkingGroupIDList { + operationID = groupID + "-" + operationID + log.NewDebug(operationID, utils.GetSelfFuncName(), "groupID:", groupID, "userIDList:", testUserIDList) + if err := ResetUserGroupMinSeq(operationID, groupID, testUserIDList); err != nil { + t.Error("checkMaxSeqWithMongo failed", groupID) + } + if err := checkMaxSeqWithMongo(operationID, groupID, constant.ReadDiffusion); err != nil { + t.Error("checkMaxSeqWithMongo failed", groupID) + } + } +} diff --git a/internal/cron_task/cron_task.go b/internal/cron_task/cron_task.go index 59a06fef1..62543e4e4 100644 --- a/internal/cron_task/cron_task.go +++ b/internal/cron_task/cron_task.go @@ -20,6 +20,7 @@ func StartCronTask() { c := cron.New() fmt.Println("config", config.Config.Mongo.ChatRecordsClearTime) _, err := c.AddFunc(config.Config.Mongo.ChatRecordsClearTime, func() { + // user msg clear operationID := getCronTaskOperationID() log.NewInfo(operationID, "====================== start del cron task ======================") userIDList, err := im_mysql_model.SelectAllUserID() @@ -37,8 +38,10 @@ func StartCronTask() { log.NewError(operationID, utils.GetSelfFuncName(), err.Error()) } + // working group msg clear workingGroupIDList, err := im_mysql_model.GetGroupIDListByGroupType(constant.WorkingGroup) if err == nil { + log.NewDebug(operationID, utils.GetSelfFuncName(), "workingGroupIDList: ", workingGroupIDList) for _, groupID := range workingGroupIDList { userIDList, err = rocksCache.GetGroupMemberIDListFromCache(groupID) if err != nil { @@ -55,20 +58,19 @@ func StartCronTask() { } } else { log.NewError(operationID, utils.GetSelfFuncName(), err.Error()) - return } log.NewInfo(operationID, "====================== start del cron finished ======================") }) if err != nil { - fmt.Println("start cron failed", err.Error()) + fmt.Println("start cron failed", err.Error(), config.Config.Mongo.ChatRecordsClearTime) panic(err) } c.Start() fmt.Println("start cron task success") for { - time.Sleep(time.Second) + time.Sleep(10 * time.Second) } } diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 8695bca35..2234e0306 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -264,17 +264,17 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat) regex := fmt.Sprintf("^%s", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) - var msgs []UserChat + var msgs []*UserChat cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": regex}}, findOpts) if err != nil { - return nil, err + return nil, utils.Wrap(err, "") } err = cursor.Decode(&msgs) if err != nil { return nil, utils.Wrap(err, "") } if len(msgs) > 0 { - return &msgs[0], err + return msgs[0], err } else { return nil, errors.New("get msg list failed") } From e4ed6dde0c9c239cdf51c5760842985f12f276ff Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 17:05:48 +0800 Subject: [PATCH 06/32] test cron --- pkg/common/db/mongoModel.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 2234e0306..72462a898 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -264,20 +264,21 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat) regex := fmt.Sprintf("^%s", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) - var msgs []*UserChat + var msg UserChat cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": regex}}, findOpts) if err != nil { return nil, utils.Wrap(err, "") } - err = cursor.Decode(&msgs) + err = cursor.Decode(&msg) if err != nil { - return nil, utils.Wrap(err, "") - } - if len(msgs) > 0 { - return msgs[0], err - } else { - return nil, errors.New("get msg list failed") + return nil, utils.Wrap(err, fmt.Sprintf("cursor is %s", cursor.Current.String())) } + //if len(msgs) > 0 { + // return msgs[0], err + //} else { + // return nil, errors.New("get msg list failed") + //} + return &msg, nil } func (d *DataBases) DelMongoMsgs(IDList []string) error { From c75e258f8166cc74ef0dd8f05bb17e1627e8a3ab Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 17:41:08 +0800 Subject: [PATCH 07/32] test cron --- pkg/common/db/mongoModel.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 72462a898..28513f4a1 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -264,21 +264,20 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat) regex := fmt.Sprintf("^%s", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) - var msg UserChat + var msgs []UserChat cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": regex}}, findOpts) if err != nil { return nil, utils.Wrap(err, "") } - err = cursor.Decode(&msg) + err = cursor.Decode(&msgs) if err != nil { return nil, utils.Wrap(err, fmt.Sprintf("cursor is %s", cursor.Current.String())) } - //if len(msgs) > 0 { - // return msgs[0], err - //} else { - // return nil, errors.New("get msg list failed") - //} - return &msg, nil + if len(msgs) > 0 { + return &msgs[0], err + } else { + return nil, errors.New("get msg list failed") + } } func (d *DataBases) DelMongoMsgs(IDList []string) error { From ac7619de55b66492cdc117f6cdaf65681c12c6b1 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 18:51:14 +0800 Subject: [PATCH 08/32] test cron --- pkg/common/db/mongoModel.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 28513f4a1..2352fed42 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -12,6 +12,7 @@ import ( "fmt" "github.com/go-redis/redis/v8" "github.com/gogo/protobuf/sortkeys" + "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "math/rand" @@ -262,13 +263,15 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID st func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, error) { ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat) - regex := fmt.Sprintf("^%s", ID) + regex := fmt.Sprintf("/^%s/", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) var msgs []UserChat - cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": regex}}, findOpts) + cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": primitive.Regex{Pattern: regex}}}, findOpts) if err != nil { return nil, utils.Wrap(err, "") } + v, err := cursor.Current.Values() + log.NewInfo("", "values", v, err) err = cursor.Decode(&msgs) if err != nil { return nil, utils.Wrap(err, fmt.Sprintf("cursor is %s", cursor.Current.String())) From e54d5a13e898bea0e2ce60ac783a414fbc7d6402 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 18:57:53 +0800 Subject: [PATCH 09/32] test cron --- pkg/common/db/mongoModel.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 2352fed42..d83fae3c3 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -12,7 +12,6 @@ import ( "fmt" "github.com/go-redis/redis/v8" "github.com/gogo/protobuf/sortkeys" - "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "math/rand" @@ -263,10 +262,11 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID st func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, error) { ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat) - regex := fmt.Sprintf("/^%s/", ID) + //regex := fmt.Sprintf("/^%s/", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) var msgs []UserChat - cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": primitive.Regex{Pattern: regex}}}, findOpts) + // bson.M{"$regex": primitive.Regex{Pattern: regex}} + cursor, err := c.Find(ctx, bson.M{"uid": "3729483847:0"}, findOpts) if err != nil { return nil, utils.Wrap(err, "") } From cad689b33774713995a315ad878ba65ca6b56f49 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 19:03:54 +0800 Subject: [PATCH 10/32] test cron --- pkg/common/db/mongoModel.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index d83fae3c3..2164648df 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -264,7 +264,7 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat) //regex := fmt.Sprintf("/^%s/", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) - var msgs []UserChat + var msgs UserChat // bson.M{"$regex": primitive.Regex{Pattern: regex}} cursor, err := c.Find(ctx, bson.M{"uid": "3729483847:0"}, findOpts) if err != nil { @@ -276,11 +276,12 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er if err != nil { return nil, utils.Wrap(err, fmt.Sprintf("cursor is %s", cursor.Current.String())) } - if len(msgs) > 0 { - return &msgs[0], err - } else { - return nil, errors.New("get msg list failed") - } + //if len(msgs) > 0 { + // return &msgs[0], err + //} else { + // return nil, errors.New("get msg list failed") + //} + return &msgs, nil } func (d *DataBases) DelMongoMsgs(IDList []string) error { From 267e7c3b08e5a4b0c7717fba59936d8834c5a6f3 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 19:14:33 +0800 Subject: [PATCH 11/32] test cron --- pkg/common/db/mongoModel.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 2164648df..4d767827b 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -12,6 +12,7 @@ import ( "fmt" "github.com/go-redis/redis/v8" "github.com/gogo/protobuf/sortkeys" + "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "math/rand" @@ -262,26 +263,26 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID st func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, error) { ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat) - //regex := fmt.Sprintf("/^%s/", ID) + regex := fmt.Sprintf("/^%s/", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) - var msgs UserChat - // bson.M{"$regex": primitive.Regex{Pattern: regex}} + var msgs []UserChat + _ = bson.M{"$regex": primitive.Regex{Pattern: regex}} cursor, err := c.Find(ctx, bson.M{"uid": "3729483847:0"}, findOpts) if err != nil { return nil, utils.Wrap(err, "") } v, err := cursor.Current.Values() log.NewInfo("", "values", v, err) - err = cursor.Decode(&msgs) + err = cursor.All(context.Background(), &msgs) if err != nil { return nil, utils.Wrap(err, fmt.Sprintf("cursor is %s", cursor.Current.String())) } - //if len(msgs) > 0 { - // return &msgs[0], err - //} else { - // return nil, errors.New("get msg list failed") - //} - return &msgs, nil + if len(msgs) > 0 { + return &msgs[0], err + } else { + return nil, errors.New("get msg list failed") + } + //return &msgs, nil } func (d *DataBases) DelMongoMsgs(IDList []string) error { From 0d4634938621463c537928ed8f4820b6a9bd6f45 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 19:18:17 +0800 Subject: [PATCH 12/32] test cron --- pkg/common/db/mongoModel.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 4d767827b..8631b65ab 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -266,13 +266,10 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er regex := fmt.Sprintf("/^%s/", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) var msgs []UserChat - _ = bson.M{"$regex": primitive.Regex{Pattern: regex}} - cursor, err := c.Find(ctx, bson.M{"uid": "3729483847:0"}, findOpts) + cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": primitive.Regex{Pattern: regex}}}, findOpts) if err != nil { return nil, utils.Wrap(err, "") } - v, err := cursor.Current.Values() - log.NewInfo("", "values", v, err) err = cursor.All(context.Background(), &msgs) if err != nil { return nil, utils.Wrap(err, fmt.Sprintf("cursor is %s", cursor.Current.String())) From 4989bb07f65e18fb7dbcbd529ec5e7df0be5ca1e Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 19:39:56 +0800 Subject: [PATCH 13/32] test cron --- internal/cron_task/clear_msg.go | 3 +++ pkg/common/db/mongoModel.go | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index 078eee136..0f3b05263 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -82,6 +82,9 @@ func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[] } return getDelMaxSeqByIDList(*delMsgIDList), delMongoMsgs(operationID, delMsgIDList) } + if index == 0 && msgs == nil { + return 0, nil + } if len(msgs.Msg) > db.GetSingleGocMsgNum() { log.NewWarn(operationID, utils.GetSelfFuncName(), "msgs too large", len(msgs.Msg), msgs.UID) } diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 8631b65ab..ff0dca2b0 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -277,7 +277,7 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er if len(msgs) > 0 { return &msgs[0], err } else { - return nil, errors.New("get msg list failed") + return nil, nil } //return &msgs, nil } @@ -317,7 +317,7 @@ func (d *DataBases) GetNewestMsg(ID string) (msg *MsgInfo, err error) { if err != nil { return nil, err } - err = cursor.Decode(&userChats) + err = cursor.All(ctx, &userChats) if err != nil { return nil, utils.Wrap(err, "") } From 10d299d1b398f4b260cf4031c55fe9d75a0b25b6 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 19:49:19 +0800 Subject: [PATCH 14/32] test cron --- pkg/common/db/mongoModel.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index ff0dca2b0..0a4f1f8aa 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -56,6 +56,8 @@ type GroupMember_x struct { UIDList []string } +var ErrMsgListNotExist = errors.New("user not have msg in mongoDB") + func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq uint32, err error) { return 1, nil //var i, NB uint32 @@ -277,7 +279,7 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er if len(msgs) > 0 { return &msgs[0], err } else { - return nil, nil + return nil, ErrMsgListNotExist } //return &msgs, nil } From be6811ddbde29cc3209dbfeda1cb639217161140 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 1 Nov 2022 19:51:10 +0800 Subject: [PATCH 15/32] test cron --- pkg/common/db/mongoModel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 0a4f1f8aa..719c06ccc 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -325,7 +325,7 @@ func (d *DataBases) GetNewestMsg(ID string) (msg *MsgInfo, err error) { } if len(userChats) > 0 { if len(userChats[0].Msg) > 0 { - return &userChats[0].Msg[len(userChats[0].Msg)], nil + return &userChats[0].Msg[len(userChats[0].Msg)-1], nil } return nil, errors.New("len(userChats[0].Msg) < 0") } From 9182f15ee0c404d48b72793c147c4bf95d9649a6 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Wed, 2 Nov 2022 11:17:20 +0800 Subject: [PATCH 16/32] test cron --- internal/cron_task/clear_msg.go | 9 ++++++++- pkg/common/db/mongoModel.go | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index 0f3b05263..32243ac1b 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -78,13 +78,18 @@ func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[] msgs, err := db.DB.GetUserMsgListByIndex(ID, index) if err != nil || msgs.UID == "" { if err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), "GetUserMsgListByIndex failed", err.Error(), index, ID) + if err == db.ErrMsgListNotExist { + log.NewDebug(operationID, utils.GetSelfFuncName(), ID, index, err.Error()) + } else { + log.NewError(operationID, utils.GetSelfFuncName(), "GetUserMsgListByIndex failed", err.Error(), index, ID) + } } return getDelMaxSeqByIDList(*delMsgIDList), delMongoMsgs(operationID, delMsgIDList) } if index == 0 && msgs == nil { return 0, nil } + log.NewDebug(operationID, "ID:", ID, "index:", index, "uid:", msgs.UID, "len:", len(msgs.Msg)) if len(msgs.Msg) > db.GetSingleGocMsgNum() { log.NewWarn(operationID, utils.GetSelfFuncName(), "msgs too large", len(msgs.Msg), msgs.UID) } @@ -162,6 +167,8 @@ func checkMaxSeqWithMongo(operationID, ID string, diffusionType int) error { } if math.Abs(float64(msgPb.Seq-uint32(maxSeq))) > 10 { log.NewWarn(operationID, utils.GetSelfFuncName(), maxSeq, msgPb.Seq, "redis maxSeq is different with msg.Seq") + } else { + log.NewInfo(operationID, utils.GetSelfFuncName(), diffusionType, ID, "seq and msg OK", msgPb.Seq, uint32(maxSeq)) } return nil } diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 719c06ccc..0b4bd2617 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -268,7 +268,7 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er regex := fmt.Sprintf("/^%s/", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) var msgs []UserChat - cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": primitive.Regex{Pattern: regex}}}, findOpts) + cursor, err := c.Find(ctx, bson.M{"uid": primitive.Regex{Pattern: regex}}, findOpts) if err != nil { return nil, utils.Wrap(err, "") } @@ -281,7 +281,6 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er } else { return nil, ErrMsgListNotExist } - //return &msgs, nil } func (d *DataBases) DelMongoMsgs(IDList []string) error { From d391a4d023cddab325be63bb412a56112b439af5 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Wed, 2 Nov 2022 11:40:55 +0800 Subject: [PATCH 17/32] test cron --- internal/cron_task/clear_msg.go | 2 +- internal/cron_task/cron_task.go | 4 ++-- pkg/common/db/mongoModel.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index 32243ac1b..229937304 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -79,7 +79,7 @@ func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[] if err != nil || msgs.UID == "" { if err != nil { if err == db.ErrMsgListNotExist { - log.NewDebug(operationID, utils.GetSelfFuncName(), ID, index, err.Error()) + log.NewDebug(operationID, utils.GetSelfFuncName(), "ID:", ID, "index:", index, err.Error()) } else { log.NewError(operationID, utils.GetSelfFuncName(), "GetUserMsgListByIndex failed", err.Error(), index, ID) } diff --git a/internal/cron_task/cron_task.go b/internal/cron_task/cron_task.go index 62543e4e4..3fa39d14d 100644 --- a/internal/cron_task/cron_task.go +++ b/internal/cron_task/cron_task.go @@ -16,9 +16,9 @@ const cronTaskOperationID = "cronTaskOperationID-" func StartCronTask() { log.NewPrivateLog("cron") - log.NewInfo(utils.OperationIDGenerator(), "start cron task") + log.NewInfo(utils.OperationIDGenerator(), "start cron task", "cron config", config.Config.Mongo.ChatRecordsClearTime) c := cron.New() - fmt.Println("config", config.Config.Mongo.ChatRecordsClearTime) + fmt.Println("cron config", config.Config.Mongo.ChatRecordsClearTime) _, err := c.AddFunc(config.Config.Mongo.ChatRecordsClearTime, func() { // user msg clear operationID := getCronTaskOperationID() diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 0b4bd2617..f41a76d49 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -12,7 +12,6 @@ import ( "fmt" "github.com/go-redis/redis/v8" "github.com/gogo/protobuf/sortkeys" - "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "math/rand" @@ -268,7 +267,8 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er regex := fmt.Sprintf("/^%s/", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) var msgs []UserChat - cursor, err := c.Find(ctx, bson.M{"uid": primitive.Regex{Pattern: regex}}, findOpts) + //primitive.Regex{Pattern: regex} + cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": regex}}, findOpts) if err != nil { return nil, utils.Wrap(err, "") } From bf09e49164c1edfeaa676d7b74892bd75061f52b Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Wed, 2 Nov 2022 11:55:48 +0800 Subject: [PATCH 18/32] test cron --- pkg/common/db/mongoModel.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index f41a76d49..4098474d9 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -12,6 +12,7 @@ import ( "fmt" "github.com/go-redis/redis/v8" "github.com/gogo/protobuf/sortkeys" + "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "math/rand" @@ -264,11 +265,11 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID st func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, error) { ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat) - regex := fmt.Sprintf("/^%s/", ID) + regex := fmt.Sprintf("/^%s", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) var msgs []UserChat //primitive.Regex{Pattern: regex} - cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": regex}}, findOpts) + cursor, err := c.Find(ctx, bson.M{"uid": primitive.Regex{Pattern: regex}}, findOpts) if err != nil { return nil, utils.Wrap(err, "") } From cdf851d19679097ded3aa37fddfac6ac42d77a77 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Wed, 2 Nov 2022 12:00:23 +0800 Subject: [PATCH 19/32] test cron --- pkg/common/db/mongoModel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 4098474d9..389a1e0f1 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -265,7 +265,7 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID st func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, error) { ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat) - regex := fmt.Sprintf("/^%s", ID) + regex := fmt.Sprintf("^%s", ID) findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1}) var msgs []UserChat //primitive.Regex{Pattern: regex} From 5c503e71edbe9a55acddab9c05afc61e5c7e7ec2 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 2 Nov 2022 15:32:36 +0800 Subject: [PATCH 20/32] message update --- internal/rpc/msg/pull_message.go | 8 ++++---- pkg/common/db/mongoModel.go | 3 --- pkg/common/log/file_line_hk.go | 32 -------------------------------- 3 files changed, 4 insertions(+), 39 deletions(-) diff --git a/internal/rpc/msg/pull_message.go b/internal/rpc/msg/pull_message.go index 1a99a14e6..83f2275f2 100644 --- a/internal/rpc/msg/pull_message.go +++ b/internal/rpc/msg/pull_message.go @@ -61,9 +61,9 @@ func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *open_im_sdk.Pull msgList, err1 := commonDB.DB.GetMsgBySeqListMongo2(in.UserID, failedSeqList, in.OperationID) if err1 != nil { promePkg.PromeAdd(promePkg.MsgPullFromMongoFailedCounter, len(failedSeqList)) - log.Error(in.OperationID, "PullMessageBySeqList data error", in.String(), err.Error()) + log.Error(in.OperationID, "PullMessageBySeqList data error", in.String(), err1.Error()) resp.ErrCode = 201 - resp.ErrMsg = err.Error() + resp.ErrMsg = err1.Error() return resp, nil } else { promePkg.PromeAdd(promePkg.MsgPullFromMongoSuccessCounter, len(msgList)) @@ -88,9 +88,9 @@ func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *open_im_sdk.Pull msgList, err1 := commonDB.DB.GetSuperGroupMsgBySeqListMongo(k, failedSeqList, in.OperationID) if err1 != nil { promePkg.PromeAdd(promePkg.MsgPullFromMongoFailedCounter, len(failedSeqList)) - log.Error(in.OperationID, "PullMessageBySeqList data error", in.String(), err.Error()) + log.Error(in.OperationID, "PullMessageBySeqList data error", in.String(), err1.Error()) resp.ErrCode = 201 - resp.ErrMsg = err.Error() + resp.ErrMsg = err1.Error() return resp, nil } else { promePkg.PromeAdd(promePkg.MsgPullFromMongoSuccessCounter, len(msgList)) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 389a1e0f1..e3349bd76 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -374,9 +374,6 @@ func (d *DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, operatio } } } - if len(hasSeqList) == 0 { - return nil, errors.New("pull message is null") - } if len(hasSeqList) != len(seqList) { var diff []uint32 diff = utils.Difference(hasSeqList, seqList) diff --git a/pkg/common/log/file_line_hk.go b/pkg/common/log/file_line_hk.go index fd6047a2f..1a609d9be 100644 --- a/pkg/common/log/file_line_hk.go +++ b/pkg/common/log/file_line_hk.go @@ -39,35 +39,3 @@ func (f *fileHook) Fire(entry *logrus.Entry) error { entry.Data["FilePath"] = s return nil } - -//func findCaller(skip int) string { -// file := "" -// line := 0 -// for i := 0; i < 10; i++ { -// file, line = getCaller(skip + i) -// if !strings.HasPrefix(file, "log") { -// break -// } -// } -// return fmt.Sprintf("%s:%d", file, line) -//} -// -//func getCaller(skip int) (string, int) { -// _, file, line, ok := runtime.Caller(skip) -// -// if !ok { -// return "", 0 -// } -// fmt.Println("skip:", skip, "file:", file, "line", line) -// n := 0 -// for i := len(file) - 1; i > 0; i-- { -// if file[i] == '/' { -// n++ -// if n >= 2 { -// file = file[i+1:] -// break -// } -// } -// } -// return file, line -//} From 6d90cd59f2e31e2cd1b42e50337afdbb0fe0c01a Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 3 Nov 2022 18:31:29 +0800 Subject: [PATCH 21/32] test cron --- internal/cron_task/clear_msg.go | 60 ++++++++++++++++++--------------- pkg/common/db/mongoModel.go | 2 +- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index 229937304..938a446ec 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -20,7 +20,6 @@ func ResetUserGroupMinSeq(operationID, groupID string, userIDList []string) erro minSeq, err := deleteMongoMsg(operationID, groupID, oldestList, &delMsgIDList) if err != nil { log.NewError(operationID, utils.GetSelfFuncName(), groupID, "deleteMongoMsg failed") - return utils.Wrap(err, "") } if minSeq == 0 { return nil @@ -55,10 +54,11 @@ func DeleteMongoMsgAndResetRedisSeq(operationID, userID string) error { } log.NewDebug(operationID, utils.GetSelfFuncName(), "delMsgIDMap: ", delMsgIDList, "minSeq", minSeq) err = db.DB.SetUserMinSeq(userID, minSeq) - return err + return utils.Wrap(err, "") } -func delMongoMsgs(operationID string, delMsgIDList *[][2]interface{}) error { +// del list +func delMongoMsgsPhysical(delMsgIDList *[][2]interface{}) error { if len(*delMsgIDList) > 0 { var IDList []string for _, v := range *delMsgIDList { @@ -72,9 +72,13 @@ func delMongoMsgs(operationID string, delMsgIDList *[][2]interface{}) error { return nil } +// index 0....19(del) 20...69 +// seq 70 +// set minSeq 21 // recursion func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[][2]interface{}) (uint32, error) { - // 从最旧的列表开始找 + // delMsgIDList [[uid:0, minSeq], [uid:1, minSeq]] + // find from oldest list msgs, err := db.DB.GetUserMsgListByIndex(ID, index) if err != nil || msgs.UID == "" { if err != nil { @@ -84,10 +88,12 @@ func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[] log.NewError(operationID, utils.GetSelfFuncName(), "GetUserMsgListByIndex failed", err.Error(), index, ID) } } - return getDelMaxSeqByIDList(*delMsgIDList), delMongoMsgs(operationID, delMsgIDList) - } - if index == 0 && msgs == nil { - return 0, nil + // 获取报错,或者获取不到了,物理删除并且返回seq + err = delMongoMsgsPhysical(delMsgIDList) + if err != nil { + return 0, err + } + return getDelMaxSeqByIDList(*delMsgIDList) + 1, nil } log.NewDebug(operationID, "ID:", ID, "index:", index, "uid:", msgs.UID, "len:", len(msgs.Msg)) if len(msgs.Msg) > db.GetSingleGocMsgNum() { @@ -95,29 +101,29 @@ func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[] } log.NewDebug(operationID, utils.GetSelfFuncName(), "get msgs: ", msgs.UID) for i, msg := range msgs.Msg { - // 找到列表中不需要删除的消息了 - if utils.GetCurrentTimestampByMill() < msg.SendTime+int64(config.Config.Mongo.DBRetainChatRecords)*24*60*60*1000 { - if err := delMongoMsgs(operationID, delMsgIDList); err != nil { + // 找到列表中不需要删除的消息了, 表示为递归到最后一个块 + if utils.GetCurrentTimestampByMill() < msg.SendTime+(int64(config.Config.Mongo.DBRetainChatRecords)*24*60*60*1000) { + // 删除块失败 递归结束 返回0 + if err := delMongoMsgsPhysical(delMsgIDList); err != nil { return 0, err } - minSeq := getDelMaxSeqByIDList(*delMsgIDList) + // unMarshall失败 块删除成功 返回块的最大seq+1 设置为最小seq + msgPb := &server_api_params.MsgData{} + if err = proto.Unmarshal(msg.Msg, msgPb); err != nil { + return getDelMaxSeqByIDList(*delMsgIDList) + 1, utils.Wrap(err, "") + } + // 如果不是块中第一个,就把前面比他早插入的全部设置空。 if i > 0 { - msgPb := &server_api_params.MsgData{} - err = proto.Unmarshal(msg.Msg, msgPb) + err = db.DB.ReplaceMsgToBlankByIndex(msgs.UID, i-1) if err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), ID, index) - } else { - err = db.DB.ReplaceMsgToBlankByIndex(msgs.UID, i-1) - if err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), msgs.UID, i) - return minSeq, nil - } - minSeq = msgPb.Seq + log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), msgs.UID, i) + return getDelMaxSeqByIDList(*delMsgIDList) + 1, utils.Wrap(err, "") } } - return minSeq, nil + return msgPb.Seq, nil } } + // 该列表中消息全部为老消息, 加入删除列表继续递归 if len(msgs.Msg) > 0 { msgPb := &server_api_params.MsgData{} err = proto.Unmarshal(msgs.Msg[len(msgs.Msg)-1].Msg, msgPb) @@ -127,10 +133,10 @@ func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[] } *delMsgIDList = append(*delMsgIDList, [2]interface{}{msgs.UID, msgPb.Seq}) } - // 没有找到 代表需要全部删除掉 继续递归查找下一个比较旧的列表 - seq, err := deleteMongoMsg(operationID, utils.GetSelfFuncName(), index+1, delMsgIDList) + // 继续递归 index+1 + seq, err := deleteMongoMsg(operationID, ID, index+1, delMsgIDList) if err != nil { - return 0, utils.Wrap(err, "deleteMongoMsg failed") + return seq, utils.Wrap(err, "deleteMongoMsg failed") } return seq, nil } @@ -166,7 +172,7 @@ func checkMaxSeqWithMongo(operationID, ID string, diffusionType int) error { return utils.Wrap(err, "") } if math.Abs(float64(msgPb.Seq-uint32(maxSeq))) > 10 { - log.NewWarn(operationID, utils.GetSelfFuncName(), maxSeq, msgPb.Seq, "redis maxSeq is different with msg.Seq") + log.NewWarn(operationID, utils.GetSelfFuncName(), maxSeq, msgPb.Seq, "redis maxSeq is different with msg.Seq > 10") } else { log.NewInfo(operationID, utils.GetSelfFuncName(), diffusionType, ID, "seq and msg OK", msgPb.Seq, uint32(maxSeq)) } diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 389a1e0f1..6dd23deb6 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -278,7 +278,7 @@ func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, er return nil, utils.Wrap(err, fmt.Sprintf("cursor is %s", cursor.Current.String())) } if len(msgs) > 0 { - return &msgs[0], err + return &msgs[0], nil } else { return nil, ErrMsgListNotExist } From 741cfec1ec1aca3fee687f7541da1b764333760f Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 3 Nov 2022 19:16:23 +0800 Subject: [PATCH 22/32] test cron --- internal/cron_task/clear_msg.go | 4 ++++ pkg/common/db/mongoModel.go | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index 938a446ec..ba22eac38 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -166,6 +166,10 @@ func checkMaxSeqWithMongo(operationID, ID string, diffusionType int) error { if err != nil { return utils.Wrap(err, "GetNewestMsg failed") } + if msg == nil { + log.NewInfo(operationID, "msg has del") + return nil + } msgPb := &server_api_params.MsgData{} err = proto.Unmarshal(msg.Msg, msgPb) if err != nil { diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 724fd8d73..15ffbd88f 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -305,7 +305,7 @@ func (d *DataBases) ReplaceMsgToBlankByIndex(suffixID string, index int) error { msg.SendTime = 0 } } - _, err = c.UpdateOne(ctx, bson.M{"uid": suffixID}, userChat) + _, err = c.UpdateOne(ctx, bson.M{"uid": suffixID}, bson.M{"$set": bson.M{"msg": userChat.Msg}}) return err } @@ -329,7 +329,7 @@ func (d *DataBases) GetNewestMsg(ID string) (msg *MsgInfo, err error) { } return nil, errors.New("len(userChats[0].Msg) < 0") } - return nil, errors.New("len(userChats) < 0") + return nil, nil } func (d *DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) { From f3858e8300784dd5b672fe2595b964abf00e9c6b Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 3 Nov 2022 19:19:43 +0800 Subject: [PATCH 23/32] test cron --- internal/cron_task/clear_msg.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index ba22eac38..fa3323dbe 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -149,12 +149,12 @@ func getDelMaxSeqByIDList(delMsgIDList [][2]interface{}) uint32 { } func checkMaxSeqWithMongo(operationID, ID string, diffusionType int) error { - var maxSeq uint64 + var seqRedis uint64 var err error if diffusionType == constant.WriteDiffusion { - maxSeq, err = db.DB.GetUserMaxSeq(ID) + seqRedis, err = db.DB.GetUserMaxSeq(ID) } else { - maxSeq, err = db.DB.GetGroupMaxSeq(ID) + seqRedis, err = db.DB.GetGroupMaxSeq(ID) } if err != nil { if err == goRedis.Nil { @@ -166,19 +166,19 @@ func checkMaxSeqWithMongo(operationID, ID string, diffusionType int) error { if err != nil { return utils.Wrap(err, "GetNewestMsg failed") } - if msg == nil { - log.NewInfo(operationID, "msg has del") - return nil + var seqMongo uint32 + if msg != nil { + msgPb := &server_api_params.MsgData{} + err = proto.Unmarshal(msg.Msg, msgPb) + if err != nil { + return utils.Wrap(err, "") + } + seqMongo = msgPb.Seq } - msgPb := &server_api_params.MsgData{} - err = proto.Unmarshal(msg.Msg, msgPb) - if err != nil { - return utils.Wrap(err, "") - } - if math.Abs(float64(msgPb.Seq-uint32(maxSeq))) > 10 { - log.NewWarn(operationID, utils.GetSelfFuncName(), maxSeq, msgPb.Seq, "redis maxSeq is different with msg.Seq > 10") + if math.Abs(float64(seqMongo-uint32(seqRedis))) > 10 { + log.NewWarn(operationID, utils.GetSelfFuncName(), seqMongo, seqRedis, "redis maxSeq is different with msg.Seq > 10") } else { - log.NewInfo(operationID, utils.GetSelfFuncName(), diffusionType, ID, "seq and msg OK", msgPb.Seq, uint32(maxSeq)) + log.NewInfo(operationID, utils.GetSelfFuncName(), diffusionType, ID, "seq and msg OK", seqMongo, seqRedis) } return nil } From 36498464236b23bcc6040ca0ec969ff5d3905e37 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 3 Nov 2022 19:23:10 +0800 Subject: [PATCH 24/32] test cron --- internal/cron_task/clear_msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index fa3323dbe..72dc904d0 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -176,7 +176,7 @@ func checkMaxSeqWithMongo(operationID, ID string, diffusionType int) error { seqMongo = msgPb.Seq } if math.Abs(float64(seqMongo-uint32(seqRedis))) > 10 { - log.NewWarn(operationID, utils.GetSelfFuncName(), seqMongo, seqRedis, "redis maxSeq is different with msg.Seq > 10") + log.NewWarn(operationID, utils.GetSelfFuncName(), seqMongo, seqRedis, "redis maxSeq is different with msg.Seq > 10", ID, diffusionType) } else { log.NewInfo(operationID, utils.GetSelfFuncName(), diffusionType, ID, "seq and msg OK", seqMongo, seqRedis) } From 8839c369172995b8aa3cbc70a1fd192b774a5332 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 3 Nov 2022 19:26:41 +0800 Subject: [PATCH 25/32] test cron --- internal/cron_task/clear_msg.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index 72dc904d0..40914e624 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -166,15 +166,16 @@ func checkMaxSeqWithMongo(operationID, ID string, diffusionType int) error { if err != nil { return utils.Wrap(err, "GetNewestMsg failed") } - var seqMongo uint32 - if msg != nil { - msgPb := &server_api_params.MsgData{} - err = proto.Unmarshal(msg.Msg, msgPb) - if err != nil { - return utils.Wrap(err, "") - } - seqMongo = msgPb.Seq + if msg == nil { + return nil } + var seqMongo uint32 + msgPb := &server_api_params.MsgData{} + err = proto.Unmarshal(msg.Msg, msgPb) + if err != nil { + return utils.Wrap(err, "") + } + seqMongo = msgPb.Seq if math.Abs(float64(seqMongo-uint32(seqRedis))) > 10 { log.NewWarn(operationID, utils.GetSelfFuncName(), seqMongo, seqRedis, "redis maxSeq is different with msg.Seq > 10", ID, diffusionType) } else { From 389271c00d0fcf8033ffcf2fc363ad934aa76691 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 3 Nov 2022 19:50:06 +0800 Subject: [PATCH 26/32] test cron --- internal/cron_task/clear_msg.go | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index 40914e624..a3bd2c00a 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -10,6 +10,8 @@ import ( goRedis "github.com/go-redis/redis/v8" "github.com/golang/protobuf/proto" "math" + "strconv" + "strings" ) const oldestList = 0 @@ -120,11 +122,12 @@ func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[] return getDelMaxSeqByIDList(*delMsgIDList) + 1, utils.Wrap(err, "") } } + // 递归结束 return msgPb.Seq, nil } } - // 该列表中消息全部为老消息, 加入删除列表继续递归 - if len(msgs.Msg) > 0 { + // 该列表中消息全部为老消息并且列表满了, 加入删除列表继续递归 + if msgListIsFull(msgs) { msgPb := &server_api_params.MsgData{} err = proto.Unmarshal(msgs.Msg[len(msgs.Msg)-1].Msg, msgPb) if err != nil { @@ -141,6 +144,19 @@ func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[] return seq, nil } +func msgListIsFull(chat *db.UserChat) bool { + index, _ := strconv.Atoi(strings.Split(chat.UID, ":")[1]) + if index == 0 { + if len(chat.Msg) >= 4999 { + return true + } + } + if len(chat.Msg) >= 5000 { + return true + } + return false +} + func getDelMaxSeqByIDList(delMsgIDList [][2]interface{}) uint32 { if len(delMsgIDList) == 0 { return 0 From 2cbecf439e907b5e44816a1edbba18015652cc5c Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 3 Nov 2022 20:08:56 +0800 Subject: [PATCH 27/32] test cron --- internal/cron_task/cron_task.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/cron_task/cron_task.go b/internal/cron_task/cron_task.go index 3fa39d14d..c0e4c0b86 100644 --- a/internal/cron_task/cron_task.go +++ b/internal/cron_task/cron_task.go @@ -30,9 +30,9 @@ func StartCronTask() { if err := DeleteMongoMsgAndResetRedisSeq(operationID, userID); err != nil { log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), userID) } - if err := checkMaxSeqWithMongo(operationID, userID, constant.WriteDiffusion); err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), userID, err) - } + //if err := checkMaxSeqWithMongo(operationID, userID, constant.WriteDiffusion); err != nil { + // log.NewError(operationID, utils.GetSelfFuncName(), userID, err) + //} } } else { log.NewError(operationID, utils.GetSelfFuncName(), err.Error()) @@ -52,9 +52,9 @@ func StartCronTask() { if err := ResetUserGroupMinSeq(operationID, groupID, userIDList); err != nil { log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupID, userIDList) } - if err := checkMaxSeqWithMongo(operationID, groupID, constant.ReadDiffusion); err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), groupID, err) - } + //if err := checkMaxSeqWithMongo(operationID, groupID, constant.ReadDiffusion); err != nil { + // log.NewError(operationID, utils.GetSelfFuncName(), groupID, err) + //} } } else { log.NewError(operationID, utils.GetSelfFuncName(), err.Error()) From 1b3fbf56d0ad0543102ecd41c25ef7e030ea86fa Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 4 Nov 2022 16:18:45 +0800 Subject: [PATCH 28/32] test cron --- internal/cron_task/clear_msg.go | 73 ++++++++++++++++----------------- pkg/common/db/mongoModel.go | 11 ++++- 2 files changed, 46 insertions(+), 38 deletions(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index a3bd2c00a..045ef818a 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -18,15 +18,15 @@ const oldestList = 0 const newestList = -1 func ResetUserGroupMinSeq(operationID, groupID string, userIDList []string) error { - var delMsgIDList [][2]interface{} - minSeq, err := deleteMongoMsg(operationID, groupID, oldestList, &delMsgIDList) + var delStruct delMsgRecursionStruct + minSeq, err := deleteMongoMsg(operationID, groupID, oldestList, &delStruct) if err != nil { log.NewError(operationID, utils.GetSelfFuncName(), groupID, "deleteMongoMsg failed") } if minSeq == 0 { return nil } - log.NewDebug(operationID, utils.GetSelfFuncName(), "delMsgIDList:", delMsgIDList, "minSeq", minSeq) + log.NewDebug(operationID, utils.GetSelfFuncName(), "delMsgIDList:", delStruct, "minSeq", minSeq) for _, userID := range userIDList { userMinSeq, err := db.DB.GetGroupUserMinSeq(groupID, userID) if err != nil && err != goRedis.Nil { @@ -46,27 +46,23 @@ func ResetUserGroupMinSeq(operationID, groupID string, userIDList []string) erro } func DeleteMongoMsgAndResetRedisSeq(operationID, userID string) error { - var delMsgIDList [][2]interface{} - minSeq, err := deleteMongoMsg(operationID, userID, oldestList, &delMsgIDList) + var delStruct delMsgRecursionStruct + minSeq, err := deleteMongoMsg(operationID, userID, oldestList, &delStruct) if err != nil { return utils.Wrap(err, "") } if minSeq == 0 { return nil } - log.NewDebug(operationID, utils.GetSelfFuncName(), "delMsgIDMap: ", delMsgIDList, "minSeq", minSeq) + log.NewDebug(operationID, utils.GetSelfFuncName(), "delMsgIDMap: ", delStruct, "minSeq", minSeq) err = db.DB.SetUserMinSeq(userID, minSeq) return utils.Wrap(err, "") } // del list -func delMongoMsgsPhysical(delMsgIDList *[][2]interface{}) error { - if len(*delMsgIDList) > 0 { - var IDList []string - for _, v := range *delMsgIDList { - IDList = append(IDList, v[0].(string)) - } - err := db.DB.DelMongoMsgs(IDList) +func delMongoMsgsPhysical(uidList []string) error { + if len(uidList) > 0 { + err := db.DB.DelMongoMsgs(uidList) if err != nil { return utils.Wrap(err, "DelMongoMsgs failed") } @@ -74,28 +70,37 @@ func delMongoMsgsPhysical(delMsgIDList *[][2]interface{}) error { return nil } +type delMsgRecursionStruct struct { + minSeq uint32 + delUidList []string +} + +func (d *delMsgRecursionStruct) getSetMinSeq() uint32 { + return d.minSeq +} + // index 0....19(del) 20...69 // seq 70 // set minSeq 21 // recursion -func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[][2]interface{}) (uint32, error) { +func deleteMongoMsg(operationID string, ID string, index int64, delStruct *delMsgRecursionStruct) (uint32, error) { // delMsgIDList [[uid:0, minSeq], [uid:1, minSeq]] // find from oldest list msgs, err := db.DB.GetUserMsgListByIndex(ID, index) if err != nil || msgs.UID == "" { if err != nil { if err == db.ErrMsgListNotExist { - log.NewDebug(operationID, utils.GetSelfFuncName(), "ID:", ID, "index:", index, err.Error()) + log.NewInfo(operationID, utils.GetSelfFuncName(), "ID:", ID, "index:", index, err.Error()) } else { log.NewError(operationID, utils.GetSelfFuncName(), "GetUserMsgListByIndex failed", err.Error(), index, ID) } } // 获取报错,或者获取不到了,物理删除并且返回seq - err = delMongoMsgsPhysical(delMsgIDList) + err = delMongoMsgsPhysical(delStruct.delUidList) if err != nil { return 0, err } - return getDelMaxSeqByIDList(*delMsgIDList) + 1, nil + return delStruct.getSetMinSeq(), nil } log.NewDebug(operationID, "ID:", ID, "index:", index, "uid:", msgs.UID, "len:", len(msgs.Msg)) if len(msgs.Msg) > db.GetSingleGocMsgNum() { @@ -106,20 +111,20 @@ func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[] // 找到列表中不需要删除的消息了, 表示为递归到最后一个块 if utils.GetCurrentTimestampByMill() < msg.SendTime+(int64(config.Config.Mongo.DBRetainChatRecords)*24*60*60*1000) { // 删除块失败 递归结束 返回0 - if err := delMongoMsgsPhysical(delMsgIDList); err != nil { + if err := delMongoMsgsPhysical(delStruct.delUidList); err != nil { return 0, err } - // unMarshall失败 块删除成功 返回块的最大seq+1 设置为最小seq + // unMarshall失败 块删除成功 设置为最小seq msgPb := &server_api_params.MsgData{} if err = proto.Unmarshal(msg.Msg, msgPb); err != nil { - return getDelMaxSeqByIDList(*delMsgIDList) + 1, utils.Wrap(err, "") + return delStruct.getSetMinSeq(), utils.Wrap(err, "") } - // 如果不是块中第一个,就把前面比他早插入的全部设置空。 + // 如果不是块中第一个,就把前面比他早插入的全部设置空 seq字段除外。 if i > 0 { err = db.DB.ReplaceMsgToBlankByIndex(msgs.UID, i-1) if err != nil { log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), msgs.UID, i) - return getDelMaxSeqByIDList(*delMsgIDList) + 1, utils.Wrap(err, "") + return delStruct.getSetMinSeq(), utils.Wrap(err, "") } } // 递归结束 @@ -127,17 +132,18 @@ func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[] } } // 该列表中消息全部为老消息并且列表满了, 加入删除列表继续递归 + lastMsgPb := &server_api_params.MsgData{} + err = proto.Unmarshal(msgs.Msg[len(msgs.Msg)-1].Msg, lastMsgPb) + if err != nil { + log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), len(msgs.Msg)-1, msgs.UID) + return 0, utils.Wrap(err, "proto.Unmarshal failed") + } + delStruct.minSeq = lastMsgPb.Seq if msgListIsFull(msgs) { - msgPb := &server_api_params.MsgData{} - err = proto.Unmarshal(msgs.Msg[len(msgs.Msg)-1].Msg, msgPb) - if err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), len(msgs.Msg)-1, msgs.UID) - return 0, utils.Wrap(err, "proto.Unmarshal failed") - } - *delMsgIDList = append(*delMsgIDList, [2]interface{}{msgs.UID, msgPb.Seq}) + delStruct.delUidList = append(delStruct.delUidList, msgs.UID) } // 继续递归 index+1 - seq, err := deleteMongoMsg(operationID, ID, index+1, delMsgIDList) + seq, err := deleteMongoMsg(operationID, ID, index+1, delStruct) if err != nil { return seq, utils.Wrap(err, "deleteMongoMsg failed") } @@ -157,13 +163,6 @@ func msgListIsFull(chat *db.UserChat) bool { return false } -func getDelMaxSeqByIDList(delMsgIDList [][2]interface{}) uint32 { - if len(delMsgIDList) == 0 { - return 0 - } - return delMsgIDList[len(delMsgIDList)-1][1].(uint32) -} - func checkMaxSeqWithMongo(operationID, ID string, diffusionType int) error { var seqRedis uint64 var err error diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 15ffbd88f..88805b902 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -301,7 +301,16 @@ func (d *DataBases) ReplaceMsgToBlankByIndex(suffixID string, index int) error { } for i, msg := range userChat.Msg { if i <= index { - msg.Msg = nil + msgPb := &open_im_sdk.MsgData{} + if err = proto.Unmarshal(msg.Msg, msgPb); err != nil { + continue + } + newMsgPb := &open_im_sdk.MsgData{Seq: msgPb.Seq} + bytes, err := proto.Marshal(newMsgPb) + if err != nil { + continue + } + msg.Msg = bytes msg.SendTime = 0 } } From 953e2845667c1906ed6f46817addd9ffe502d8c1 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 4 Nov 2022 16:24:56 +0800 Subject: [PATCH 29/32] test cron --- internal/cron_task/cron_task.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/cron_task/cron_task.go b/internal/cron_task/cron_task.go index c0e4c0b86..70e577716 100644 --- a/internal/cron_task/cron_task.go +++ b/internal/cron_task/cron_task.go @@ -26,6 +26,7 @@ func StartCronTask() { userIDList, err := im_mysql_model.SelectAllUserID() if err == nil { log.NewDebug(operationID, utils.GetSelfFuncName(), "userIDList: ", userIDList) + userIDList = []string{"4158779020"} for _, userID := range userIDList { if err := DeleteMongoMsgAndResetRedisSeq(operationID, userID); err != nil { log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), userID) From de13f5edbdee5b10ae77a54b08e437161abde022 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 4 Nov 2022 16:29:38 +0800 Subject: [PATCH 30/32] test cron --- internal/cron_task/cron_task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cron_task/cron_task.go b/internal/cron_task/cron_task.go index 70e577716..b493b1f37 100644 --- a/internal/cron_task/cron_task.go +++ b/internal/cron_task/cron_task.go @@ -38,7 +38,7 @@ func StartCronTask() { } else { log.NewError(operationID, utils.GetSelfFuncName(), err.Error()) } - + return // working group msg clear workingGroupIDList, err := im_mysql_model.GetGroupIDListByGroupType(constant.WorkingGroup) if err == nil { From 22d0d80bfe1de935b418af33380b407128b753df Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 4 Nov 2022 17:56:21 +0800 Subject: [PATCH 31/32] test cron --- internal/cron_task/clear_msg.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index 045ef818a..ba5d8e7dd 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -84,7 +84,6 @@ func (d *delMsgRecursionStruct) getSetMinSeq() uint32 { // set minSeq 21 // recursion func deleteMongoMsg(operationID string, ID string, index int64, delStruct *delMsgRecursionStruct) (uint32, error) { - // delMsgIDList [[uid:0, minSeq], [uid:1, minSeq]] // find from oldest list msgs, err := db.DB.GetUserMsgListByIndex(ID, index) if err != nil || msgs.UID == "" { @@ -106,10 +105,10 @@ func deleteMongoMsg(operationID string, ID string, index int64, delStruct *delMs if len(msgs.Msg) > db.GetSingleGocMsgNum() { log.NewWarn(operationID, utils.GetSelfFuncName(), "msgs too large", len(msgs.Msg), msgs.UID) } - log.NewDebug(operationID, utils.GetSelfFuncName(), "get msgs: ", msgs.UID) for i, msg := range msgs.Msg { // 找到列表中不需要删除的消息了, 表示为递归到最后一个块 if utils.GetCurrentTimestampByMill() < msg.SendTime+(int64(config.Config.Mongo.DBRetainChatRecords)*24*60*60*1000) { + log.NewDebug(operationID, ID, "find uid", msgs.UID) // 删除块失败 递归结束 返回0 if err := delMongoMsgsPhysical(delStruct.delUidList); err != nil { return 0, err From 76a3334f9dd0f34f90a69ccb54163ca1285b90c4 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 4 Nov 2022 18:40:38 +0800 Subject: [PATCH 32/32] test cron --- internal/cron_task/clear_msg.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go index ba5d8e7dd..1db1c0b6c 100644 --- a/internal/cron_task/clear_msg.go +++ b/internal/cron_task/clear_msg.go @@ -141,6 +141,7 @@ func deleteMongoMsg(operationID string, ID string, index int64, delStruct *delMs if msgListIsFull(msgs) { delStruct.delUidList = append(delStruct.delUidList, msgs.UID) } + log.NewDebug(operationID, ID, "continue", delStruct) // 继续递归 index+1 seq, err := deleteMongoMsg(operationID, ID, index+1, delStruct) if err != nil {