From 03f491ab5a3a3750614af3ae3d6844df46f1a613 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 15:07:36 +0800 Subject: [PATCH 1/5] nil return modify --- internal/api/conversation/conversation.go | 2 +- internal/rpc/user/user.go | 1 - pkg/proto/user/user.pb.go | 152 +++++++++++----------- pkg/proto/user/user.proto | 2 +- 4 files changed, 78 insertions(+), 79 deletions(-) diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go index 2a66be9dd..4eaf1f0a9 100644 --- a/internal/api/conversation/conversation.go +++ b/internal/api/conversation/conversation.go @@ -27,7 +27,7 @@ func GetAllConversationMessageOpt(c *gin.Context) { ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed or not set token in header"}) return } log.NewInfo(params.OperationID, "GetAllConversationMessageOpt args ", req.String()) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 783f6b1f3..2ad30123d 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -139,7 +139,6 @@ func (s *userServer) GetAllConversationMsgOpt(ctx context.Context, req *pbUser.G log.NewInfo(req.OperationID, "GetAllConversationMsgOpt rpc return ", resp.String()) return &resp, nil } - func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq) (*pbUser.DeleteUsersResp, error) { log.NewInfo(req.OperationID, "DeleteUsers args ", req.String()) if token_verify.IsMangerUserID(req.OpUserID) { diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index 892c0c982..79a53f7d7 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{0} + return fileDescriptor_user_9c8678d55a710022, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -83,7 +83,7 @@ func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} } func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) } func (*DeleteUsersReq) ProtoMessage() {} func (*DeleteUsersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{1} + return fileDescriptor_user_9c8678d55a710022, []int{1} } func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} } func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) } func (*DeleteUsersResp) ProtoMessage() {} func (*DeleteUsersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{2} + return fileDescriptor_user_9c8678d55a710022, []int{2} } func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b) @@ -182,7 +182,7 @@ func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} } func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDReq) ProtoMessage() {} func (*GetAllUserIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{3} + return fileDescriptor_user_9c8678d55a710022, []int{3} } func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b) @@ -228,7 +228,7 @@ func (m *GetAllUserIDResp) Reset() { *m = GetAllUserIDResp{} } func (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDResp) ProtoMessage() {} func (*GetAllUserIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{4} + return fileDescriptor_user_9c8678d55a710022, []int{4} } func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b) @@ -275,7 +275,7 @@ func (m *AccountCheckReq) Reset() { *m = AccountCheckReq{} } func (m *AccountCheckReq) String() string { return proto.CompactTextString(m) } func (*AccountCheckReq) ProtoMessage() {} func (*AccountCheckReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{5} + return fileDescriptor_user_9c8678d55a710022, []int{5} } func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b) @@ -328,7 +328,7 @@ func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} } func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp) ProtoMessage() {} func (*AccountCheckResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{6} + return fileDescriptor_user_9c8678d55a710022, []int{6} } func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b) @@ -374,7 +374,7 @@ func (m *AccountCheckResp_SingleUserStatus) Reset() { *m = AccountCheckR func (m *AccountCheckResp_SingleUserStatus) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {} func (*AccountCheckResp_SingleUserStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{6, 0} + return fileDescriptor_user_9c8678d55a710022, []int{6, 0} } func (m *AccountCheckResp_SingleUserStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Unmarshal(m, b) @@ -421,7 +421,7 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} } func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) } func (*GetUserInfoReq) ProtoMessage() {} func (*GetUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{7} + return fileDescriptor_user_9c8678d55a710022, []int{7} } func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b) @@ -474,7 +474,7 @@ func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} } func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) } func (*GetUserInfoResp) ProtoMessage() {} func (*GetUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{8} + return fileDescriptor_user_9c8678d55a710022, []int{8} } func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b) @@ -521,7 +521,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} } func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoReq) ProtoMessage() {} func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{9} + return fileDescriptor_user_9c8678d55a710022, []int{9} } func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) @@ -573,7 +573,7 @@ func (m *UpdateUserInfoResp) Reset() { *m = UpdateUserInfoResp{} } func (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoResp) ProtoMessage() {} func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{10} + return fileDescriptor_user_9c8678d55a710022, []int{10} } func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b) @@ -615,7 +615,7 @@ func (m *SetReceiveMessageOptReq) Reset() { *m = SetReceiveMessageOptReq func (m *SetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptReq) ProtoMessage() {} func (*SetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{11} + return fileDescriptor_user_9c8678d55a710022, []int{11} } func (m *SetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptReq.Unmarshal(m, b) @@ -682,7 +682,7 @@ func (m *OptResult) Reset() { *m = OptResult{} } func (m *OptResult) String() string { return proto.CompactTextString(m) } func (*OptResult) ProtoMessage() {} func (*OptResult) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{12} + return fileDescriptor_user_9c8678d55a710022, []int{12} } func (m *OptResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OptResult.Unmarshal(m, b) @@ -728,7 +728,7 @@ func (m *SetReceiveMessageOptResp) Reset() { *m = SetReceiveMessageOptRe func (m *SetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptResp) ProtoMessage() {} func (*SetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{13} + return fileDescriptor_user_9c8678d55a710022, []int{13} } func (m *SetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptResp.Unmarshal(m, b) @@ -776,7 +776,7 @@ func (m *GetReceiveMessageOptReq) Reset() { *m = GetReceiveMessageOptReq func (m *GetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptReq) ProtoMessage() {} func (*GetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{14} + return fileDescriptor_user_9c8678d55a710022, []int{14} } func (m *GetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptReq.Unmarshal(m, b) @@ -836,7 +836,7 @@ func (m *GetReceiveMessageOptResp) Reset() { *m = GetReceiveMessageOptRe func (m *GetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptResp) ProtoMessage() {} func (*GetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{15} + return fileDescriptor_user_9c8678d55a710022, []int{15} } func (m *GetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptResp.Unmarshal(m, b) @@ -871,7 +871,7 @@ func (m *GetReceiveMessageOptResp) GetConversationOptResultList() []*OptResult { } type GetAllConversationMsgOptReq struct { - FromUserId string `protobuf:"bytes,1,opt,name=FromUserId" json:"FromUserId,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -883,7 +883,7 @@ func (m *GetAllConversationMsgOptReq) Reset() { *m = GetAllConversationM func (m *GetAllConversationMsgOptReq) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptReq) ProtoMessage() {} func (*GetAllConversationMsgOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{16} + return fileDescriptor_user_9c8678d55a710022, []int{16} } func (m *GetAllConversationMsgOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptReq.Unmarshal(m, b) @@ -903,9 +903,9 @@ func (m *GetAllConversationMsgOptReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetAllConversationMsgOptReq proto.InternalMessageInfo -func (m *GetAllConversationMsgOptReq) GetFromUserId() string { +func (m *GetAllConversationMsgOptReq) GetFromUserID() string { if m != nil { - return m.FromUserId + return m.FromUserID } return "" } @@ -936,7 +936,7 @@ func (m *GetAllConversationMsgOptResp) Reset() { *m = GetAllConversation func (m *GetAllConversationMsgOptResp) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptResp) ProtoMessage() {} func (*GetAllConversationMsgOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{17} + return fileDescriptor_user_9c8678d55a710022, []int{17} } func (m *GetAllConversationMsgOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptResp.Unmarshal(m, b) @@ -1295,60 +1295,60 @@ var _User_serviceDesc = grpc.ServiceDesc{ Metadata: "user/user.proto", } -func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_0a10ad809f213986) } +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9c8678d55a710022) } -var fileDescriptor_user_0a10ad809f213986 = []byte{ - // 829 bytes of a gzipped FileDescriptorProto +var fileDescriptor_user_9c8678d55a710022 = []byte{ + // 827 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0x96, 0x9b, 0xb4, 0xb7, 0x39, 0x69, 0x93, 0xdc, 0x51, 0x7f, 0x7c, 0x7d, 0xa1, 0x4a, 0x47, - 0x08, 0xa2, 0x2e, 0x1c, 0x28, 0x62, 0x01, 0x08, 0xa4, 0x92, 0xaa, 0x56, 0x05, 0x51, 0x90, 0xab, - 0x6e, 0xd8, 0x54, 0x26, 0x1e, 0x42, 0x94, 0xc4, 0x63, 0x3c, 0x4e, 0x2b, 0x40, 0x62, 0x03, 0x6f, - 0xc1, 0x82, 0x25, 0xcf, 0xc0, 0x6b, 0xf0, 0x02, 0xbc, 0x0a, 0xf2, 0x8c, 0x9d, 0xcc, 0xd8, 0x4e, - 0x82, 0x02, 0x0b, 0x36, 0x51, 0xe6, 0x9b, 0x33, 0x67, 0xbe, 0xef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xae, - 0x90, 0xef, 0xdd, 0xec, 0x15, 0xf8, 0x3d, 0xfc, 0x2f, 0x3e, 0x2c, 0x2d, 0x29, 0xa4, 0xcd, 0x7a, - 0x39, 0x56, 0xba, 0x19, 0x2b, 0xdd, 0xc5, 0x5f, 0xae, 0x79, 0x5f, 0x6e, 0xfc, 0x45, 0x83, 0x6b, - 0xb3, 0x77, 0xff, 0x0b, 0xec, 0x39, 0xfc, 0x5e, 0x04, 0xde, 0x21, 0xa1, 0x07, 0x50, 0x96, 0x5e, - 0x53, 0xb4, 0x25, 0x72, 0xa8, 0x0f, 0xba, 0xb1, 0x9d, 0x83, 0x32, 0x1f, 0xb5, 0xa0, 0xa2, 0x3e, - 0x41, 0x68, 0x57, 0x04, 0x66, 0x9e, 0x47, 0x43, 0xcf, 0x9f, 0x60, 0x7e, 0x44, 0x40, 0xea, 0x61, - 0x12, 0x02, 0x6a, 0x4b, 0x95, 0x10, 0x48, 0x37, 0x3b, 0x8f, 0x60, 0x43, 0xee, 0x1e, 0xd0, 0x94, - 0xa7, 0xdc, 0xa2, 0x18, 0x3b, 0x79, 0x30, 0xf3, 0xd1, 0x39, 0x6c, 0xe5, 0x5d, 0x78, 0x74, 0x5d, - 0xc4, 0xcf, 0x78, 0x15, 0x8d, 0xbd, 0x79, 0xd3, 0x22, 0xad, 0x35, 0x27, 0xad, 0x35, 0x3f, 0xed, - 0xcc, 0x2b, 0xe5, 0xf0, 0xeb, 0x96, 0x5b, 0x53, 0x68, 0x5f, 0x56, 0x98, 0x5b, 0xf1, 0x06, 0x5e, - 0x14, 0x22, 0xfc, 0x94, 0xbb, 0x89, 0xc4, 0xcf, 0x54, 0xef, 0x94, 0xf8, 0x99, 0x6e, 0x3c, 0x9e, - 0x6c, 0xbe, 0x28, 0x9b, 0xbc, 0x07, 0x7f, 0x18, 0xfd, 0xbc, 0x5c, 0xe3, 0x0d, 0xf6, 0xdd, 0x9f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x88, 0x5d, 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, 0x7e, 0xd6, 0x67, 0xa1, 0xbe, 0x52, 0x2f, 0x34, 0x4a, 0x76, 0x06, 0x47, 0x06, 0xac, + 0x77, 0x7c, 0x31, 0xd6, 0x0b, 0x3c, 0xef, 0x64, 0x8c, 0xea, 0x50, 0xee, 0xf8, 0x24, 0x70, 0xc2, + 0x3e, 0xf5, 0x4e, 0x8f, 0xf5, 0x22, 0x9f, 0x96, 0x21, 0x4c, 0xa1, 0xaa, 0xec, 0xcd, 0x7c, 0x74, + 0x5b, 0x96, 0xc3, 0x35, 0x94, 0x0f, 0x6b, 0x26, 0x37, 0x66, 0x8a, 0xdb, 0xb2, 0xe4, 0x03, 0xa8, + 0x9d, 0x38, 0xfd, 0x21, 0x71, 0xb3, 0x74, 0xd3, 0x38, 0xee, 0x40, 0xd5, 0x22, 0xe1, 0xd1, 0x70, + 0x28, 0xb0, 0x48, 0xad, 0x01, 0xeb, 0x34, 0x51, 0xa0, 0x09, 0x05, 0x54, 0x52, 0x40, 0x25, 0x05, + 0xc2, 0x38, 0x19, 0xc2, 0x2e, 0xd4, 0xd4, 0x84, 0x4b, 0x49, 0xd8, 0x03, 0xc8, 0x90, 0x97, 0x10, + 0xfc, 0x16, 0xaa, 0x47, 0xdd, 0x2e, 0x1d, 0x7b, 0x61, 0xeb, 0x35, 0xe9, 0x0e, 0x22, 0xda, 0x0d, + 0xa8, 0xf2, 0xff, 0xd2, 0x3a, 0x8d, 0xaf, 0x4b, 0xc3, 0xca, 0x11, 0xad, 0xcc, 0x3f, 0xa2, 0x42, + 0xf6, 0x88, 0x7e, 0x68, 0x50, 0x53, 0xf7, 0x16, 0x0a, 0xbb, 0xd7, 0x50, 0x38, 0x8d, 0x41, 0x16, + 0x80, 0x4d, 0xd8, 0x78, 0x18, 0x4e, 0x14, 0x96, 0x0f, 0x6f, 0x89, 0x15, 0xe9, 0xec, 0xe6, 0x59, + 0xdf, 0xeb, 0x0d, 0x79, 0x49, 0x9c, 0x85, 0x4e, 0x38, 0x66, 0xb6, 0xb4, 0xd4, 0x78, 0x0e, 0xb5, + 0xf4, 0x7c, 0x54, 0xda, 0x63, 0xf9, 0x00, 0xe3, 0x11, 0xba, 0x01, 0x9b, 0x8e, 0x48, 0x2e, 0x02, + 0x63, 0xf9, 0x2a, 0x88, 0x3d, 0xa8, 0x58, 0x24, 0xe4, 0x86, 0x78, 0xaf, 0x68, 0xe4, 0xed, 0x1e, + 0xc0, 0x38, 0x6d, 0xab, 0x84, 0xfc, 0xa2, 0xa3, 0x1f, 0x78, 0x0d, 0x4e, 0xf7, 0x5b, 0xca, 0xcf, + 0xfb, 0xb0, 0x91, 0x64, 0xe0, 0x24, 0x0b, 0xdc, 0xd1, 0x6d, 0x93, 0x46, 0xef, 0x45, 0x7f, 0x74, + 0xc1, 0xdc, 0x81, 0x39, 0xd9, 0x42, 0x09, 0xc5, 0x9f, 0x34, 0xf8, 0xfb, 0xdc, 0x77, 0x9d, 0xf8, + 0x1e, 0xc7, 0x9a, 0xef, 0xc0, 0x7a, 0x32, 0x8c, 0x09, 0xcc, 0x48, 0x36, 0x09, 0x5b, 0x64, 0x03, + 0xcd, 0xda, 0x20, 0xdf, 0x9c, 0x13, 0x40, 0x69, 0x16, 0xcb, 0x38, 0x81, 0xbf, 0x69, 0xb0, 0x7b, + 0x46, 0x42, 0x9b, 0x74, 0x49, 0xff, 0x92, 0xb4, 0x09, 0x63, 0x4e, 0x8f, 0x74, 0xfc, 0x30, 0x3e, + 0xc8, 0x93, 0x80, 0x8e, 0x94, 0xdb, 0x2d, 0x21, 0xa8, 0x06, 0x05, 0xea, 0x87, 0x9c, 0xfc, 0xaa, + 0x1d, 0xfd, 0x45, 0x26, 0xa0, 0x2e, 0xf5, 0x2e, 0x49, 0xc0, 0x62, 0x9e, 0x13, 0x77, 0x4b, 0x76, + 0xce, 0x4c, 0x5a, 0x67, 0x31, 0xa3, 0x53, 0x71, 0x69, 0x55, 0x75, 0x09, 0x3f, 0x85, 0x12, 0x67, + 0x1a, 0x55, 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x87, 0xad, 0xbc, 0x0b, 0x8f, 0xfe, 0x17, 0xf1, 0x33, + 0x5e, 0x45, 0x63, 0x6f, 0xde, 0xb4, 0x48, 0x6b, 0xcd, 0x49, 0x6b, 0xcd, 0x4f, 0x3b, 0xf3, 0x4a, + 0x39, 0xfc, 0xba, 0xe5, 0xd6, 0x14, 0xda, 0x97, 0x15, 0xe6, 0x56, 0xbc, 0x81, 0x17, 0x85, 0x08, + 0x3f, 0xe5, 0x6e, 0x22, 0xf1, 0x33, 0xd5, 0x3b, 0x25, 0x7e, 0xa6, 0x1b, 0x8f, 0x27, 0x9b, 0x2f, + 0xca, 0x26, 0xef, 0xc1, 0x1f, 0x46, 0x3f, 0x2f, 0xd7, 0x78, 0x83, 0x7d, 0xf7, 0x67, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xda, 0x48, 0xf9, 0xbd, 0x9c, 0x0b, 0x00, 0x00, } diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index 7690167ed..bf4738d21 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -97,7 +97,7 @@ message GetReceiveMessageOptResp{ message GetAllConversationMsgOptReq{ - string FromUserId = 1; + string FromUserID = 1; string operationID = 2; string OpUserID = 3; } From 679c907b789aef3ead408d3807dd3fc190fe3973 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 15:19:49 +0800 Subject: [PATCH 2/5] nil return modify --- internal/rpc/user/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 2ad30123d..fbe14cb92 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -127,9 +127,9 @@ func (s *userServer) GetReceiveMessageOpt(ctx context.Context, req *pbUser.GetRe func (s *userServer) GetAllConversationMsgOpt(ctx context.Context, req *pbUser.GetAllConversationMsgOptReq) (*pbUser.GetAllConversationMsgOptResp, error) { log.NewInfo(req.OperationID, "GetAllConversationMsgOpt args ", req.String()) - m, err := db.DB.GetAllConversationMsgOpt(req.FromUserId) + m, err := db.DB.GetAllConversationMsgOpt(req.FromUserID) if err != nil { - log.NewError(req.OperationID, "GetAllConversationMsgOpt failed ", err.Error(), req.FromUserId) + log.NewError(req.OperationID, "GetAllConversationMsgOpt failed ", err.Error(), req.FromUserID) return &pbUser.GetAllConversationMsgOptResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } resp := pbUser.GetAllConversationMsgOptResp{CommonResp: &pbUser.CommonResp{}} From 0b0173f155a4c1b1664a5002e9ffc7a2994b0e03 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 15:52:19 +0800 Subject: [PATCH 3/5] nil return modify --- internal/api/conversation/conversation.go | 30 ++-- pkg/base_info/conversation_api_struct.go | 12 +- pkg/proto/user/user.pb.go | 171 +++++++++++----------- pkg/proto/user/user.proto | 6 +- 4 files changed, 116 insertions(+), 103 deletions(-) diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go index 4eaf1f0a9..d29e47c09 100644 --- a/internal/api/conversation/conversation.go +++ b/internal/api/conversation/conversation.go @@ -39,10 +39,14 @@ func GetAllConversationMessageOpt(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "GetAllConversationMsgOpt rpc failed, " + err.Error()}) return } - resp := api.GetAllConversationMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: RpcResp.ConversationOptResultList} - if len(RpcResp.ConversationOptResultList) == 0 { - resp.ConversationOptResultList = []*user.OptResult{} + optResult := make([]*api.OptResult, 0) + for _, v := range RpcResp.ConversationOptResultList { + temp := new(api.OptResult) + temp.ConversationID = v.ConversationID + temp.Result = &v.Result + optResult = append(optResult, temp) } + resp := api.GetAllConversationMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: optResult} log.NewInfo(req.OperationID, "GetAllConversationMsgOpt api return: ", resp) c.JSON(http.StatusOK, resp) } @@ -71,10 +75,14 @@ func GetReceiveMessageOpt(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "GetReceiveMessageOpt rpc failed, " + err.Error()}) return } - resp := api.GetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: RpcResp.ConversationOptResultList} - if len(RpcResp.ConversationOptResultList) == 0 { - resp.ConversationOptResultList = []*user.OptResult{} + optResult := make([]*api.OptResult, 0) + for _, v := range RpcResp.ConversationOptResultList { + temp := new(api.OptResult) + temp.ConversationID = v.ConversationID + temp.Result = &v.Result + optResult = append(optResult, temp) } + resp := api.GetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: optResult} log.NewInfo(req.OperationID, "GetReceiveMessageOpt api return: ", resp) c.JSON(http.StatusOK, resp) } @@ -103,10 +111,14 @@ func SetReceiveMessageOpt(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "SetReceiveMessageOpt rpc failed, " + err.Error()}) return } - resp := api.SetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, OptResultList: RpcResp.OptResultList} - if len(RpcResp.OptResultList) == 0 { - resp.OptResultList = []*user.OptResult{} + optResult := make([]*api.OptResult, 0) + for _, v := range RpcResp.ConversationOptResultList { + temp := new(api.OptResult) + temp.ConversationID = v.ConversationID + temp.Result = &v.Result + optResult = append(optResult, temp) } + resp := api.SetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: optResult} log.NewInfo(req.OperationID, "SetReceiveMessageOpt api return: ", resp) c.JSON(http.StatusOK, resp) } diff --git a/pkg/base_info/conversation_api_struct.go b/pkg/base_info/conversation_api_struct.go index 0bbb52a49..06133e4bd 100644 --- a/pkg/base_info/conversation_api_struct.go +++ b/pkg/base_info/conversation_api_struct.go @@ -1,14 +1,16 @@ package base_info -import "Open_IM/pkg/proto/user" - +type OptResult struct { + ConversationID string `json:"conversationID"` + Result *int32 `json:"result"` +} type GetAllConversationMessageOptReq struct { OperationID string `json:"operationID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"` } type GetAllConversationMessageOptResp struct { CommResp - ConversationOptResultList []*user.OptResult `json:"data"` + ConversationOptResultList []*OptResult `json:"data"` } type GetReceiveMessageOptReq struct { ConversationIdList []string `json:"conversationIdList" binding:"required"` @@ -17,7 +19,7 @@ type GetReceiveMessageOptReq struct { } type GetReceiveMessageOptResp struct { CommResp - ConversationOptResultList []*user.OptResult `json:"data"` + ConversationOptResultList []*OptResult `json:"data"` } type SetReceiveMessageOptReq struct { OperationID string `json:"operationID" binding:"required"` @@ -26,5 +28,5 @@ type SetReceiveMessageOptReq struct { } type SetReceiveMessageOptResp struct { CommResp - OptResultList []*user.OptResult `json:"data"` + ConversationOptResultList []*OptResult `json:"data"` } diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index 79a53f7d7..22a698a44 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{0} + return fileDescriptor_user_9cc4371b0c883611, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -83,7 +83,7 @@ func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} } func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) } func (*DeleteUsersReq) ProtoMessage() {} func (*DeleteUsersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{1} + return fileDescriptor_user_9cc4371b0c883611, []int{1} } func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} } func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) } func (*DeleteUsersResp) ProtoMessage() {} func (*DeleteUsersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{2} + return fileDescriptor_user_9cc4371b0c883611, []int{2} } func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b) @@ -182,7 +182,7 @@ func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} } func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDReq) ProtoMessage() {} func (*GetAllUserIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{3} + return fileDescriptor_user_9cc4371b0c883611, []int{3} } func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b) @@ -228,7 +228,7 @@ func (m *GetAllUserIDResp) Reset() { *m = GetAllUserIDResp{} } func (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDResp) ProtoMessage() {} func (*GetAllUserIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{4} + return fileDescriptor_user_9cc4371b0c883611, []int{4} } func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b) @@ -275,7 +275,7 @@ func (m *AccountCheckReq) Reset() { *m = AccountCheckReq{} } func (m *AccountCheckReq) String() string { return proto.CompactTextString(m) } func (*AccountCheckReq) ProtoMessage() {} func (*AccountCheckReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{5} + return fileDescriptor_user_9cc4371b0c883611, []int{5} } func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b) @@ -328,7 +328,7 @@ func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} } func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp) ProtoMessage() {} func (*AccountCheckResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{6} + return fileDescriptor_user_9cc4371b0c883611, []int{6} } func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b) @@ -374,7 +374,7 @@ func (m *AccountCheckResp_SingleUserStatus) Reset() { *m = AccountCheckR func (m *AccountCheckResp_SingleUserStatus) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {} func (*AccountCheckResp_SingleUserStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{6, 0} + return fileDescriptor_user_9cc4371b0c883611, []int{6, 0} } func (m *AccountCheckResp_SingleUserStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Unmarshal(m, b) @@ -421,7 +421,7 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} } func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) } func (*GetUserInfoReq) ProtoMessage() {} func (*GetUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{7} + return fileDescriptor_user_9cc4371b0c883611, []int{7} } func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b) @@ -474,7 +474,7 @@ func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} } func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) } func (*GetUserInfoResp) ProtoMessage() {} func (*GetUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{8} + return fileDescriptor_user_9cc4371b0c883611, []int{8} } func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b) @@ -521,7 +521,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} } func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoReq) ProtoMessage() {} func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{9} + return fileDescriptor_user_9cc4371b0c883611, []int{9} } func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) @@ -573,7 +573,7 @@ func (m *UpdateUserInfoResp) Reset() { *m = UpdateUserInfoResp{} } func (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoResp) ProtoMessage() {} func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{10} + return fileDescriptor_user_9cc4371b0c883611, []int{10} } func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b) @@ -615,7 +615,7 @@ func (m *SetReceiveMessageOptReq) Reset() { *m = SetReceiveMessageOptReq func (m *SetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptReq) ProtoMessage() {} func (*SetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{11} + return fileDescriptor_user_9cc4371b0c883611, []int{11} } func (m *SetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptReq.Unmarshal(m, b) @@ -671,7 +671,7 @@ func (m *SetReceiveMessageOptReq) GetOpUserID() string { } type OptResult struct { - ConversationId string `protobuf:"bytes,1,opt,name=conversationId" json:"conversationId,omitempty"` + ConversationID string `protobuf:"bytes,1,opt,name=conversationID" json:"conversationID,omitempty"` Result int32 `protobuf:"varint,2,opt,name=result" json:"result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -682,7 +682,7 @@ func (m *OptResult) Reset() { *m = OptResult{} } func (m *OptResult) String() string { return proto.CompactTextString(m) } func (*OptResult) ProtoMessage() {} func (*OptResult) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{12} + return fileDescriptor_user_9cc4371b0c883611, []int{12} } func (m *OptResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OptResult.Unmarshal(m, b) @@ -702,9 +702,9 @@ func (m *OptResult) XXX_DiscardUnknown() { var xxx_messageInfo_OptResult proto.InternalMessageInfo -func (m *OptResult) GetConversationId() string { +func (m *OptResult) GetConversationID() string { if m != nil { - return m.ConversationId + return m.ConversationID } return "" } @@ -717,18 +717,18 @@ func (m *OptResult) GetResult() int32 { } type SetReceiveMessageOptResp struct { - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - OptResultList []*OptResult `protobuf:"bytes,2,rep,name=optResultList" json:"optResultList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + ConversationOptResultList []*OptResult `protobuf:"bytes,2,rep,name=conversationOptResultList" json:"conversationOptResultList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SetReceiveMessageOptResp) Reset() { *m = SetReceiveMessageOptResp{} } func (m *SetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptResp) ProtoMessage() {} func (*SetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{13} + return fileDescriptor_user_9cc4371b0c883611, []int{13} } func (m *SetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptResp.Unmarshal(m, b) @@ -755,16 +755,16 @@ func (m *SetReceiveMessageOptResp) GetCommonResp() *CommonResp { return nil } -func (m *SetReceiveMessageOptResp) GetOptResultList() []*OptResult { +func (m *SetReceiveMessageOptResp) GetConversationOptResultList() []*OptResult { if m != nil { - return m.OptResultList + return m.ConversationOptResultList } return nil } type GetReceiveMessageOptReq struct { FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` - ConversationIdList []string `protobuf:"bytes,2,rep,name=conversationIdList" json:"conversationIdList,omitempty"` + ConversationIDList []string `protobuf:"bytes,2,rep,name=conversationIDList" json:"conversationIDList,omitempty"` OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -776,7 +776,7 @@ func (m *GetReceiveMessageOptReq) Reset() { *m = GetReceiveMessageOptReq func (m *GetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptReq) ProtoMessage() {} func (*GetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{14} + return fileDescriptor_user_9cc4371b0c883611, []int{14} } func (m *GetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptReq.Unmarshal(m, b) @@ -803,9 +803,9 @@ func (m *GetReceiveMessageOptReq) GetFromUserID() string { return "" } -func (m *GetReceiveMessageOptReq) GetConversationIdList() []string { +func (m *GetReceiveMessageOptReq) GetConversationIDList() []string { if m != nil { - return m.ConversationIdList + return m.ConversationIDList } return nil } @@ -836,7 +836,7 @@ func (m *GetReceiveMessageOptResp) Reset() { *m = GetReceiveMessageOptRe func (m *GetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptResp) ProtoMessage() {} func (*GetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{15} + return fileDescriptor_user_9cc4371b0c883611, []int{15} } func (m *GetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptResp.Unmarshal(m, b) @@ -883,7 +883,7 @@ func (m *GetAllConversationMsgOptReq) Reset() { *m = GetAllConversationM func (m *GetAllConversationMsgOptReq) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptReq) ProtoMessage() {} func (*GetAllConversationMsgOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{16} + return fileDescriptor_user_9cc4371b0c883611, []int{16} } func (m *GetAllConversationMsgOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptReq.Unmarshal(m, b) @@ -936,7 +936,7 @@ func (m *GetAllConversationMsgOptResp) Reset() { *m = GetAllConversation func (m *GetAllConversationMsgOptResp) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptResp) ProtoMessage() {} func (*GetAllConversationMsgOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{17} + return fileDescriptor_user_9cc4371b0c883611, []int{17} } func (m *GetAllConversationMsgOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptResp.Unmarshal(m, b) @@ -1295,60 +1295,59 @@ var _User_serviceDesc = grpc.ServiceDesc{ Metadata: "user/user.proto", } -func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9c8678d55a710022) } +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9cc4371b0c883611) } -var fileDescriptor_user_9c8678d55a710022 = []byte{ - // 827 bytes of a gzipped FileDescriptorProto +var fileDescriptor_user_9cc4371b0c883611 = []byte{ + // 812 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0x96, 0x9b, 0xb4, 0xb7, 0x39, 0x69, 0x93, 0xdc, 0x51, 0x7f, 0x7c, 0x7d, 0xef, 0xad, 0xd2, - 0x11, 0x82, 0xa8, 0x0b, 0x07, 0x8a, 0x58, 0x00, 0x02, 0xa9, 0xa4, 0xaa, 0x55, 0x41, 0x14, 0xe4, - 0xaa, 0x1b, 0x36, 0x95, 0x89, 0x87, 0x10, 0x25, 0xf1, 0x18, 0x8f, 0xd3, 0x0a, 0x90, 0xd8, 0xc0, - 0x5b, 0xb0, 0x60, 0xc9, 0x33, 0xf0, 0x1a, 0xbc, 0x00, 0xaf, 0x82, 0x3c, 0x63, 0x27, 0x33, 0xb6, - 0x93, 0x54, 0x81, 0x05, 0x9b, 0x28, 0xf3, 0xcd, 0x99, 0x33, 0xdf, 0xf7, 0xcd, 0x99, 0xf1, 0x81, - 0xea, 0x98, 0x91, 0xa0, 0x19, 0xfd, 0x98, 0x7e, 0x40, 0x43, 0x8a, 0x8a, 0xd1, 0x7f, 0x63, 0xbf, - 0xe3, 0x13, 0xef, 0xe2, 0xb4, 0xdd, 0xf4, 0x07, 0xbd, 0x26, 0x9f, 0x68, 0x32, 0x77, 0x70, 0x71, - 0xc5, 0x9a, 0x57, 0x4c, 0x04, 0xe2, 0xc7, 0x00, 0x2d, 0x3a, 0x1a, 0x51, 0xcf, 0x26, 0xcc, 0x47, - 0x3a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c3, 0xca, 0x11, 0xad, 0xcc, 0x3f, 0xa2, 0x42, - 0xf6, 0x88, 0x7e, 0x68, 0x50, 0x53, 0xf7, 0x16, 0x0a, 0xbb, 0xd7, 0x50, 0x38, 0x8d, 0x41, 0x16, - 0x80, 0x4d, 0xd8, 0x78, 0x18, 0x4e, 0x14, 0x96, 0x0f, 0x6f, 0x89, 0x15, 0xe9, 0xec, 0xe6, 0x59, - 0xdf, 0xeb, 0x0d, 0x79, 0x49, 0x9c, 0x85, 0x4e, 0x38, 0x66, 0xb6, 0xb4, 0xd4, 0x78, 0x0e, 0xb5, - 0xf4, 0x7c, 0x54, 0xda, 0x63, 0xf9, 0x00, 0xe3, 0x11, 0xba, 0x01, 0x9b, 0x8e, 0x48, 0x2e, 0x02, - 0x63, 0xf9, 0x2a, 0x88, 0x3d, 0xa8, 0x58, 0x24, 0xe4, 0x86, 0x78, 0xaf, 0x68, 0xe4, 0xed, 0x1e, - 0xc0, 0x38, 0x6d, 0xab, 0x84, 0xfc, 0xa2, 0xa3, 0x1f, 0x78, 0x0d, 0x4e, 0xf7, 0x5b, 0xca, 0xcf, - 0xfb, 0xb0, 0x91, 0x64, 0xe0, 0x24, 0x0b, 0xdc, 0xd1, 0x6d, 0x93, 0x46, 0xef, 0x45, 0x7f, 0x74, - 0xc1, 0xdc, 0x81, 0x39, 0xd9, 0x42, 0x09, 0xc5, 0x9f, 0x34, 0xf8, 0xfb, 0xdc, 0x77, 0x9d, 0xf8, - 0x1e, 0xc7, 0x9a, 0xef, 0xc0, 0x7a, 0x32, 0x8c, 0x09, 0xcc, 0x48, 0x36, 0x09, 0x5b, 0x64, 0x03, - 0xcd, 0xda, 0x20, 0xdf, 0x9c, 0x13, 0x40, 0x69, 0x16, 0xcb, 0x38, 0x81, 0xbf, 0x69, 0xb0, 0x7b, - 0x46, 0x42, 0x9b, 0x74, 0x49, 0xff, 0x92, 0xb4, 0x09, 0x63, 0x4e, 0x8f, 0x74, 0xfc, 0x30, 0x3e, - 0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 0xbe, 0xff, 0x33, + 0x00, 0x00, 0xff, 0xff, 0xaa, 0x27, 0xa9, 0x62, 0xb4, 0x0b, 0x00, 0x00, } diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index bf4738d21..3b66f1f41 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -75,18 +75,18 @@ message SetReceiveMessageOptReq{ string OpUserID = 5; } message OptResult{ - string conversationId = 1; + string conversationID = 1; int32 result = 2; //-1: failed; 0:default; 1: not receive ; 2: not jpush } message SetReceiveMessageOptResp{ CommonResp commonResp = 1; - repeated OptResult optResultList = 2; + repeated OptResult conversationOptResultList = 2; } message GetReceiveMessageOptReq{ string FromUserID = 1; - repeated string conversationIdList = 2; + repeated string conversationIDList = 2; string operationID = 3; string OpUserID = 4; } From 20f51092adc61af9b1bf90234963b11e1920e309 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 15:53:56 +0800 Subject: [PATCH 4/5] nil return modify --- pkg/base_info/conversation_api_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/base_info/conversation_api_struct.go b/pkg/base_info/conversation_api_struct.go index 06133e4bd..5642e8061 100644 --- a/pkg/base_info/conversation_api_struct.go +++ b/pkg/base_info/conversation_api_struct.go @@ -13,7 +13,7 @@ type GetAllConversationMessageOptResp struct { ConversationOptResultList []*OptResult `json:"data"` } type GetReceiveMessageOptReq struct { - ConversationIdList []string `json:"conversationIdList" binding:"required"` + ConversationIDList []string `json:"conversationIDList" binding:"required"` OperationID string `json:"operationID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"` } @@ -24,7 +24,7 @@ type GetReceiveMessageOptResp struct { type SetReceiveMessageOptReq struct { OperationID string `json:"operationID" binding:"required"` Opt *int32 `json:"opt" binding:"required"` - ConversationIdList []string `json:"conversationIdList" binding:"required"` + ConversationIDList []string `json:"conversationIDList" binding:"required"` } type SetReceiveMessageOptResp struct { CommResp From 65456d331bfaadce7ef88fc3b7a288a1fc8ec183 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 16:04:08 +0800 Subject: [PATCH 5/5] nil return modify --- internal/rpc/user/user.go | 10 +++++----- pkg/base_info/conversation_api_struct.go | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index fbe14cb92..69d3c2bc3 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -104,7 +104,7 @@ func (s *userServer) SetReceiveMessageOpt(ctx context.Context, req *pbUser.SetRe resp := pbUser.SetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{}} for _, v := range req.ConversationIDList { - resp.OptResultList = append(resp.OptResultList, &pbUser.OptResult{ConversationId: v, Result: 0}) + resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationID: v, Result: 0}) } log.NewInfo(req.OperationID, "SetReceiveMessageOpt rpc return ", resp.String()) return &resp, nil @@ -112,14 +112,14 @@ func (s *userServer) SetReceiveMessageOpt(ctx context.Context, req *pbUser.SetRe func (s *userServer) GetReceiveMessageOpt(ctx context.Context, req *pbUser.GetReceiveMessageOptReq) (*pbUser.GetReceiveMessageOptResp, error) { log.NewInfo(req.OperationID, "GetReceiveMessageOpt args ", req.String()) - m, err := db.DB.GetMultiConversationMsgOpt(req.FromUserID, req.ConversationIdList) + m, err := db.DB.GetMultiConversationMsgOpt(req.FromUserID, req.ConversationIDList) if err != nil { - log.NewError(req.OperationID, "GetMultiConversationMsgOpt failed ", err.Error(), req.FromUserID, req.ConversationIdList) + log.NewError(req.OperationID, "GetMultiConversationMsgOpt failed ", err.Error(), req.FromUserID, req.ConversationIDList) return &pbUser.GetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } resp := pbUser.GetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{}} for k, v := range m { - resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationId: k, Result: int32(v)}) + resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationID: k, Result: int32(v)}) } log.NewInfo(req.OperationID, "GetReceiveMessageOpt rpc return ", resp.String()) return &resp, nil @@ -134,7 +134,7 @@ func (s *userServer) GetAllConversationMsgOpt(ctx context.Context, req *pbUser.G } resp := pbUser.GetAllConversationMsgOptResp{CommonResp: &pbUser.CommonResp{}} for k, v := range m { - resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationId: k, Result: int32(v)}) + resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationID: k, Result: int32(v)}) } log.NewInfo(req.OperationID, "GetAllConversationMsgOpt rpc return ", resp.String()) return &resp, nil diff --git a/pkg/base_info/conversation_api_struct.go b/pkg/base_info/conversation_api_struct.go index 5642e8061..bd54bafbf 100644 --- a/pkg/base_info/conversation_api_struct.go +++ b/pkg/base_info/conversation_api_struct.go @@ -22,6 +22,7 @@ type GetReceiveMessageOptResp struct { ConversationOptResultList []*OptResult `json:"data"` } type SetReceiveMessageOptReq struct { + FromUserID string `json:"fromUserID" binding:"required"` OperationID string `json:"operationID" binding:"required"` Opt *int32 `json:"opt" binding:"required"` ConversationIDList []string `json:"conversationIDList" binding:"required"`