This commit is contained in:
wangchuxiao
2023-02-09 16:11:18 +08:00
parent 1075754458
commit ccc7e6b3c8
73 changed files with 153 additions and 160 deletions
+2 -2
View File
@@ -59,13 +59,13 @@ func TestName(t *testing.T) {
//NewRpc(bind, "", group.NewGroupClient, temp)
var c *gin.Context
NewRpc(NewApiBind[api_struct.KickGroupMemberReq, api_struct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember)
NewRpc(NewApiBind[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember)
}
func KickGroupMember(c *gin.Context) {
// 默认 全部自动
NewRpc(NewApiBind[api_struct.KickGroupMemberReq, api_struct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember).Execute()
NewRpc(NewApiBind[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember).Execute()
// 可以自定义编辑请求和响应
NewRpc(NewApiBind[api_struct.KickGroupMemberReq, api_struct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember).Before(func(apiReq *api_struct.KickGroupMemberReq, rpcReq *group.KickGroupMemberReq, bind func() error) error {
return bind()
@@ -4,7 +4,6 @@ import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/getcdv3"
utils2 "Open_IM/pkg/utils"
"context"
"fmt"
@@ -1,4 +1,4 @@
package cms_api
package cmsapi
import (
"Open_IM/internal/cms_api/admin"
@@ -19,8 +19,8 @@ import (
func GetUserIDByEmailAndPhoneNumber(c *gin.Context) {
var (
req cms_struct.GetUserIDByEmailAndPhoneNumberRequest
resp cms_struct.GetUserIDByEmailAndPhoneNumberResponse
req cmsstruct.GetUserIDByEmailAndPhoneNumberRequest
resp cmsstruct.GetUserIDByEmailAndPhoneNumberResponse
reqPb pbAdminCms.GetUserIDByEmailAndPhoneNumberReq
respPb *pbAdminCms.GetUserIDByEmailAndPhoneNumberResp
)
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"Open_IM/internal/common/network"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
discoveryRegistry "Open_IM/pkg/discovery_registry"
discoveryRegistry "Open_IM/pkg/discoveryregistry"
"github.com/OpenIMSDK/openKeeper"
"net"
"strconv"
@@ -45,7 +45,6 @@ func StartCronTask(userID, workingGroupID string) {
}
}
func getCronTaskOperationID() string {
return cronTaskOperationID + utils.OperationIDGenerator()
}
@@ -61,7 +61,7 @@ func (mmc *ModifyMsgConsumerHandler) ModifyMsg(cMsg *sarama.ConsumerMessage, msg
continue
}
if msgDataToMQ.MsgData.ContentType == constant.ReactionMessageModifier {
notification := &api_struct.ReactionMessageModifierNotification{}
notification := &apistruct.ReactionMessageModifierNotification{}
if err := json.Unmarshal(msgDataToMQ.MsgData.Content, notification); err != nil {
continue
}
@@ -104,7 +104,7 @@ func (mmc *ModifyMsgConsumerHandler) ModifyMsg(cMsg *sarama.ConsumerMessage, msg
}
}
} else if msgDataToMQ.MsgData.ContentType == constant.ReactionMessageDeleter {
notification := &api_struct.ReactionMessageDeleteNotification{}
notification := &apistruct.ReactionMessageDeleteNotification{}
if err := json.Unmarshal(msgDataToMQ.MsgData.Content, notification); err != nil {
continue
}
@@ -116,7 +116,7 @@ func (mmc *ModifyMsgConsumerHandler) ModifyMsg(cMsg *sarama.ConsumerMessage, msg
}
func UnMarshallSetReactionMsgContent(content []byte) (notification *api_struct.ReactionMessageModifierNotification, err error) {
func UnMarshallSetReactionMsgContent(content []byte) (notification *apistruct.ReactionMessageModifierNotification, err error) {
return notification, nil
}
+1 -1
View File
@@ -15,7 +15,7 @@ import (
promePkg "Open_IM/pkg/common/prometheus"
"Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/common/tracelog"
discoveryRegistry "Open_IM/pkg/discovery_registry"
discoveryRegistry "Open_IM/pkg/discoveryregistry"
pbGroup "Open_IM/pkg/proto/group"
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
+2 -2
View File
@@ -14,7 +14,7 @@ import (
func ExtendMessageUpdatedNotification(operationID, sendID string, sourceID string, sessionType int32,
req *msg.SetMessageReactionExtensionsReq, resp *msg.SetMessageReactionExtensionsResp, isHistory bool, isReactionFromCache bool) {
var m api_struct.ReactionMessageModifierNotification
var m apistruct.ReactionMessageModifierNotification
m.SourceID = req.SourceID
m.OpUserID = req.OpUserID
m.SessionType = req.SessionType
@@ -37,7 +37,7 @@ func ExtendMessageUpdatedNotification(operationID, sendID string, sourceID strin
}
func ExtendMessageDeleteNotification(operationID, sendID string, sourceID string, sessionType int32,
req *msg.DeleteMessageListReactionExtensionsReq, resp *msg.DeleteMessageListReactionExtensionsResp, isHistory bool, isReactionFromCache bool) {
var m api_struct.ReactionMessageDeleteNotification
var m apistruct.ReactionMessageDeleteNotification
m.SourceID = req.SourceID
m.OpUserID = req.OpUserID
m.SessionType = req.SessionType