mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Merge branch 'tuoyun'
# Conflicts: # config/config.yaml
This commit is contained in:
commit
44ffd98d0c
@ -1 +1 @@
|
||||
Subproject commit 9d67999cec3e4a9792c33a95e5514a945df54052
|
||||
Subproject commit 539290887aff41515b291b7ecf174af25887f870
|
@ -8,6 +8,7 @@ import (
|
||||
"Open_IM/internal/api/group"
|
||||
"Open_IM/internal/api/manage"
|
||||
"Open_IM/internal/api/office"
|
||||
"Open_IM/internal/api/organization"
|
||||
apiThird "Open_IM/internal/api/third"
|
||||
"Open_IM/internal/api/user"
|
||||
"Open_IM/pkg/common/config"
|
||||
@ -37,9 +38,10 @@ func main() {
|
||||
// user routing group, which handles user registration and login services
|
||||
userRouterGroup := r.Group("/user")
|
||||
{
|
||||
userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) //1
|
||||
userRouterGroup.POST("/get_users_info", user.GetUsersInfo) //1
|
||||
userRouterGroup.POST("/get_self_user_info", user.GetSelfUserInfo) //1
|
||||
userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) //1
|
||||
userRouterGroup.POST("/get_users_info", user.GetUsersInfo) //1
|
||||
userRouterGroup.POST("/get_self_user_info", user.GetSelfUserInfo) //1
|
||||
userRouterGroup.POST("/get_users_online_status", user.GetUsersOnlineStatus) //1
|
||||
}
|
||||
//friend routing group
|
||||
friendRouterGroup := r.Group("/friend")
|
||||
@ -83,6 +85,9 @@ func main() {
|
||||
groupRouterGroup.POST("/cancel_mute_group_member", group.CancelMuteGroupMember) //MuteGroup
|
||||
groupRouterGroup.POST("/mute_group", group.MuteGroup)
|
||||
groupRouterGroup.POST("/cancel_mute_group", group.CancelMuteGroup)
|
||||
|
||||
groupRouterGroup.POST("/set_group_member_nickname", group.SetGroupMemberNickname)
|
||||
|
||||
}
|
||||
//certificate
|
||||
authRouterGroup := r.Group("/auth")
|
||||
@ -135,7 +140,38 @@ func main() {
|
||||
officeGroup.POST("/set_tag", office.SetTag)
|
||||
officeGroup.POST("/send_msg_to_tag", office.SendMsg2Tag)
|
||||
officeGroup.POST("/get_send_tag_log", office.GetTagSendLogs)
|
||||
|
||||
officeGroup.POST("/create_one_work_moment", office.CreateOneWorkMoment)
|
||||
officeGroup.POST("/delete_one_work_moment", office.DeleteOneWorkMoment)
|
||||
officeGroup.POST("/like_one_work_moment", office.LikeOneWorkMoment)
|
||||
officeGroup.POST("/comment_one_work_moment", office.CommentOneWorkMoment)
|
||||
officeGroup.POST("/get_work_moment_by_id", office.GetWorkMomentByID)
|
||||
officeGroup.POST("/get_user_work_moments", office.GetUserWorkMoments)
|
||||
officeGroup.POST("/get_user_friend_work_moments", office.GetUserFriendWorkMoments)
|
||||
officeGroup.POST("/set_user_work_moments_level", office.SetUserWorkMomentsLevel)
|
||||
}
|
||||
|
||||
organizationGroup := r.Group("/organization")
|
||||
{
|
||||
organizationGroup.POST("/create_department", organization.CreateDepartment)
|
||||
organizationGroup.POST("/update_department", organization.UpdateDepartment)
|
||||
organizationGroup.POST("/get_sub_department", organization.GetSubDepartment)
|
||||
organizationGroup.POST("/delete_department", organization.DeleteDepartment)
|
||||
organizationGroup.POST("/get_all_department", organization.GetAllDepartment)
|
||||
|
||||
organizationGroup.POST("/create_organization_user", organization.CreateOrganizationUser)
|
||||
organizationGroup.POST("/update_organization_user", organization.UpdateOrganizationUser)
|
||||
organizationGroup.POST("/delete_organization_user", organization.DeleteOrganizationUser)
|
||||
|
||||
organizationGroup.POST("/create_department_member", organization.CreateDepartmentMember)
|
||||
organizationGroup.POST("/get_user_in_department", organization.GetUserInDepartment)
|
||||
organizationGroup.POST("/update_user_in_department", organization.UpdateUserInDepartment)
|
||||
|
||||
organizationGroup.POST("/get_department_member", organization.GetDepartmentMember)
|
||||
organizationGroup.POST("/delete_user_in_department", organization.DeleteUserInDepartment)
|
||||
|
||||
}
|
||||
|
||||
go apiThird.MinioInit()
|
||||
ginPort := flag.Int("port", 10000, "get ginServerPort from cmd,default 10000 as port")
|
||||
flag.Parse()
|
||||
|
25
cmd/rpc/open_im_organization/Makefile
Normal file
25
cmd/rpc/open_im_organization/Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_organization
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
15
cmd/rpc/open_im_organization/main.go
Normal file
15
cmd/rpc/open_im_organization/main.go
Normal file
@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"Open_IM/internal/rpc/organization"
|
||||
"flag"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rpcPort := flag.Int("port", 11200, "get RpcOrganizationPort from cmd,default 11200 as port")
|
||||
flag.Parse()
|
||||
fmt.Println("start organization rpc server, port: ", *rpcPort)
|
||||
rpcServer := organization.NewServer(*rpcPort)
|
||||
rpcServer.Run()
|
||||
}
|
@ -92,7 +92,9 @@ credential: #腾讯cos,发送图片、视频、文件时需要,请自行申
|
||||
minio: #MinIO 发送图片、视频、文件时需要,请自行申请后替换,必须修改。 客户端初始化InitSDK,中 object_storage参数为minio
|
||||
bucket: openim
|
||||
location: us-east-1
|
||||
endpoint: http://121.37.25.71:9000
|
||||
endpoint: http://127.0.0.1:9000 #minio外网ip 这个ip是给客户端访问的
|
||||
endpointInner: http://127.0.0.1:9000 #minio内网地址 如果im server 可以通过内网访问到 minio就可以填写
|
||||
endpointInnerEnable: true #是否启用minio内网地址 启用可以让桶初始化,IM server连接minio走内网地址访问
|
||||
accessKeyID: user12345
|
||||
secretAccessKey: key12345
|
||||
ali: # ali oss
|
||||
@ -120,6 +122,7 @@ rpcport: #rpc服务端口 默认即可
|
||||
openImMessageCmsPort: [ 10900 ]
|
||||
openImAdminCmsPort: [ 11000 ]
|
||||
openImOfficePort: [ 11100 ]
|
||||
openImOrganizationPort: [ 11200 ]
|
||||
c2c:
|
||||
callbackBeforeSendMsg:
|
||||
switch: false
|
||||
@ -142,6 +145,7 @@ rpcregistername: #rpc注册服务名,默认即可
|
||||
OpenImMessageCMSName: MessageCMS
|
||||
openImAdminCMSName: AdminCMS
|
||||
openImOfficeName: Office
|
||||
openImOrganizationName: Organization
|
||||
|
||||
log:
|
||||
storageLocation: ../logs/
|
||||
@ -165,7 +169,7 @@ longconnsvr:
|
||||
websocketMaxMsgLen: 4096
|
||||
websocketTimeOut: 10
|
||||
|
||||
## 推送只能开启一个
|
||||
## 推送只能开启一个 enable代表开启
|
||||
push:
|
||||
tpns: #腾讯推送,暂未测试 暂不要使用
|
||||
ios:
|
||||
@ -200,6 +204,9 @@ secret: tuoyun
|
||||
# 1:多平台登录:Android、iOS、Windows、Mac 每种平台只能一个在线,web端可以多个同时在线
|
||||
multiloginpolicy: 1
|
||||
|
||||
#chat log insert to db
|
||||
chatPersistenceMysql: true
|
||||
|
||||
#token config
|
||||
tokenpolicy:
|
||||
accessSecret: "open_im_server" #token生成相关,默认即可
|
||||
@ -428,6 +435,34 @@ notification:
|
||||
ext: "groupMemberCancelMuted ext"
|
||||
defaultTips:
|
||||
tips: "group Member Cancel Muted"
|
||||
|
||||
groupMemberInfoSet:
|
||||
conversation:
|
||||
reliabilityLevel: 2
|
||||
unreadCount: false
|
||||
offlinePush:
|
||||
switch: false
|
||||
title: "groupMemberInfoSet title"
|
||||
desc: "groupMemberInfoSet desc"
|
||||
ext: "groupMemberInfoSet ext"
|
||||
defaultTips:
|
||||
tips: "group member info set"
|
||||
|
||||
|
||||
organizationChanged:
|
||||
conversation:
|
||||
reliabilityLevel: 2
|
||||
unreadCount: false
|
||||
offlinePush:
|
||||
switch: false
|
||||
title: "organizationChanged title"
|
||||
desc: "organizationChanged desc"
|
||||
ext: "organizationChanged ext"
|
||||
defaultTips:
|
||||
tips: "organization changed"
|
||||
|
||||
|
||||
|
||||
#############################friend#################################
|
||||
|
||||
friendApplicationAdded:
|
||||
@ -565,7 +600,7 @@ notification:
|
||||
|
||||
conversationSetPrivate:
|
||||
conversation:
|
||||
reliabilityLevel: 2
|
||||
reliabilityLevel: 3
|
||||
unreadCount: true
|
||||
offlinePush:
|
||||
switch: true
|
||||
@ -576,6 +611,19 @@ notification:
|
||||
openTips: "burn after reading was opened"
|
||||
closeTips: "burn after reading was closed"
|
||||
|
||||
###################workMoments################
|
||||
workMomentsNotification:
|
||||
conversation:
|
||||
reliabilityLevel: 2
|
||||
unreadCount: true
|
||||
offlinePush:
|
||||
switch: true
|
||||
title: "burn after reading"
|
||||
desc: "burn after reading"
|
||||
ext: "burn after reading"
|
||||
defaultTips:
|
||||
openTips: "burn after reading was opened"
|
||||
closeTips: "burn after reading was closed"
|
||||
|
||||
|
||||
#---------------demo configuration---------------------#
|
||||
|
@ -23,8 +23,9 @@ func UserRegister(c *gin.Context) {
|
||||
}
|
||||
|
||||
if params.Secret != config.Config.Secret {
|
||||
log.NewError(params.OperationID, "params.Secret != config.Config.Secret", params.Secret, config.Config.Secret)
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "not authorized"})
|
||||
errMsg := " params.Secret != config.Config.Secret "
|
||||
log.NewError(params.OperationID, errMsg, params.Secret, config.Config.Secret)
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}}
|
||||
@ -36,7 +37,7 @@ func UserRegister(c *gin.Context) {
|
||||
client := rpc.NewAuthClient(etcdConn)
|
||||
reply, err := client.UserRegister(context.Background(), req)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "call rpc err ", err)
|
||||
log.NewError(req.OperationID, "call rpc err ", err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "internal service err"})
|
||||
return
|
||||
}
|
||||
@ -86,6 +87,6 @@ func UserToken(c *gin.Context) {
|
||||
}
|
||||
resp := api.UserTokenResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg},
|
||||
UserToken: api.UserTokenInfo{UserID: req.FromUserID, Token: reply.Token, ExpiredTime: reply.ExpiredTime}}
|
||||
log.NewInfo(req.OperationID, "UserRegister return ", resp)
|
||||
log.NewInfo(req.OperationID, "UserToken return ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
@ -696,3 +696,37 @@ func CancelMuteGroup(c *gin.Context) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
//SetGroupMemberNickname
|
||||
|
||||
func SetGroupMemberNickname(c *gin.Context) {
|
||||
params := api.SetGroupMemberNicknameReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
req := &rpc.SetGroupMemberNicknameReq{}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
var ok bool
|
||||
ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
||||
client := rpc.NewGroupClient(etcdConn)
|
||||
reply, err := client.SetGroupMemberNickname(context.Background(), req)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), " failed ", req.String())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
resp := api.SetGroupMemberNicknameResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
@ -118,6 +118,7 @@ func AccountCheck(c *gin.Context) {
|
||||
log.NewInfo(req.OperationID, "AccountCheck api return", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func GetUsersOnlineStatus(c *gin.Context) {
|
||||
params := api.GetUsersOnlineStatusReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
@ -133,6 +134,7 @@ func GetUsersOnlineStatus(c *gin.Context) {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
|
||||
log.NewInfo(params.OperationID, "GetUsersOnlineStatus args ", req.String())
|
||||
var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
|
||||
var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
|
||||
@ -176,5 +178,4 @@ func GetUsersOnlineStatus(c *gin.Context) {
|
||||
}
|
||||
log.NewInfo(req.OperationID, "GetUsersOnlineStatus api return", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
|
||||
}
|
||||
|
339
internal/api/office/work_moments.go
Normal file
339
internal/api/office/work_moments.go
Normal file
@ -0,0 +1,339 @@
|
||||
package office
|
||||
|
||||
import (
|
||||
apiStruct "Open_IM/pkg/base_info"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/common/token_verify"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbOffice "Open_IM/pkg/proto/office"
|
||||
pbCommon "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func CreateOneWorkMoment(c *gin.Context) {
|
||||
var (
|
||||
req apiStruct.CreateOneWorkMomentReq
|
||||
resp apiStruct.CreateOneWorkMomentResp
|
||||
reqPb pbOffice.CreateOneWorkMomentReq
|
||||
respPb *pbOffice.CreateOneWorkMomentResp
|
||||
)
|
||||
if err := c.BindJSON(&req); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&reqPb, req); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
reqPb.WorkMoment.UserID = userID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
||||
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
||||
respPb, err := client.CreateOneWorkMoment(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "CreateOneWorkMoment rpc failed", err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CreateOneWorkMoment rpc server failed" + err.Error()})
|
||||
return
|
||||
}
|
||||
resp.CommResp = apiStruct.CommResp{
|
||||
ErrCode: respPb.CommonResp.ErrCode,
|
||||
ErrMsg: respPb.CommonResp.ErrMsg,
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func DeleteOneWorkMoment(c *gin.Context) {
|
||||
var (
|
||||
req apiStruct.DeleteOneWorkMomentReq
|
||||
resp apiStruct.DeleteOneWorkMomentResp
|
||||
reqPb pbOffice.DeleteOneWorkMomentReq
|
||||
respPb *pbOffice.DeleteOneWorkMomentResp
|
||||
)
|
||||
if err := c.BindJSON(&req); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&reqPb, req); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
||||
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
||||
respPb, err := client.DeleteOneWorkMoment(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "DeleteOneWorkMoment rpc failed", err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "DeleteOneWorkMoment rpc server failed" + err.Error()})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func LikeOneWorkMoment(c *gin.Context) {
|
||||
var (
|
||||
req apiStruct.LikeOneWorkMomentReq
|
||||
resp apiStruct.LikeOneWorkMomentResp
|
||||
reqPb pbOffice.LikeOneWorkMomentReq
|
||||
respPb *pbOffice.LikeOneWorkMomentResp
|
||||
)
|
||||
if err := c.BindJSON(&req); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&reqPb, req); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
||||
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
||||
respPb, err := client.LikeOneWorkMoment(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "LikeOneWorkMoment rpc failed", err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "LikeOneWorkMoment rpc server failed" + err.Error()})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func CommentOneWorkMoment(c *gin.Context) {
|
||||
var (
|
||||
req apiStruct.CommentOneWorkMomentReq
|
||||
resp apiStruct.CommentOneWorkMomentResp
|
||||
reqPb pbOffice.CommentOneWorkMomentReq
|
||||
respPb *pbOffice.CommentOneWorkMomentResp
|
||||
)
|
||||
if err := c.BindJSON(&req); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&reqPb, req); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
||||
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
||||
respPb, err := client.CommentOneWorkMoment(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "CommentOneWorkMoment rpc failed", err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CommentOneWorkMoment rpc server failed" + err.Error()})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func GetWorkMomentByID(c *gin.Context) {
|
||||
var (
|
||||
req apiStruct.GetWorkMomentByIDReq
|
||||
resp apiStruct.GetWorkMomentByIDResp
|
||||
reqPb pbOffice.GetWorkMomentByIDReq
|
||||
respPb *pbOffice.GetWorkMomentByIDResp
|
||||
)
|
||||
if err := c.BindJSON(&req); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
reqPb.OperationID = req.OperationID
|
||||
reqPb.OpUserID = userID
|
||||
reqPb.WorkMomentID = req.WorkMomentID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
||||
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
||||
respPb, err := client.GetWorkMomentByID(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserWorkMoments rpc failed", err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserWorkMoments rpc server failed" + err.Error()})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
//resp.Data.WorkMoment = respPb.WorkMoment
|
||||
resp.Data.WorkMoment = &apiStruct.WorkMoment{}
|
||||
if err := utils.CopyStructFields(&resp.Data.WorkMoment, respPb.WorkMoment); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func GetUserWorkMoments(c *gin.Context) {
|
||||
var (
|
||||
req apiStruct.GetUserWorkMomentsReq
|
||||
resp apiStruct.GetUserWorkMomentsResp
|
||||
reqPb pbOffice.GetUserWorkMomentsReq
|
||||
respPb *pbOffice.GetUserWorkMomentsResp
|
||||
)
|
||||
if err := c.BindJSON(&req); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
reqPb.OperationID = req.OperationID
|
||||
reqPb.Pagination = &pbCommon.RequestPagination{
|
||||
PageNumber: req.PageNumber,
|
||||
ShowNumber: req.ShowNumber,
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
||||
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
||||
respPb, err := client.GetUserWorkMoments(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserWorkMoments rpc failed", err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserWorkMoments rpc server failed" + err.Error()})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
resp.Data.ShowNumber = respPb.Pagination.ShowNumber
|
||||
resp.Data.CurrentPage = respPb.Pagination.CurrentPage
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func GetUserFriendWorkMoments(c *gin.Context) {
|
||||
var (
|
||||
req apiStruct.GetUserFriendWorkMomentsReq
|
||||
resp apiStruct.GetUserFriendWorkMomentsResp
|
||||
reqPb pbOffice.GetUserFriendWorkMomentsReq
|
||||
respPb *pbOffice.GetUserFriendWorkMomentsResp
|
||||
)
|
||||
if err := c.BindJSON(&req); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
reqPb.OperationID = req.OperationID
|
||||
reqPb.Pagination = &pbCommon.RequestPagination{
|
||||
PageNumber: req.PageNumber,
|
||||
ShowNumber: req.ShowNumber,
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
||||
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
||||
respPb, err := client.GetUserFriendWorkMoments(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserFriendWorkMoments rpc failed", err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserFriendWorkMoments rpc server failed" + err.Error()})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
resp.Data.ShowNumber = respPb.Pagination.ShowNumber
|
||||
resp.Data.CurrentPage = respPb.Pagination.CurrentPage
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func SetUserWorkMomentsLevel(c *gin.Context) {
|
||||
var (
|
||||
req apiStruct.SetUserWorkMomentsLevelReq
|
||||
resp apiStruct.SetUserWorkMomentsLevelResp
|
||||
reqPb pbOffice.SetUserWorkMomentsLevelReq
|
||||
respPb *pbOffice.SetUserWorkMomentsLevelResp
|
||||
)
|
||||
if err := c.BindJSON(&req); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&reqPb, req); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
||||
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
||||
respPb, err := client.SetUserWorkMomentsLevel(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetUserWorkMomentsLevel rpc failed", err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "SetUserWorkMomentsLevel rpc server failed" + err.Error()})
|
||||
return
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
443
internal/api/organization/organization.go
Normal file
443
internal/api/organization/organization.go
Normal file
@ -0,0 +1,443 @@
|
||||
package organization
|
||||
|
||||
import (
|
||||
jsonData "Open_IM/internal/utils"
|
||||
api "Open_IM/pkg/base_info"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/common/token_verify"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
rpc "Open_IM/pkg/proto/organization"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func CreateDepartment(c *gin.Context) {
|
||||
params := api.CreateDepartmentReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
req := &rpc.CreateDepartmentReq{DepartmentInfo: &open_im_sdk.Department{}}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
utils.CopyStructFields(req.DepartmentInfo, ¶ms)
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + " " + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.CreateDepartment(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc CreateDepartment failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.CreateDepartmentResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Department: RpcResp.DepartmentInfo}
|
||||
apiResp.Data = jsonData.JsonDataOne(RpcResp.DepartmentInfo)
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func UpdateDepartment(c *gin.Context) {
|
||||
params := api.UpdateDepartmentReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
req := &rpc.UpdateDepartmentReq{DepartmentInfo: &open_im_sdk.Department{}}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
utils.CopyStructFields(req.DepartmentInfo, ¶ms)
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.UpdateDepartment(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc UpdateDepartment failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.UpdateDepartmentResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func GetSubDepartment(c *gin.Context) {
|
||||
params := api.GetSubDepartmentReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
req := &rpc.GetSubDepartmentReq{}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.GetSubDepartment(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc GetDepartment failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.GetSubDepartmentResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, DepartmentList: RpcResp.DepartmentList}
|
||||
apiResp.Data = jsonData.JsonDataList(RpcResp.DepartmentList)
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func GetAllDepartment(c *gin.Context) {
|
||||
|
||||
}
|
||||
|
||||
func DeleteDepartment(c *gin.Context) {
|
||||
params := api.DeleteDepartmentReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
req := &rpc.DeleteDepartmentReq{}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.DeleteDepartment(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc DeleteDepartment failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.DeleteDepartmentResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func CreateOrganizationUser(c *gin.Context) {
|
||||
params := api.CreateOrganizationUserReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
req := &rpc.CreateOrganizationUserReq{OrganizationUser: &open_im_sdk.OrganizationUser{}}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
utils.CopyStructFields(req.OrganizationUser, ¶ms)
|
||||
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.CreateOrganizationUser(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc CreateOrganizationUser failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.CreateOrganizationUserResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func UpdateOrganizationUser(c *gin.Context) {
|
||||
params := api.UpdateOrganizationUserReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
req := &rpc.UpdateOrganizationUserReq{OrganizationUser: &open_im_sdk.OrganizationUser{}}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
utils.CopyStructFields(req.OrganizationUser, ¶ms)
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.UpdateOrganizationUser(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc UpdateOrganizationUser failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.UpdateOrganizationUserResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func CreateDepartmentMember(c *gin.Context) {
|
||||
params := api.CreateDepartmentMemberReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
req := &rpc.CreateDepartmentMemberReq{DepartmentMember: &open_im_sdk.DepartmentMember{}}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
utils.CopyStructFields(req.DepartmentMember, ¶ms)
|
||||
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.CreateDepartmentMember(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc CreateDepartmentMember failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.CreateDepartmentMemberResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func GetUserInDepartment(c *gin.Context) {
|
||||
params := api.GetUserInDepartmentReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
req := &rpc.GetUserInDepartmentReq{}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.GetUserInDepartment(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc GetUserInDepartment failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.GetUserInDepartmentResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, UserInDepartment: RpcResp.UserInDepartment}
|
||||
apiResp.Data = jsonData.JsonDataOne(RpcResp.UserInDepartment)
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func UpdateUserInDepartment(c *gin.Context) {
|
||||
params := api.UpdateUserInDepartmentReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
req := &rpc.UpdateUserInDepartmentReq{DepartmentMember: &open_im_sdk.DepartmentMember{}}
|
||||
utils.CopyStructFields(req.DepartmentMember, ¶ms)
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.UpdateUserInDepartment(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc UpdateUserInDepartment failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.UpdateUserInDepartmentResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func DeleteOrganizationUser(c *gin.Context) {
|
||||
params := api.DeleteOrganizationUserReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
req := &rpc.DeleteOrganizationUserReq{}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.DeleteOrganizationUser(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc DeleteOrganizationUser failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.DeleteOrganizationUserResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func GetDepartmentMember(c *gin.Context) {
|
||||
params := api.GetDepartmentMemberReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
req := &rpc.GetDepartmentMemberReq{}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.GetDepartmentMember(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc GetDepartmentMember failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.GetDepartmentMemberResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, UserInDepartmentList: RpcResp.UserDepartmentMemberList}
|
||||
apiResp.Data = jsonData.JsonDataList(RpcResp.UserDepartmentMemberList)
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
||||
|
||||
func DeleteUserInDepartment(c *gin.Context) {
|
||||
params := api.DeleteUserInDepartmentReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
req := &rpc.DeleteUserInDepartmentReq{}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
|
||||
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
|
||||
req.OpUserID = opUserID
|
||||
if err != nil {
|
||||
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
|
||||
log.NewError(req.OperationID, errMsg, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||
client := rpc.NewOrganizationClient(etcdConn)
|
||||
RpcResp, err := client.DeleteUserInDepartment(context.Background(), req)
|
||||
if err != nil {
|
||||
errMsg := "rpc DeleteUserInDepartment failed " + err.Error() + req.String()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
|
||||
apiResp := api.DeleteUserInDepartmentResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
|
||||
c.JSON(http.StatusOK, apiResp)
|
||||
}
|
@ -17,7 +17,14 @@ var (
|
||||
func MinioInit() {
|
||||
operationID := utils.OperationIDGenerator()
|
||||
log.NewInfo(operationID, utils.GetSelfFuncName(), "minio config: ", config.Config.Credential.Minio)
|
||||
minioUrl, err := url2.Parse(config.Config.Credential.Minio.Endpoint)
|
||||
var initUrl string
|
||||
if config.Config.Credential.Minio.EndpointInnerEnable {
|
||||
initUrl = config.Config.Credential.Minio.EndpointInner
|
||||
} else {
|
||||
initUrl = config.Config.Credential.Minio.Endpoint
|
||||
}
|
||||
log.NewInfo(operationID, utils.GetSelfFuncName(), "use initUrl: ", initUrl)
|
||||
minioUrl, err := url2.Parse(initUrl)
|
||||
if err != nil {
|
||||
log.NewError(operationID, utils.GetSelfFuncName(), "parse failed, please check config/config.yaml", err.Error())
|
||||
return
|
||||
|
@ -111,7 +111,13 @@ func MinioStorageCredential(c *gin.Context) {
|
||||
stsOpts.AccessKey = config.Config.Credential.Minio.AccessKeyID
|
||||
stsOpts.SecretKey = config.Config.Credential.Minio.SecretAccessKey
|
||||
stsOpts.DurationSeconds = constant.MinioDurationTimes
|
||||
li, err := cr.NewSTSAssumeRole(config.Config.Credential.Minio.Endpoint, stsOpts)
|
||||
var endpoint string
|
||||
if config.Config.Credential.Minio.EndpointInnerEnable {
|
||||
endpoint = config.Config.Credential.Minio.EndpointInner
|
||||
} else {
|
||||
endpoint = config.Config.Credential.Minio.Endpoint
|
||||
}
|
||||
li, err := cr.NewSTSAssumeRole(endpoint, stsOpts)
|
||||
if err != nil {
|
||||
log.NewError("", utils.GetSelfFuncName(), "NewSTSAssumeRole failed", err.Error(), stsOpts, config.Config.Credential.Minio.Endpoint)
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
|
@ -4,9 +4,11 @@ import (
|
||||
jsonData "Open_IM/internal/utils"
|
||||
api "Open_IM/pkg/base_info"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/common/token_verify"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbRelay "Open_IM/pkg/proto/relay"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
rpc "Open_IM/pkg/proto/user"
|
||||
"Open_IM/pkg/utils"
|
||||
@ -127,3 +129,70 @@ func GetSelfUserInfo(c *gin.Context) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func GetUsersOnlineStatus(c *gin.Context) {
|
||||
params := api.GetUsersOnlineStatusReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
req := &pbRelay.GetUsersOnlineStatusReq{}
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
var ok bool
|
||||
ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
return
|
||||
}
|
||||
if len(config.Config.Manager.AppManagerUid) == 0 {
|
||||
log.NewError(req.OperationID, "Manager == 0")
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "Manager == 0"})
|
||||
return
|
||||
}
|
||||
req.OpUserID = config.Config.Manager.AppManagerUid[0]
|
||||
|
||||
log.NewInfo(params.OperationID, "GetUsersOnlineStatus args ", req.String())
|
||||
var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
|
||||
var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
|
||||
flag := false
|
||||
grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName)
|
||||
for _, v := range grpcCons {
|
||||
client := pbRelay.NewOnlineMessageRelayServiceClient(v)
|
||||
reply, err := client.GetUsersOnlineStatus(context.Background(), req)
|
||||
if err != nil {
|
||||
log.NewError(params.OperationID, "GetUsersOnlineStatus rpc err", req.String(), err.Error())
|
||||
continue
|
||||
} else {
|
||||
if reply.ErrCode == 0 {
|
||||
wsResult = append(wsResult, reply.SuccessResult...)
|
||||
}
|
||||
}
|
||||
}
|
||||
log.NewInfo(params.OperationID, "call GetUsersOnlineStatus rpc server is success", wsResult)
|
||||
//Online data merge of each node
|
||||
for _, v1 := range params.UserIDList {
|
||||
flag = false
|
||||
temp := new(pbRelay.GetUsersOnlineStatusResp_SuccessResult)
|
||||
for _, v2 := range wsResult {
|
||||
if v2.UserID == v1 {
|
||||
flag = true
|
||||
temp.UserID = v1
|
||||
temp.Status = constant.OnlineStatus
|
||||
temp.DetailPlatformStatus = append(temp.DetailPlatformStatus, v2.DetailPlatformStatus...)
|
||||
}
|
||||
|
||||
}
|
||||
if !flag {
|
||||
temp.UserID = v1
|
||||
temp.Status = constant.OfflineStatus
|
||||
}
|
||||
respResult = append(respResult, temp)
|
||||
}
|
||||
resp := api.GetUsersOnlineStatusResp{CommResp: api.CommResp{ErrCode: 0, ErrMsg: ""}, SuccessResult: respResult}
|
||||
if len(respResult) == 0 {
|
||||
resp.SuccessResult = []*pbRelay.GetUsersOnlineStatusResp_SuccessResult{}
|
||||
}
|
||||
log.NewInfo(req.OperationID, "GetUsersOnlineStatus api return", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ func (r *RPCServer) OnlinePushMsg(_ context.Context, in *pbRelay.OnlinePushMsgRe
|
||||
}
|
||||
func (r *RPCServer) GetUsersOnlineStatus(_ context.Context, req *pbRelay.GetUsersOnlineStatusReq) (*pbRelay.GetUsersOnlineStatusResp, error) {
|
||||
log.NewInfo(req.OperationID, "rpc GetUsersOnlineStatus arrived server", req.String())
|
||||
if !token_verify.IsMangerUserID(req.OpUserID) {
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
log.NewError(req.OperationID, "no permission GetUsersOnlineStatus ", req.OpUserID)
|
||||
return &pbRelay.GetUsersOnlineStatusResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil
|
||||
}
|
||||
|
@ -262,20 +262,26 @@ func (ws *WServer) getUserUid(conn *UserConn) (uid, platform string) {
|
||||
func (ws *WServer) headerCheck(w http.ResponseWriter, r *http.Request) bool {
|
||||
status := http.StatusUnauthorized
|
||||
query := r.URL.Query()
|
||||
operationID := ""
|
||||
if len(query["operationID"]) != 0 {
|
||||
operationID = query["operationID"][0]
|
||||
}
|
||||
if len(query["token"]) != 0 && len(query["sendID"]) != 0 && len(query["platformID"]) != 0 {
|
||||
if ok, err, msg := token_verify.WsVerifyToken(query["token"][0], query["sendID"][0], query["platformID"][0]); !ok {
|
||||
e := err.(*constant.ErrInfo)
|
||||
log.ErrorByKv("Token verify failed", "", "query", query, msg)
|
||||
// e := err.(*constant.ErrInfo)
|
||||
log.Error(operationID, "Token verify failed ", "query ", query, msg, err.Error())
|
||||
w.Header().Set("Sec-Websocket-Version", "13")
|
||||
http.Error(w, e.ErrMsg, int(e.ErrCode))
|
||||
w.Header().Set("ws_err_msg", err.Error())
|
||||
http.Error(w, err.Error(), status)
|
||||
return false
|
||||
} else {
|
||||
log.InfoByKv("Connection Authentication Success", "", "token", query["token"][0], "userID", query["sendID"][0])
|
||||
log.Info(operationID, "Connection Authentication Success", "", "token", query["token"][0], "userID", query["sendID"][0])
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
log.ErrorByKv("Args err", "", "query", query)
|
||||
log.Error(operationID, "Args err", "query", query)
|
||||
w.Header().Set("Sec-Websocket-Version", "13")
|
||||
w.Header().Set("ws_err_msg", "args err")
|
||||
http.Error(w, http.StatusText(status), status)
|
||||
return false
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ package logic
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
|
||||
"Open_IM/pkg/common/kafka"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -20,6 +20,10 @@ func Init() {
|
||||
}
|
||||
func Run() {
|
||||
//register mysqlConsumerHandler to
|
||||
go persistentCH.persistentConsumerGroup.RegisterHandleAndConsumer(&persistentCH)
|
||||
if config.Config.ChatPersistenceMysql {
|
||||
go persistentCH.persistentConsumerGroup.RegisterHandleAndConsumer(&persistentCH)
|
||||
} else {
|
||||
fmt.Println("not start mysql consumer")
|
||||
}
|
||||
go historyCH.historyConsumerGroup.RegisterHandleAndConsumer(&historyCH)
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ import (
|
||||
"Open_IM/pkg/utils"
|
||||
"bytes"
|
||||
"crypto/sha256"
|
||||
"errors"
|
||||
|
||||
//"crypto/sha512"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
@ -18,10 +20,12 @@ import (
|
||||
|
||||
var (
|
||||
GetuiClient *Getui
|
||||
|
||||
TokenExpireError = errors.New("token expire")
|
||||
)
|
||||
|
||||
const (
|
||||
PushURL = "/push/single/cid"
|
||||
PushURL = "/push/single/alias"
|
||||
AuthURL = "/auth"
|
||||
)
|
||||
|
||||
@ -51,31 +55,50 @@ type AuthResp struct {
|
||||
type PushReq struct {
|
||||
RequestID string `json:"request_id"`
|
||||
Audience struct {
|
||||
Cid []string `json:"cid"`
|
||||
Alias []string `json:"alias"`
|
||||
} `json:"audience"`
|
||||
PushMessage struct {
|
||||
Notification Notification `json:"notification,omitempty"`
|
||||
Transmission string `json:"transmission,omitempty"`
|
||||
} `json:"push_message"`
|
||||
PushChannel struct {
|
||||
Ios Ios `json:"ios"`
|
||||
Android Android `json:"android"`
|
||||
} `json:"push_channel"`
|
||||
}
|
||||
|
||||
type Ios struct {
|
||||
Aps struct {
|
||||
Sound string `json:"sound"`
|
||||
Alert Alert `json:"alert"`
|
||||
} `json:"aps"`
|
||||
}
|
||||
|
||||
type Alert struct {
|
||||
Title string `json:"title"`
|
||||
Body string `json:"body"`
|
||||
}
|
||||
|
||||
type Android struct {
|
||||
Ups struct {
|
||||
Notification Notification `json:"notification"`
|
||||
} `json:"ups"`
|
||||
}
|
||||
|
||||
type Notification struct {
|
||||
Title string `json:"title"`
|
||||
Body string `json:"body"`
|
||||
ClickType string `json:"click_type"`
|
||||
//Intent string `json:"intent,omitempty"`
|
||||
//Url string `json:"url,omitempty"`
|
||||
}
|
||||
|
||||
type PushResp struct {
|
||||
GetuiCommonResp
|
||||
}
|
||||
|
||||
func newGetuiClient() *Getui {
|
||||
return &Getui{}
|
||||
}
|
||||
|
||||
func (g *Getui) Push(userIDList []string, alert, detailContent, platform, operationID string) (resp string, err error) {
|
||||
func (g *Getui) Push(userIDList []string, alert, detailContent, operationID string) (resp string, err error) {
|
||||
token, err := db.DB.GetGetuiToken()
|
||||
log.NewDebug(operationID, utils.GetSelfFuncName(), "token:", token)
|
||||
if err != nil {
|
||||
@ -91,23 +114,38 @@ func (g *Getui) Push(userIDList []string, alert, detailContent, platform, operat
|
||||
pushReq := PushReq{
|
||||
RequestID: utils.OperationIDGenerator(),
|
||||
Audience: struct {
|
||||
Cid []string `json:"cid"`
|
||||
}{Cid: []string{userIDList[0]}},
|
||||
Alias []string `json:"alias"`
|
||||
}{Alias: []string{userIDList[0]}},
|
||||
}
|
||||
pushReq.PushMessage.Notification = Notification{
|
||||
Title: alert,
|
||||
Body: alert,
|
||||
ClickType: "startapp",
|
||||
}
|
||||
pushReq.PushChannel.Ios.Aps.Sound = "default"
|
||||
pushReq.PushChannel.Ios.Aps.Alert = Alert{
|
||||
Title: alert,
|
||||
Body: alert,
|
||||
}
|
||||
pushReq.PushChannel.Android.Ups.Notification = Notification{
|
||||
Title: alert,
|
||||
Body: alert,
|
||||
ClickType: "startapp",
|
||||
}
|
||||
pushResp := PushResp{}
|
||||
err = g.request(PushURL, pushReq, token, &pushResp, operationID)
|
||||
switch err {
|
||||
case TokenExpireError:
|
||||
token, err = g.getTokenAndSave2Redis(operationID)
|
||||
if err != nil {
|
||||
log.NewError(operationID, utils.GetSelfFuncName(), "getTokenAndSave2Redis failed, ", err.Error())
|
||||
} else {
|
||||
log.NewInfo(operationID, utils.GetSelfFuncName(), "getTokenAndSave2Redis: ", token)
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return "", utils.Wrap(err, "push failed")
|
||||
}
|
||||
log.NewDebug(operationID, utils.GetSelfFuncName(), "resp: ", pushResp)
|
||||
if pushResp.Code == 10001 {
|
||||
_, _ = g.getTokenAndSave2Redis(operationID)
|
||||
}
|
||||
respBytes, err := json.Marshal(pushResp)
|
||||
return string(respBytes), utils.Wrap(err, "")
|
||||
}
|
||||
@ -164,6 +202,9 @@ func (g *Getui) request(url string, content interface{}, token string, returnStr
|
||||
if err := json.Unmarshal(result, &commonResp); err != nil {
|
||||
return err
|
||||
}
|
||||
if commonResp.Code == 10001 {
|
||||
return TokenExpireError
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -32,13 +32,13 @@ func (j *JPush) SetAlias(cid, alias string) (resp string, err error) {
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (j *JPush) Push(accounts []string, alert, detailContent, platform, operationID string) (string, error) {
|
||||
func (j *JPush) Push(accounts []string, alert, detailContent, operationID string) (string, error) {
|
||||
var pf requestBody.Platform
|
||||
_ = pf.SetPlatform(platform)
|
||||
pf.SetAll()
|
||||
var au requestBody.Audience
|
||||
au.SetAlias(accounts)
|
||||
var no requestBody.Notification
|
||||
no.SetAlert(alert, platform)
|
||||
no.SetAlert(alert)
|
||||
var me requestBody.Message
|
||||
me.SetMsgContent(detailContent)
|
||||
var o requestBody.Options
|
||||
|
@ -2,7 +2,6 @@ package requestBody
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
)
|
||||
|
||||
type Notification struct {
|
||||
@ -23,18 +22,14 @@ type Ios struct {
|
||||
Badge string `json:"badge,omitempty"`
|
||||
}
|
||||
|
||||
func (n *Notification) SetAlert(alert, platform string) {
|
||||
func (n *Notification) SetAlert(alert string) {
|
||||
n.Alert = alert
|
||||
switch platform {
|
||||
case constant.AndroidPlatformStr:
|
||||
n.Android.Alert = alert
|
||||
n.SetAndroidIntent()
|
||||
case constant.IOSPlatformStr:
|
||||
n.IOS.Alert = alert
|
||||
n.IOS.Sound = "default"
|
||||
n.IOS.Badge = "+1"
|
||||
default:
|
||||
}
|
||||
n.Android.Alert = alert
|
||||
n.SetAndroidIntent()
|
||||
n.IOS.Alert = alert
|
||||
n.IOS.Sound = "default"
|
||||
n.IOS.Badge = "+1"
|
||||
|
||||
}
|
||||
func (n *Notification) SetAndroidIntent() {
|
||||
n.Android.Intent.URL = config.Config.Push.Jpns.PushIntent
|
||||
|
@ -59,68 +59,66 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
|
||||
if v.ResultCode == 0 {
|
||||
continue
|
||||
}
|
||||
//supported terminal
|
||||
for _, t := range pushTerminal {
|
||||
if v.RecvPlatFormID == t {
|
||||
//Use offline push messaging
|
||||
var UIDList []string
|
||||
UIDList = append(UIDList, v.RecvID)
|
||||
customContent := OpenIMContent{
|
||||
SessionType: int(pushMsg.MsgData.SessionType),
|
||||
From: pushMsg.MsgData.SendID,
|
||||
To: pushMsg.MsgData.RecvID,
|
||||
Seq: pushMsg.MsgData.Seq,
|
||||
}
|
||||
bCustomContent, _ := json.Marshal(customContent)
|
||||
jsonCustomContent := string(bCustomContent)
|
||||
var content string
|
||||
if pushMsg.MsgData.OfflinePushInfo != nil {
|
||||
content = pushMsg.MsgData.OfflinePushInfo.Title
|
||||
|
||||
} else {
|
||||
switch pushMsg.MsgData.ContentType {
|
||||
case constant.Text:
|
||||
content = constant.ContentType2PushContent[constant.Text]
|
||||
case constant.Picture:
|
||||
content = constant.ContentType2PushContent[constant.Picture]
|
||||
case constant.Voice:
|
||||
content = constant.ContentType2PushContent[constant.Voice]
|
||||
case constant.Video:
|
||||
content = constant.ContentType2PushContent[constant.Video]
|
||||
case constant.File:
|
||||
content = constant.ContentType2PushContent[constant.File]
|
||||
case constant.AtText:
|
||||
a := AtContent{}
|
||||
_ = utils.JsonStringToStruct(string(pushMsg.MsgData.Content), &a)
|
||||
if utils.IsContain(v.RecvID, a.AtUserList) {
|
||||
content = constant.ContentType2PushContent[constant.AtText] + constant.ContentType2PushContent[constant.Common]
|
||||
} else {
|
||||
content = constant.ContentType2PushContent[constant.GroupMsg]
|
||||
}
|
||||
default:
|
||||
content = constant.ContentType2PushContent[constant.Common]
|
||||
}
|
||||
}
|
||||
var offlinePusher pusher.OfflinePusher
|
||||
if config.Config.Push.Getui.Enable {
|
||||
log.NewInfo(pushMsg.OperationID, utils.GetSelfFuncName(), config.Config.Push.Getui)
|
||||
offlinePusher = getui.GetuiClient
|
||||
}
|
||||
if config.Config.Push.Jpns.Enable {
|
||||
offlinePusher = jpush.JPushClient
|
||||
}
|
||||
if offlinePusher == nil {
|
||||
offlinePusher = jpush.JPushClient
|
||||
}
|
||||
pushResult, err := offlinePusher.Push(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t), pushMsg.OperationID)
|
||||
if err != nil {
|
||||
log.NewError(pushMsg.OperationID, "offline push error", pushMsg.String(), err.Error(), constant.PlatformIDToName(t))
|
||||
} else {
|
||||
log.NewDebug(pushMsg.OperationID, "offline push return result is ", pushResult, pushMsg.MsgData, constant.PlatformIDToName(t))
|
||||
}
|
||||
|
||||
if utils.IsContainInt32(v.RecvPlatFormID, pushTerminal) {
|
||||
//Use offline push messaging
|
||||
var UIDList []string
|
||||
UIDList = append(UIDList, v.RecvID)
|
||||
customContent := OpenIMContent{
|
||||
SessionType: int(pushMsg.MsgData.SessionType),
|
||||
From: pushMsg.MsgData.SendID,
|
||||
To: pushMsg.MsgData.RecvID,
|
||||
Seq: pushMsg.MsgData.Seq,
|
||||
}
|
||||
bCustomContent, _ := json.Marshal(customContent)
|
||||
jsonCustomContent := string(bCustomContent)
|
||||
var content string
|
||||
if pushMsg.MsgData.OfflinePushInfo != nil {
|
||||
content = pushMsg.MsgData.OfflinePushInfo.Title
|
||||
|
||||
} else {
|
||||
switch pushMsg.MsgData.ContentType {
|
||||
case constant.Text:
|
||||
content = constant.ContentType2PushContent[constant.Text]
|
||||
case constant.Picture:
|
||||
content = constant.ContentType2PushContent[constant.Picture]
|
||||
case constant.Voice:
|
||||
content = constant.ContentType2PushContent[constant.Voice]
|
||||
case constant.Video:
|
||||
content = constant.ContentType2PushContent[constant.Video]
|
||||
case constant.File:
|
||||
content = constant.ContentType2PushContent[constant.File]
|
||||
case constant.AtText:
|
||||
a := AtContent{}
|
||||
_ = utils.JsonStringToStruct(string(pushMsg.MsgData.Content), &a)
|
||||
if utils.IsContain(v.RecvID, a.AtUserList) {
|
||||
content = constant.ContentType2PushContent[constant.AtText] + constant.ContentType2PushContent[constant.Common]
|
||||
} else {
|
||||
content = constant.ContentType2PushContent[constant.GroupMsg]
|
||||
}
|
||||
default:
|
||||
content = constant.ContentType2PushContent[constant.Common]
|
||||
}
|
||||
}
|
||||
var offlinePusher pusher.OfflinePusher
|
||||
if config.Config.Push.Getui.Enable {
|
||||
log.NewInfo(pushMsg.OperationID, utils.GetSelfFuncName(), config.Config.Push.Getui)
|
||||
offlinePusher = getui.GetuiClient
|
||||
}
|
||||
if config.Config.Push.Jpns.Enable {
|
||||
offlinePusher = jpush.JPushClient
|
||||
}
|
||||
if offlinePusher == nil {
|
||||
offlinePusher = jpush.JPushClient
|
||||
}
|
||||
pushResult, err := offlinePusher.Push(UIDList, content, jsonCustomContent, pushMsg.OperationID)
|
||||
if err != nil {
|
||||
log.NewError(pushMsg.OperationID, "offline push error", pushMsg.String(), err.Error())
|
||||
} else {
|
||||
log.NewDebug(pushMsg.OperationID, "offline push return result is ", pushResult, pushMsg.MsgData)
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
package push
|
||||
|
||||
type OfflinePusher interface {
|
||||
Push(userIDList []string, alert, detailContent, platform, operationID string) (resp string, err error)
|
||||
Push(userIDList []string, alert, detailContent, operationID string) (resp string, err error)
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ import (
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbGroup "Open_IM/pkg/proto/group"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
pbUser "Open_IM/pkg/proto/user"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"net"
|
||||
@ -202,15 +203,19 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo
|
||||
func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.InviteUserToGroupReq) (*pbGroup.InviteUserToGroupResp, error) {
|
||||
log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String())
|
||||
|
||||
if !imdb.IsExistGroupMember(req.GroupID, req.OpUserID) && !token_verify.IsMangerUserID(req.OpUserID) {
|
||||
if !imdb.IsExistGroupMember(req.GroupID, req.OpUserID) && !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
log.NewError(req.OperationID, "no permission InviteUserToGroup ", req.GroupID, req.OpUserID)
|
||||
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil
|
||||
}
|
||||
|
||||
_, err := imdb.GetGroupInfoByGroupID(req.GroupID)
|
||||
groupInfo, err := imdb.GetGroupInfoByGroupID(req.GroupID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", req.GroupID, err)
|
||||
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil
|
||||
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil
|
||||
}
|
||||
if groupInfo.Status == constant.GroupStatusDismissed {
|
||||
errMsg := " group status is dismissed "
|
||||
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrStatus.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
//
|
||||
//from User: invite: applicant
|
||||
@ -254,7 +259,53 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
|
||||
}
|
||||
resp.Id2ResultList = append(resp.Id2ResultList, &resultNode)
|
||||
}
|
||||
|
||||
var haveConUserID []string
|
||||
conversations, err := imdb.GetConversationsByConversationIDMultipleOwner(okUserIDList, utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType))
|
||||
for _, v := range conversations {
|
||||
haveConUserID = append(haveConUserID, v.OwnerUserID)
|
||||
}
|
||||
var reqPb pbUser.SetConversationReq
|
||||
var c pbUser.Conversation
|
||||
for _, v := range conversations {
|
||||
reqPb.OperationID = req.OperationID
|
||||
c.OwnerUserID = v.OwnerUserID
|
||||
c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType)
|
||||
c.RecvMsgOpt = v.RecvMsgOpt
|
||||
c.ConversationType = constant.GroupChatType
|
||||
c.GroupID = req.GroupID
|
||||
c.IsPinned = v.IsPinned
|
||||
c.AttachedInfo = v.AttachedInfo
|
||||
c.IsPrivateChat = v.IsPrivateChat
|
||||
c.GroupAtType = v.GroupAtType
|
||||
c.IsNotInGroup = false
|
||||
c.Ex = v.Ex
|
||||
reqPb.Conversation = &c
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
|
||||
client := pbUser.NewUserClient(etcdConn)
|
||||
respPb, err := client.SetConversation(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation rpc failed, ", reqPb.String(), err.Error(), v.OwnerUserID)
|
||||
} else {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "SetConversation success", respPb.String(), v.OwnerUserID)
|
||||
}
|
||||
}
|
||||
for _, v := range utils.DifferenceString(haveConUserID, okUserIDList) {
|
||||
reqPb.OperationID = req.OperationID
|
||||
c.OwnerUserID = v
|
||||
c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType)
|
||||
c.ConversationType = constant.GroupChatType
|
||||
c.GroupID = req.GroupID
|
||||
c.IsNotInGroup = false
|
||||
reqPb.Conversation = &c
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
|
||||
client := pbUser.NewUserClient(etcdConn)
|
||||
respPb, err := client.SetConversation(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation rpc failed, ", reqPb.String(), err.Error(), v)
|
||||
} else {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "SetConversation success", respPb.String(), v)
|
||||
}
|
||||
}
|
||||
chat.MemberInvitedNotification(req.OperationID, req.GroupID, req.OpUserID, req.Reason, okUserIDList)
|
||||
resp.ErrCode = 0
|
||||
log.NewInfo(req.OperationID, "InviteUserToGroup rpc return ", resp.String())
|
||||
@ -331,7 +382,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
|
||||
|
||||
//op is app manager
|
||||
if flag != 1 {
|
||||
if token_verify.IsMangerUserID(req.OpUserID) {
|
||||
if token_verify.IsManagerUserID(req.OpUserID) {
|
||||
flag = 1
|
||||
log.NewDebug(req.OperationID, "is app manager ", req.OpUserID)
|
||||
}
|
||||
@ -374,9 +425,28 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
|
||||
okUserIDList = append(okUserIDList, v)
|
||||
}
|
||||
|
||||
err = db.DB.DelGroupMember(req.GroupID, v)
|
||||
//err = db.DB.DelGroupMember(req.GroupID, v)
|
||||
//if err != nil {
|
||||
// log.NewError(req.OperationID, "DelGroupMember failed ", err.Error(), req.GroupID, v)
|
||||
//}
|
||||
}
|
||||
var reqPb pbUser.SetConversationReq
|
||||
var c pbUser.Conversation
|
||||
for _, v := range okUserIDList {
|
||||
reqPb.OperationID = req.OperationID
|
||||
c.OwnerUserID = v
|
||||
c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType)
|
||||
c.ConversationType = constant.GroupChatType
|
||||
c.GroupID = req.GroupID
|
||||
c.IsNotInGroup = true
|
||||
reqPb.Conversation = &c
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
|
||||
client := pbUser.NewUserClient(etcdConn)
|
||||
respPb, err := client.SetConversation(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "DelGroupMember failed ", err.Error(), req.GroupID, v)
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation rpc failed, ", reqPb.String(), err.Error(), v)
|
||||
} else {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "SetConversation success", respPb.String(), v)
|
||||
}
|
||||
}
|
||||
chat.MemberKickedNotification(req, okUserIDList)
|
||||
@ -467,8 +537,8 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G
|
||||
groupRequest.UserID = req.FromUserID
|
||||
groupRequest.HandleUserID = req.OpUserID
|
||||
groupRequest.HandledTime = time.Now()
|
||||
if !token_verify.IsMangerUserID(req.OpUserID) && !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) {
|
||||
log.NewError(req.OperationID, "IsMangerUserID IsGroupOwnerAdmin false ", req.GroupID, req.OpUserID)
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) && !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) {
|
||||
log.NewError(req.OperationID, "IsManagerUserID IsGroupOwnerAdmin false ", req.GroupID, req.OpUserID)
|
||||
return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
|
||||
}
|
||||
err := imdb.UpdateGroupRequest(groupRequest)
|
||||
@ -497,6 +567,38 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G
|
||||
log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), member)
|
||||
return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
||||
}
|
||||
var reqPb pbUser.SetConversationReq
|
||||
reqPb.OperationID = req.OperationID
|
||||
var c pbUser.Conversation
|
||||
conversation, err := imdb.GetConversation(req.FromUserID, utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType))
|
||||
if err != nil {
|
||||
c.OwnerUserID = req.FromUserID
|
||||
c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType)
|
||||
c.ConversationType = constant.GroupChatType
|
||||
c.GroupID = req.GroupID
|
||||
c.IsNotInGroup = false
|
||||
} else {
|
||||
c.OwnerUserID = conversation.OwnerUserID
|
||||
c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType)
|
||||
c.RecvMsgOpt = conversation.RecvMsgOpt
|
||||
c.ConversationType = constant.GroupChatType
|
||||
c.GroupID = req.GroupID
|
||||
c.IsPinned = conversation.IsPinned
|
||||
c.AttachedInfo = conversation.AttachedInfo
|
||||
c.IsPrivateChat = conversation.IsPrivateChat
|
||||
c.GroupAtType = conversation.GroupAtType
|
||||
c.IsNotInGroup = false
|
||||
c.Ex = conversation.Ex
|
||||
}
|
||||
reqPb.Conversation = &c
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
|
||||
client := pbUser.NewUserClient(etcdConn)
|
||||
respPb, err := client.SetConversation(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation rpc failed, ", reqPb.String(), err.Error())
|
||||
} else {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "SetConversation success", respPb.String())
|
||||
}
|
||||
chat.GroupApplicationAcceptedNotification(req)
|
||||
chat.MemberEnterNotification(req)
|
||||
} else if req.HandleResult == constant.GroupResponseRefuse {
|
||||
@ -518,6 +620,16 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq)
|
||||
return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
||||
}
|
||||
|
||||
groupInfo, err := imdb.GetGroupInfoByGroupID(req.GroupID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", req.GroupID, err)
|
||||
return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
||||
}
|
||||
if groupInfo.Status == constant.GroupStatusDismissed {
|
||||
errMsg := " group status is dismissed "
|
||||
return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrStatus.ErrCode, ErrMsg: errMsg}}, nil
|
||||
}
|
||||
|
||||
var groupRequest db.GroupRequest
|
||||
groupRequest.UserID = req.OpUserID
|
||||
groupRequest.ReqMsg = req.ReqMessage
|
||||
@ -542,7 +654,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq)
|
||||
}
|
||||
|
||||
func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) (*pbGroup.QuitGroupResp, error) {
|
||||
log.NewError(req.OperationID, "QuitGroup args ", req.String())
|
||||
log.NewInfo(req.OperationID, "QuitGroup args ", req.String())
|
||||
_, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(req.GroupID, req.OpUserID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetGroupMemberInfoByGroupIDAndUserID failed ", err.Error(), req.GroupID, req.OpUserID)
|
||||
@ -560,7 +672,24 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq)
|
||||
log.NewError(req.OperationID, "DelGroupMember failed ", req.GroupID, req.OpUserID)
|
||||
// return &pbGroup.CommonResp{ErrorCode: constant.ErrQuitGroup.ErrCode, ErrorMsg: constant.ErrQuitGroup.ErrMsg}, nil
|
||||
}
|
||||
|
||||
//modify quitter conversation info
|
||||
var reqPb pbUser.SetConversationReq
|
||||
var c pbUser.Conversation
|
||||
reqPb.OperationID = req.OperationID
|
||||
c.OwnerUserID = req.OpUserID
|
||||
c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType)
|
||||
c.ConversationType = constant.GroupChatType
|
||||
c.GroupID = req.GroupID
|
||||
c.IsNotInGroup = true
|
||||
reqPb.Conversation = &c
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
|
||||
client := pbUser.NewUserClient(etcdConn)
|
||||
respPb, err := client.SetConversation(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation rpc failed, ", reqPb.String(), err.Error())
|
||||
} else {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "SetConversation success", respPb.String())
|
||||
}
|
||||
chat.MemberQuitNotification(req)
|
||||
log.NewInfo(req.OperationID, "rpc QuitGroup return ", pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}})
|
||||
return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil
|
||||
@ -595,6 +724,11 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf
|
||||
return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, http.WrapError(constant.ErrDB)
|
||||
}
|
||||
|
||||
if group.Status == constant.GroupStatusDismissed {
|
||||
errMsg := " group status is dismissed "
|
||||
return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrStatus.ErrCode, ErrMsg: errMsg}}, nil
|
||||
}
|
||||
|
||||
////bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl; 10000:owner
|
||||
var changedType int32
|
||||
if group.GroupName != req.GroupInfo.GroupName && req.GroupInfo.GroupName != "" {
|
||||
@ -627,12 +761,22 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf
|
||||
func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.TransferGroupOwnerReq) (*pbGroup.TransferGroupOwnerResp, error) {
|
||||
log.NewInfo(req.OperationID, "TransferGroupOwner ", req.String())
|
||||
|
||||
groupInfo, err := imdb.GetGroupInfoByGroupID(req.GroupID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", req.GroupID, err)
|
||||
return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
||||
}
|
||||
if groupInfo.Status == constant.GroupStatusDismissed {
|
||||
errMsg := " group status is dismissed "
|
||||
return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrStatus.ErrCode, ErrMsg: errMsg}}, nil
|
||||
}
|
||||
|
||||
if req.OldOwnerUserID == req.NewOwnerUserID {
|
||||
log.NewError(req.OperationID, "same owner ", req.OldOwnerUserID, req.NewOwnerUserID)
|
||||
return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: constant.ErrArgs.ErrMsg}}, nil
|
||||
}
|
||||
groupMemberInfo := db.GroupMember{GroupID: req.GroupID, UserID: req.OldOwnerUserID, RoleLevel: constant.GroupOrdinaryUsers}
|
||||
err := imdb.UpdateGroupMemberInfo(groupMemberInfo)
|
||||
err = imdb.UpdateGroupMemberInfo(groupMemberInfo)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "UpdateGroupMemberInfo failed ", groupMemberInfo)
|
||||
return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
||||
@ -867,6 +1011,25 @@ func (s *groupServer) RemoveGroupMembersCMS(_ context.Context, req *pbGroup.Remo
|
||||
OperationID: req.OperationID,
|
||||
OpUserID: req.OpUserId,
|
||||
}
|
||||
var reqPb pbUser.SetConversationReq
|
||||
var c pbUser.Conversation
|
||||
for _, v := range resp.Success {
|
||||
reqPb.OperationID = req.OperationID
|
||||
c.OwnerUserID = v
|
||||
c.ConversationID = utils.GetConversationIDBySessionType(req.GroupId, constant.GroupChatType)
|
||||
c.ConversationType = constant.GroupChatType
|
||||
c.GroupID = req.GroupId
|
||||
c.IsNotInGroup = true
|
||||
reqPb.Conversation = &c
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
|
||||
client := pbUser.NewUserClient(etcdConn)
|
||||
respPb, err := client.SetConversation(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation rpc failed, ", reqPb.String(), err.Error(), v)
|
||||
} else {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "SetConversation success", respPb.String(), v)
|
||||
}
|
||||
}
|
||||
chat.MemberKickedNotification(reqKick, resp.Success)
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "success: ", resp.Success)
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "failed: ", resp.Failed)
|
||||
@ -948,7 +1111,7 @@ func (s *groupServer) GetUserReqApplicationList(_ context.Context, req *pbGroup.
|
||||
|
||||
func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGroupReq) (*pbGroup.DismissGroupResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc args ", req.String())
|
||||
if !token_verify.IsMangerUserID(req.OpUserID) && !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) {
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) && !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) {
|
||||
log.NewError(req.OperationID, "verify failed ", req.OpUserID, req.GroupID)
|
||||
return &pbGroup.DismissGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
|
||||
}
|
||||
@ -958,14 +1121,38 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou
|
||||
log.NewError(req.OperationID, "OperateGroupStatus failed ", req.GroupID, constant.GroupStatusDismissed)
|
||||
return &pbGroup.DismissGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
||||
}
|
||||
memberList, err := imdb.GetGroupMemberListByGroupID(req.GroupID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetGroupMemberListByGroupID failed,", err.Error(), req.GroupID)
|
||||
}
|
||||
//modify quitter conversation info
|
||||
var reqPb pbUser.SetConversationReq
|
||||
var c pbUser.Conversation
|
||||
for _, v := range memberList {
|
||||
reqPb.OperationID = req.OperationID
|
||||
c.OwnerUserID = v.UserID
|
||||
c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType)
|
||||
c.ConversationType = constant.GroupChatType
|
||||
c.GroupID = req.GroupID
|
||||
c.IsNotInGroup = true
|
||||
reqPb.Conversation = &c
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
|
||||
client := pbUser.NewUserClient(etcdConn)
|
||||
respPb, err := client.SetConversation(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation rpc failed, ", reqPb.String(), err.Error(), v.UserID)
|
||||
} else {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "SetConversation success", respPb.String(), v.UserID)
|
||||
}
|
||||
}
|
||||
chat.GroupDismissedNotification(req)
|
||||
|
||||
err = imdb.DeleteGroupMemberByGroupID(req.GroupID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "DeleteGroupMemberByGroupID failed ", req.GroupID)
|
||||
return &pbGroup.DismissGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
||||
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc return ", pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""})
|
||||
return &pbGroup.DismissGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil
|
||||
}
|
||||
@ -977,7 +1164,7 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou
|
||||
|
||||
func (s *groupServer) MuteGroupMember(ctx context.Context, req *pbGroup.MuteGroupMemberReq) (*pbGroup.MuteGroupMemberResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc args ", req.String())
|
||||
if !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) && !token_verify.IsMangerUserID(req.OpUserID) {
|
||||
if !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) && !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
log.Error(req.OperationID, "verify failed ", req.GroupID, req.UserID)
|
||||
return &pbGroup.MuteGroupMemberResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
|
||||
}
|
||||
@ -996,7 +1183,7 @@ func (s *groupServer) MuteGroupMember(ctx context.Context, req *pbGroup.MuteGrou
|
||||
|
||||
func (s *groupServer) CancelMuteGroupMember(ctx context.Context, req *pbGroup.CancelMuteGroupMemberReq) (*pbGroup.CancelMuteGroupMemberResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc args ", req.String())
|
||||
if !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) && !token_verify.IsMangerUserID(req.OpUserID) {
|
||||
if !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) && !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
log.Error(req.OperationID, "verify failed ", req.OpUserID, req.GroupID)
|
||||
return &pbGroup.CancelMuteGroupMemberResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
|
||||
}
|
||||
@ -1014,7 +1201,7 @@ func (s *groupServer) CancelMuteGroupMember(ctx context.Context, req *pbGroup.Ca
|
||||
|
||||
func (s *groupServer) MuteGroup(ctx context.Context, req *pbGroup.MuteGroupReq) (*pbGroup.MuteGroupResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc args ", req.String())
|
||||
if !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) && !token_verify.IsMangerUserID(req.OpUserID) {
|
||||
if !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) && !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
log.Error(req.OperationID, "verify failed ", req.GroupID, req.GroupID)
|
||||
return &pbGroup.MuteGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
|
||||
}
|
||||
@ -1030,7 +1217,7 @@ func (s *groupServer) MuteGroup(ctx context.Context, req *pbGroup.MuteGroupReq)
|
||||
|
||||
func (s *groupServer) CancelMuteGroup(ctx context.Context, req *pbGroup.CancelMuteGroupReq) (*pbGroup.CancelMuteGroupResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc args ", req.String())
|
||||
if !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) && !token_verify.IsMangerUserID(req.OpUserID) {
|
||||
if !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) && !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
log.Error(req.OperationID, "verify failed ", req.OpUserID, req.GroupID)
|
||||
return &pbGroup.CancelMuteGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
|
||||
}
|
||||
@ -1044,3 +1231,36 @@ func (s *groupServer) CancelMuteGroup(ctx context.Context, req *pbGroup.CancelMu
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc return ", pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""})
|
||||
return &pbGroup.CancelMuteGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil
|
||||
}
|
||||
|
||||
func (s *groupServer) SetGroupMemberNickname(ctx context.Context, req *pbGroup.SetGroupMemberNicknameReq) (*pbGroup.SetGroupMemberNicknameResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc args ", req.String())
|
||||
if req.OpUserID != req.UserID && !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
errMsg := req.OperationID + " verify failed " + req.OpUserID + req.GroupID
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &pbGroup.SetGroupMemberNicknameResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
|
||||
}
|
||||
|
||||
groupMemberInfo := db.GroupMember{}
|
||||
groupMemberInfo.UserID = req.UserID
|
||||
groupMemberInfo.GroupID = req.GroupID
|
||||
if req.Nickname == "" {
|
||||
userNickname, err := imdb.GetUserNameByUserID(groupMemberInfo.UserID)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " GetUserNameByUserID failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &pbGroup.SetGroupMemberNicknameResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
||||
}
|
||||
groupMemberInfo.Nickname = userNickname
|
||||
} else {
|
||||
groupMemberInfo.Nickname = req.Nickname
|
||||
}
|
||||
err := imdb.UpdateGroupMemberInfo(groupMemberInfo)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " UpdateGroupMemberInfo failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &pbGroup.SetGroupMemberNicknameResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
||||
}
|
||||
chat.GroupMemberInfoSetNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID)
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc return ", pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""})
|
||||
return &pbGroup.SetGroupMemberNicknameResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import (
|
||||
//} creator->group
|
||||
|
||||
func setOpUserInfo(opUserID, groupID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) error {
|
||||
if token_verify.IsMangerUserID(opUserID) {
|
||||
if token_verify.IsManagerUserID(opUserID) {
|
||||
u, err := imdb.GetUserByUserID(opUserID)
|
||||
if err != nil {
|
||||
return utils.Wrap(err, "GetUserByUserID failed")
|
||||
@ -168,6 +168,9 @@ func groupNotification(contentType int32, m proto.Message, sendID, groupID, recv
|
||||
tips.DefaultTips = toNickname + "" + cn.GroupMemberMuted.DefaultTips.Tips
|
||||
case constant.GroupMemberCancelMutedNotification:
|
||||
tips.DefaultTips = toNickname + "" + cn.GroupMemberCancelMuted.DefaultTips.Tips
|
||||
case constant.GroupMemberInfoSetNotification:
|
||||
tips.DefaultTips = toNickname + "" + cn.GroupMemberInfoSet.DefaultTips.Tips
|
||||
|
||||
default:
|
||||
log.Error(operationID, "contentType failed ", contentType)
|
||||
return
|
||||
@ -282,6 +285,24 @@ func GroupMemberMutedNotification(operationID, opUserID, groupID, groupMemberUse
|
||||
groupNotification(constant.GroupMemberMutedNotification, &tips, opUserID, groupID, "", operationID)
|
||||
}
|
||||
|
||||
func GroupMemberInfoSetNotification(operationID, opUserID, groupID, groupMemberUserID string) {
|
||||
tips := open_im_sdk.GroupMemberInfoSetTips{Group: &open_im_sdk.GroupInfo{},
|
||||
OpUser: &open_im_sdk.GroupMemberFullInfo{}, ChangedUser: &open_im_sdk.GroupMemberFullInfo{}}
|
||||
if err := setGroupInfo(groupID, tips.Group); err != nil {
|
||||
log.Error(operationID, "setGroupInfo failed ", err.Error(), groupID)
|
||||
return
|
||||
}
|
||||
if err := setOpUserInfo(opUserID, groupID, tips.OpUser); err != nil {
|
||||
log.Error(operationID, "setOpUserInfo failed ", err.Error(), opUserID, groupID)
|
||||
return
|
||||
}
|
||||
if err := setGroupMemberInfo(groupID, groupMemberUserID, tips.ChangedUser); err != nil {
|
||||
log.Error(operationID, "setGroupMemberInfo failed ", err.Error(), groupID, groupMemberUserID)
|
||||
return
|
||||
}
|
||||
groupNotification(constant.GroupMemberInfoSetNotification, &tips, opUserID, groupID, "", operationID)
|
||||
}
|
||||
|
||||
func GroupMemberCancelMutedNotification(operationID, opUserID, groupID, groupMemberUserID string) {
|
||||
tips := open_im_sdk.GroupMemberCancelMutedTips{Group: &open_im_sdk.GroupInfo{},
|
||||
OpUser: &open_im_sdk.GroupMemberFullInfo{}, MutedUser: &open_im_sdk.GroupMemberFullInfo{}}
|
||||
|
76
internal/rpc/msg/organization_notification.go
Normal file
76
internal/rpc/msg/organization_notification.go
Normal file
@ -0,0 +1,76 @@
|
||||
package msg
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/constant"
|
||||
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
|
||||
"Open_IM/pkg/common/log"
|
||||
utils2 "Open_IM/pkg/common/utils"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"github.com/golang/protobuf/jsonpb"
|
||||
"github.com/golang/protobuf/proto"
|
||||
)
|
||||
|
||||
func OrganizationNotificationToAll(opUserID string, operationID string) {
|
||||
err, userIDList := imdb.GetAllOrganizationUserID()
|
||||
if err != nil {
|
||||
log.Error(operationID, "GetAllOrganizationUserID failed ", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
tips := open_im_sdk.OrganizationChangedTips{OpUser: &open_im_sdk.UserInfo{}}
|
||||
|
||||
user, err := imdb.GetUserByUserID(opUserID)
|
||||
if err != nil {
|
||||
log.NewError(operationID, "GetUserByUserID failed ", err.Error(), opUserID)
|
||||
return
|
||||
}
|
||||
utils2.UserDBCopyOpenIM(tips.OpUser, user)
|
||||
|
||||
for _, v := range userIDList {
|
||||
log.Debug(operationID, "OrganizationNotification", opUserID, v, constant.OrganizationChangedNotification, &tips, operationID)
|
||||
OrganizationNotification(opUserID, v, constant.OrganizationChangedNotification, &tips, operationID)
|
||||
}
|
||||
}
|
||||
|
||||
func OrganizationNotification(opUserID string, recvUserID string, contentType int32, m proto.Message, operationID string) {
|
||||
log.Info(operationID, utils.GetSelfFuncName(), "args: ", contentType, opUserID)
|
||||
var err error
|
||||
var tips open_im_sdk.TipsComm
|
||||
tips.Detail, err = proto.Marshal(m)
|
||||
if err != nil {
|
||||
log.Error(operationID, "Marshal failed ", err.Error(), m.String())
|
||||
return
|
||||
}
|
||||
|
||||
marshaler := jsonpb.Marshaler{
|
||||
OrigName: true,
|
||||
EnumsAsInts: false,
|
||||
EmitDefaults: false,
|
||||
}
|
||||
|
||||
tips.JsonDetail, _ = marshaler.MarshalToString(m)
|
||||
|
||||
switch contentType {
|
||||
case constant.OrganizationChangedNotification:
|
||||
tips.DefaultTips = "OrganizationChangedNotification"
|
||||
|
||||
default:
|
||||
log.Error(operationID, "contentType failed ", contentType)
|
||||
return
|
||||
}
|
||||
|
||||
var n NotificationMsg
|
||||
n.SendID = opUserID
|
||||
n.RecvID = recvUserID
|
||||
n.ContentType = contentType
|
||||
n.SessionType = constant.SingleChatType
|
||||
n.MsgFrom = constant.SysMsgType
|
||||
n.OperationID = operationID
|
||||
n.Content, err = proto.Marshal(&tips)
|
||||
if err != nil {
|
||||
log.Error(operationID, "Marshal failed ", err.Error(), tips.String())
|
||||
return
|
||||
}
|
||||
Notification(&n)
|
||||
}
|
@ -246,6 +246,21 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
|
||||
}
|
||||
case constant.MemberQuitNotification:
|
||||
addUidList = append(addUidList, pb.MsgData.SendID)
|
||||
case constant.AtText:
|
||||
//tagMe := utils.IsContain(c.loginUserID, s.AtElem.AtUserList)
|
||||
//tagAll := utils.IsContain(constant.AtAllString, pb.MsgData.AtUserIDList)
|
||||
//if tagAll {
|
||||
// if tagMe {
|
||||
// lc.GroupAtType = constant.AtAllAtMe
|
||||
// return
|
||||
// }
|
||||
// lc.GroupAtType = constant.AtAll
|
||||
// return
|
||||
//}
|
||||
//if tagMe {
|
||||
// lc.GroupAtType = constant.AtMe
|
||||
//}
|
||||
|
||||
default:
|
||||
}
|
||||
groupID := pb.MsgData.GroupID
|
||||
@ -562,6 +577,38 @@ func Notification(n *NotificationMsg) {
|
||||
ex = config.Config.Notification.GroupMemberCancelMuted.OfflinePush.Ext
|
||||
reliabilityLevel = config.Config.Notification.GroupMemberCancelMuted.Conversation.ReliabilityLevel
|
||||
unReadCount = config.Config.Notification.GroupMemberCancelMuted.Conversation.UnreadCount
|
||||
|
||||
case constant.GroupMemberInfoSetNotification:
|
||||
pushSwitch = config.Config.Notification.GroupMemberInfoSet.OfflinePush.PushSwitch
|
||||
title = config.Config.Notification.GroupMemberInfoSet.OfflinePush.Title
|
||||
desc = config.Config.Notification.GroupMemberInfoSet.OfflinePush.Desc
|
||||
ex = config.Config.Notification.GroupMemberInfoSet.OfflinePush.Ext
|
||||
reliabilityLevel = config.Config.Notification.GroupMemberInfoSet.Conversation.ReliabilityLevel
|
||||
unReadCount = config.Config.Notification.GroupMemberInfoSet.Conversation.UnreadCount
|
||||
|
||||
case constant.OrganizationChangedNotification:
|
||||
pushSwitch = config.Config.Notification.OrganizationChanged.OfflinePush.PushSwitch
|
||||
title = config.Config.Notification.OrganizationChanged.OfflinePush.Title
|
||||
desc = config.Config.Notification.OrganizationChanged.OfflinePush.Desc
|
||||
ex = config.Config.Notification.OrganizationChanged.OfflinePush.Ext
|
||||
reliabilityLevel = config.Config.Notification.OrganizationChanged.Conversation.ReliabilityLevel
|
||||
unReadCount = config.Config.Notification.OrganizationChanged.Conversation.UnreadCount
|
||||
|
||||
case constant.WorkMomentNotification:
|
||||
pushSwitch = config.Config.Notification.WorkMomentsNotification.OfflinePush.PushSwitch
|
||||
title = config.Config.Notification.WorkMomentsNotification.OfflinePush.Title
|
||||
desc = config.Config.Notification.WorkMomentsNotification.OfflinePush.Desc
|
||||
ex = config.Config.Notification.WorkMomentsNotification.OfflinePush.Ext
|
||||
reliabilityLevel = config.Config.Notification.WorkMomentsNotification.Conversation.ReliabilityLevel
|
||||
unReadCount = config.Config.Notification.WorkMomentsNotification.Conversation.UnreadCount
|
||||
|
||||
case constant.ConversationPrivateChatNotification:
|
||||
pushSwitch = config.Config.Notification.ConversationSetPrivate.OfflinePush.PushSwitch
|
||||
title = config.Config.Notification.ConversationSetPrivate.OfflinePush.Title
|
||||
desc = config.Config.Notification.ConversationSetPrivate.OfflinePush.Desc
|
||||
ex = config.Config.Notification.ConversationSetPrivate.OfflinePush.Ext
|
||||
reliabilityLevel = config.Config.Notification.ConversationSetPrivate.Conversation.ReliabilityLevel
|
||||
unReadCount = config.Config.Notification.ConversationSetPrivate.Conversation.UnreadCount
|
||||
}
|
||||
switch reliabilityLevel {
|
||||
case constant.UnreliableNotification:
|
||||
|
45
internal/rpc/msg/work_moments_notification.go
Normal file
45
internal/rpc/msg/work_moments_notification.go
Normal file
@ -0,0 +1,45 @@
|
||||
package msg
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/log"
|
||||
pbOffice "Open_IM/pkg/proto/office"
|
||||
sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"github.com/golang/protobuf/jsonpb"
|
||||
"github.com/golang/protobuf/proto"
|
||||
)
|
||||
|
||||
func WorkMomentSendNotification(operationID, sendID, recvID string, notificationMsg *pbOffice.WorkMomentNotificationMsg) {
|
||||
log.NewInfo(operationID, utils.GetSelfFuncName(), sendID, recvID, notificationMsg)
|
||||
//if sendID == recvID {
|
||||
// return
|
||||
//}
|
||||
WorkMomentNotification(operationID, sendID, recvID, notificationMsg)
|
||||
}
|
||||
|
||||
func WorkMomentNotification(operationID, sendID, recvID string, m proto.Message) {
|
||||
var tips sdk.TipsComm
|
||||
var err error
|
||||
marshaler := jsonpb.Marshaler{
|
||||
OrigName: true,
|
||||
EnumsAsInts: false,
|
||||
EmitDefaults: false,
|
||||
}
|
||||
tips.JsonDetail, _ = marshaler.MarshalToString(m)
|
||||
n := &NotificationMsg{
|
||||
SendID: sendID,
|
||||
RecvID: recvID,
|
||||
MsgFrom: constant.UserMsgType,
|
||||
ContentType: constant.WorkMomentNotification,
|
||||
SessionType: constant.SingleChatType,
|
||||
OperationID: operationID,
|
||||
}
|
||||
n.Content, err = proto.Marshal(&tips)
|
||||
if err != nil {
|
||||
log.NewError(operationID, utils.GetSelfFuncName(), "proto.Marshal failed")
|
||||
return
|
||||
}
|
||||
log.NewInfo(operationID, utils.GetSelfFuncName(), string(n.Content))
|
||||
Notification(n)
|
||||
}
|
@ -266,3 +266,283 @@ func (s *officeServer) GetUserTagByID(_ context.Context, req *pbOffice.GetUserTa
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *officeServer) CreateOneWorkMoment(_ context.Context, req *pbOffice.CreateOneWorkMomentReq) (resp *pbOffice.CreateOneWorkMomentResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp = &pbOffice.CreateOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}}
|
||||
workMoment := db.WorkMoment{
|
||||
Comments: []*db.Comment{},
|
||||
LikeUserList: []*db.LikeUser{},
|
||||
}
|
||||
createUser, err := imdb.GetUserByUserID(req.WorkMoment.UserID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserByUserID", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
if err := utils.CopyStructFields(&workMoment, req.WorkMoment); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
workMoment.UserName = createUser.Nickname
|
||||
workMoment.FaceURL = createUser.FaceURL
|
||||
workMoment.PermissionUserIDList = s.getPermissionUserIDList(req.OperationID, req.WorkMoment.PermissionGroupList, req.WorkMoment.PermissionUserList)
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "workMoment to create", workMoment)
|
||||
err = db.DB.CreateOneWorkMoment(&workMoment)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "CreateOneWorkMoment", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// send notification to at users
|
||||
for _, atUser := range req.WorkMoment.AtUserList {
|
||||
workMomentNotificationMsg := &pbOffice.WorkMomentNotificationMsg{
|
||||
NotificationMsgType: constant.WorkMomentAtUserNotification,
|
||||
WorkMomentID: workMoment.WorkMomentID,
|
||||
WorkMomentContent: workMoment.Content,
|
||||
UserID: workMoment.UserID,
|
||||
FaceURL: createUser.FaceURL,
|
||||
UserName: createUser.Nickname,
|
||||
}
|
||||
msg.WorkMomentSendNotification(req.OperationID, workMoment.UserID, atUser.UserID, workMomentNotificationMsg)
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// count and distinct permission users
|
||||
func (s *officeServer) getPermissionUserIDList(operationID string, groupList []*pbOffice.PermissionGroup, userList []*pbOffice.WorkMomentUser) []string {
|
||||
var permissionUserIDList []string
|
||||
for _, group := range groupList {
|
||||
GroupMemberIDList, err := imdb.GetGroupMemberIDListByGroupID(group.GroupID)
|
||||
if err != nil {
|
||||
log.NewError(operationID, utils.GetSelfFuncName(), "GetGroupMemberIDListByGroupID failed", group, err.Error())
|
||||
continue
|
||||
}
|
||||
permissionUserIDList = append(permissionUserIDList, GroupMemberIDList...)
|
||||
}
|
||||
var userIDList []string
|
||||
for _, user := range userList {
|
||||
userIDList = append(userIDList, user.UserID)
|
||||
}
|
||||
permissionUserIDList = append(permissionUserIDList, userIDList...)
|
||||
permissionUserIDList = utils.RemoveRepeatedStringInList(permissionUserIDList)
|
||||
return permissionUserIDList
|
||||
}
|
||||
|
||||
func (s *officeServer) DeleteOneWorkMoment(_ context.Context, req *pbOffice.DeleteOneWorkMomentReq) (resp *pbOffice.DeleteOneWorkMomentResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp = &pbOffice.DeleteOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}}
|
||||
workMoment, err := db.DB.GetWorkMomentByID(req.WorkMomentID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetWorkMomentByID failed", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "workMoment", workMoment)
|
||||
if workMoment.UserID != req.UserID {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "workMoment.UserID != req.WorkMomentID, delete failed", workMoment, req.WorkMomentID)
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
err = db.DB.DeleteOneWorkMoment(req.WorkMomentID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "DeleteOneWorkMoment", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func isUserCanSeeWorkMoment(userID string, workMoment db.WorkMoment) bool {
|
||||
if userID != workMoment.UserID {
|
||||
switch workMoment.Permission {
|
||||
case constant.WorkMomentPublic:
|
||||
return true
|
||||
case constant.WorkMomentPrivate:
|
||||
return false
|
||||
case constant.WorkMomentPermissionCanSee:
|
||||
return utils.IsContain(userID, workMoment.PermissionUserIDList)
|
||||
case constant.WorkMomentPermissionCantSee:
|
||||
return !utils.IsContain(userID, workMoment.PermissionUserIDList)
|
||||
}
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (s *officeServer) LikeOneWorkMoment(_ context.Context, req *pbOffice.LikeOneWorkMomentReq) (resp *pbOffice.LikeOneWorkMomentResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp = &pbOffice.LikeOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}}
|
||||
userName, err := imdb.GetUserNameByUserID(req.UserID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID failed", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
workMoment, like, err := db.DB.LikeOneWorkMoment(req.UserID, userName, req.WorkMomentID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "LikeOneWorkMoment failed ", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
workMomentNotificationMsg := &pbOffice.WorkMomentNotificationMsg{
|
||||
NotificationMsgType: constant.WorkMomentLikeNotification,
|
||||
WorkMomentID: workMoment.WorkMomentID,
|
||||
WorkMomentContent: workMoment.Content,
|
||||
UserID: workMoment.UserID,
|
||||
FaceURL: workMoment.FaceURL,
|
||||
UserName: workMoment.UserName,
|
||||
}
|
||||
// send notification
|
||||
if like {
|
||||
msg.WorkMomentSendNotification(req.OperationID, req.UserID, workMoment.UserID, workMomentNotificationMsg)
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *officeServer) CommentOneWorkMoment(_ context.Context, req *pbOffice.CommentOneWorkMomentReq) (resp *pbOffice.CommentOneWorkMomentResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp = &pbOffice.CommentOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}}
|
||||
commentUser, err := imdb.GetUserByUserID(req.UserID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID commentUserName failed", req.UserID, err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
var replyUserName string
|
||||
if req.ReplyUserID != "" {
|
||||
replyUserName, err = imdb.GetUserNameByUserID(req.ReplyUserID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID get replyUserName failed", req.ReplyUserID, err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
}
|
||||
comment := &db.Comment{
|
||||
UserID: req.UserID,
|
||||
UserName: commentUser.Nickname,
|
||||
ReplyUserID: req.ReplyUserID,
|
||||
ReplyUserName: replyUserName,
|
||||
Content: req.Content,
|
||||
CreateTime: int32(time.Now().Unix()),
|
||||
}
|
||||
workMoment, err := db.DB.CommentOneWorkMoment(comment, req.WorkMomentID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "CommentOneWorkMoment failed", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
workMomentNotificationMsg := &pbOffice.WorkMomentNotificationMsg{
|
||||
NotificationMsgType: constant.WorkMomentCommentNotification,
|
||||
WorkMomentID: workMoment.WorkMomentID,
|
||||
WorkMomentContent: workMoment.Content,
|
||||
UserID: workMoment.UserID,
|
||||
FaceURL: workMoment.FaceURL,
|
||||
UserName: workMoment.UserName,
|
||||
Comment: &pbOffice.Comment{
|
||||
UserID: comment.UserID,
|
||||
UserName: comment.UserName,
|
||||
FaceURL: commentUser.FaceURL,
|
||||
ReplyUserID: comment.ReplyUserID,
|
||||
ReplyUserName: comment.ReplyUserName,
|
||||
ContentID: comment.ContentID,
|
||||
Content: comment.Content,
|
||||
CreateTime: comment.CreateTime,
|
||||
},
|
||||
}
|
||||
msg.WorkMomentSendNotification(req.OperationID, req.UserID, workMoment.UserID, workMomentNotificationMsg)
|
||||
if req.ReplyUserID != "" {
|
||||
msg.WorkMomentSendNotification(req.OperationID, req.UserID, req.ReplyUserID, workMomentNotificationMsg)
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *officeServer) GetWorkMomentByID(_ context.Context, req *pbOffice.GetWorkMomentByIDReq) (resp *pbOffice.GetWorkMomentByIDResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp = &pbOffice.GetWorkMomentByIDResp{
|
||||
WorkMoment: &pbOffice.WorkMoment{},
|
||||
CommonResp: &pbOffice.CommonResp{},
|
||||
}
|
||||
workMoment, err := db.DB.GetWorkMomentByID(req.WorkMomentID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetWorkMomentByID failed", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
canSee := isUserCanSeeWorkMoment(req.OpUserID, *workMoment)
|
||||
log.Debug(req.OperationID, utils.GetSelfFuncName(), canSee, req.OpUserID, *workMoment)
|
||||
if !canSee {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "workMoments not access to user", canSee, workMoment, req.OpUserID)
|
||||
}
|
||||
if err := utils.CopyStructFields(resp.WorkMoment, workMoment); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields", err.Error())
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *officeServer) GetUserWorkMoments(_ context.Context, req *pbOffice.GetUserWorkMomentsReq) (resp *pbOffice.GetUserWorkMomentsResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp = &pbOffice.GetUserWorkMomentsResp{CommonResp: &pbOffice.CommonResp{}, WorkMoments: []*pbOffice.WorkMoment{}}
|
||||
//resp.WorkMoments = make([]*pbOffice.WorkMoment, 0)
|
||||
workMoments, err := db.DB.GetUserWorkMoments(req.UserID, req.Pagination.ShowNumber, req.Pagination.PageNumber)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), err)
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp.WorkMoments, workMoments); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *officeServer) GetUserFriendWorkMoments(_ context.Context, req *pbOffice.GetUserFriendWorkMomentsReq) (resp *pbOffice.GetUserFriendWorkMomentsResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp = &pbOffice.GetUserFriendWorkMomentsResp{CommonResp: &pbOffice.CommonResp{}, WorkMoments: []*pbOffice.WorkMoment{}}
|
||||
//resp.WorkMoments = make([]*pbOffice.WorkMoment, 0)
|
||||
friendIDList, err := imdb.GetFriendIDListByUserID(req.UserID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetFriendIDListByUserID", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "friendIDList: ", friendIDList)
|
||||
workMoments, err := db.DB.GetUserFriendWorkMoments(friendIDList, req.Pagination.ShowNumber, req.Pagination.PageNumber, req.UserID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserFriendWorkMoments", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
if err := utils.CopyStructFields(&resp.WorkMoments, workMoments); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *officeServer) SetUserWorkMomentsLevel(_ context.Context, req *pbOffice.SetUserWorkMomentsLevelReq) (resp *pbOffice.SetUserWorkMomentsLevelResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp = &pbOffice.SetUserWorkMomentsLevelResp{CommonResp: &pbOffice.CommonResp{}}
|
||||
if err := db.DB.SetUserWorkMomentsLevel(req.UserID, req.Level); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetUserWorkMomentsLevel failed", err.Error())
|
||||
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *officeServer) ChangeWorkMomentPermission(_ context.Context, req *pbOffice.ChangeWorkMomentPermissionReq) (resp *pbOffice.ChangeWorkMomentPermissionResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp = &pbOffice.ChangeWorkMomentPermissionResp{CommonResp: &pbOffice.CommonResp{}}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
429
internal/rpc/organization/organization.go
Normal file
429
internal/rpc/organization/organization.go
Normal file
@ -0,0 +1,429 @@
|
||||
package organization
|
||||
|
||||
import (
|
||||
chat "Open_IM/internal/rpc/msg"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/db"
|
||||
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/common/token_verify"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
"Open_IM/pkg/proto/auth"
|
||||
rpc "Open_IM/pkg/proto/organization"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"google.golang.org/grpc"
|
||||
"net"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type organizationServer struct {
|
||||
rpcPort int
|
||||
rpcRegisterName string
|
||||
etcdSchema string
|
||||
etcdAddr []string
|
||||
}
|
||||
|
||||
func NewServer(port int) *organizationServer {
|
||||
log.NewPrivateLog(constant.LogFileName)
|
||||
return &organizationServer{
|
||||
rpcPort: port,
|
||||
rpcRegisterName: config.Config.RpcRegisterName.OpenImOrganizationName,
|
||||
etcdSchema: config.Config.Etcd.EtcdSchema,
|
||||
etcdAddr: config.Config.Etcd.EtcdAddr,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *organizationServer) Run() {
|
||||
log.NewInfo("", "organization rpc start ")
|
||||
ip := utils.ServerIP
|
||||
registerAddress := ip + ":" + strconv.Itoa(s.rpcPort)
|
||||
//listener network
|
||||
listener, err := net.Listen("tcp", registerAddress)
|
||||
if err != nil {
|
||||
log.NewError("", "Listen failed ", err.Error(), registerAddress)
|
||||
return
|
||||
}
|
||||
log.NewInfo("", "listen network success, ", registerAddress, listener)
|
||||
defer listener.Close()
|
||||
//grpc server
|
||||
srv := grpc.NewServer()
|
||||
defer srv.GracefulStop()
|
||||
//Service registers with etcd
|
||||
rpc.RegisterOrganizationServer(srv, s)
|
||||
err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10)
|
||||
if err != nil {
|
||||
log.NewError("", "RegisterEtcd failed ", err.Error())
|
||||
return
|
||||
}
|
||||
log.NewInfo("", "organization rpc RegisterEtcd success", ip, s.rpcPort, s.rpcRegisterName, 10)
|
||||
err = srv.Serve(listener)
|
||||
if err != nil {
|
||||
log.NewError("", "Serve failed ", err.Error())
|
||||
return
|
||||
}
|
||||
log.NewInfo("", "organization rpc success")
|
||||
}
|
||||
|
||||
func (s *organizationServer) CreateDepartment(ctx context.Context, req *rpc.CreateDepartmentReq) (*rpc.CreateDepartmentResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.CreateDepartmentResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
|
||||
department := db.Department{}
|
||||
utils.CopyStructFields(&department, req.DepartmentInfo)
|
||||
if department.DepartmentID == "" {
|
||||
department.DepartmentID = utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10))
|
||||
}
|
||||
log.Debug(req.OperationID, "dst ", department, "src ", req.DepartmentInfo)
|
||||
if err := imdb.CreateDepartment(&department); err != nil {
|
||||
errMsg := req.OperationID + " " + "CreateDepartment failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.CreateDepartmentResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
err, createdDepartment := imdb.GetDepartment(department.DepartmentID)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + "GetDepartment failed " + err.Error() + department.DepartmentID
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.CreateDepartmentResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
log.Debug(req.OperationID, "GetDepartment ", department.DepartmentID, *createdDepartment)
|
||||
resp := &rpc.CreateDepartmentResp{DepartmentInfo: &open_im_sdk.Department{}}
|
||||
utils.CopyStructFields(resp.DepartmentInfo, createdDepartment)
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", *resp)
|
||||
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) UpdateDepartment(ctx context.Context, req *rpc.UpdateDepartmentReq) (*rpc.UpdateDepartmentResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.UpdateDepartmentResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
|
||||
department := db.Department{}
|
||||
utils.CopyStructFields(&department, req.DepartmentInfo)
|
||||
|
||||
log.Debug(req.OperationID, "dst ", department, "src ", req.DepartmentInfo)
|
||||
if err := imdb.UpdateDepartment(&department, nil); err != nil {
|
||||
errMsg := req.OperationID + " " + "UpdateDepartment failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.UpdateDepartmentResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
|
||||
resp := &rpc.UpdateDepartmentResp{}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", *resp)
|
||||
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) GetSubDepartment(ctx context.Context, req *rpc.GetSubDepartmentReq) (*rpc.GetSubDepartmentResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
err, departmentList := imdb.GetSubDepartmentList(req.DepartmentID)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + "GetDepartment failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.GetSubDepartmentResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
log.Debug(req.OperationID, "GetSubDepartmentList ", req.DepartmentID, departmentList)
|
||||
resp := &rpc.GetSubDepartmentResp{}
|
||||
for _, v := range departmentList {
|
||||
v1 := open_im_sdk.Department{}
|
||||
utils.CopyStructFields(&v1, v)
|
||||
log.Debug(req.OperationID, "src ", v, "dst ", v1)
|
||||
err, v1.MemberNum = imdb.GetDepartmentMemberNum(v1.DepartmentID)
|
||||
if err != nil {
|
||||
log.Error(req.OperationID, "GetDepartmentMemberNum failed ", err.Error(), v1.DepartmentID)
|
||||
continue
|
||||
}
|
||||
err, v1.SubDepartmentNum = imdb.GetSubDepartmentNum(v1.DepartmentID)
|
||||
if err != nil {
|
||||
log.Error(req.OperationID, "GetSubDepartmentNum failed ", err.Error(), v1.DepartmentID)
|
||||
continue
|
||||
}
|
||||
resp.DepartmentList = append(resp.DepartmentList, &v1)
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", *resp)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) DeleteDepartment(ctx context.Context, req *rpc.DeleteDepartmentReq) (*rpc.DeleteDepartmentResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.DeleteDepartmentResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
err := imdb.DeleteDepartment(req.DepartmentID)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + "DeleteDepartment failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg, req.DepartmentID)
|
||||
return &rpc.DeleteDepartmentResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
log.Debug(req.OperationID, "DeleteDepartment ", req.DepartmentID)
|
||||
resp := &rpc.DeleteDepartmentResp{}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", resp)
|
||||
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) CreateOrganizationUser(ctx context.Context, req *rpc.CreateOrganizationUserReq) (*rpc.CreateOrganizationUserResp, error) {
|
||||
authReq := &pbAuth.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}}
|
||||
utils.CopyStructFields(authReq.UserInfo, req.OrganizationUser)
|
||||
authReq.OperationID = req.OperationID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName)
|
||||
client := pbAuth.NewAuthClient(etcdConn)
|
||||
|
||||
reply, err := client.UserRegister(context.Background(), authReq)
|
||||
if err != nil {
|
||||
errMsg := "UserRegister failed " + err.Error()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
return &rpc.CreateOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
if reply.CommonResp.ErrCode != 0 {
|
||||
errMsg := "UserRegister failed " + reply.CommonResp.ErrMsg
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
return &rpc.CreateOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.CreateOrganizationUserResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
organizationUser := db.OrganizationUser{}
|
||||
utils.CopyStructFields(&organizationUser, req.OrganizationUser)
|
||||
organizationUser.Birth = utils.UnixSecondToTime(int64(req.OrganizationUser.Birth))
|
||||
log.Debug(req.OperationID, "src ", *req.OrganizationUser, "dst ", organizationUser)
|
||||
err = imdb.CreateOrganizationUser(&organizationUser)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + "CreateOrganizationUser failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg, organizationUser)
|
||||
return &rpc.CreateOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
log.Debug(req.OperationID, "CreateOrganizationUser ", organizationUser)
|
||||
resp := &rpc.CreateOrganizationUserResp{}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", *resp)
|
||||
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) UpdateOrganizationUser(ctx context.Context, req *rpc.UpdateOrganizationUserReq) (*rpc.UpdateOrganizationUserResp, error) {
|
||||
authReq := &pbAuth.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}}
|
||||
utils.CopyStructFields(authReq.UserInfo, req.OrganizationUser)
|
||||
authReq.OperationID = req.OperationID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName)
|
||||
client := pbAuth.NewAuthClient(etcdConn)
|
||||
|
||||
reply, err := client.UserRegister(context.Background(), authReq)
|
||||
if err != nil {
|
||||
errMsg := "UserRegister failed " + err.Error()
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
if reply.CommonResp.ErrCode != 0 {
|
||||
errMsg := "UserRegister failed " + reply.CommonResp.ErrMsg
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
organizationUser := db.OrganizationUser{}
|
||||
utils.CopyStructFields(&organizationUser, req.OrganizationUser)
|
||||
if req.OrganizationUser.Birth != 0 {
|
||||
organizationUser.Birth = utils.UnixSecondToTime(int64(req.OrganizationUser.Birth))
|
||||
log.Debug(req.OperationID, "time: ", organizationUser.Birth, req.OrganizationUser.Birth)
|
||||
}
|
||||
|
||||
log.Debug(req.OperationID, "src ", *req.OrganizationUser, "dst ", organizationUser)
|
||||
err = imdb.UpdateOrganizationUser(&organizationUser, nil)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + "CreateOrganizationUser failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg, organizationUser)
|
||||
return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
log.Debug(req.OperationID, "UpdateOrganizationUser ", organizationUser)
|
||||
resp := &rpc.UpdateOrganizationUserResp{}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", resp)
|
||||
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) CreateDepartmentMember(ctx context.Context, req *rpc.CreateDepartmentMemberReq) (*rpc.CreateDepartmentMemberResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.CreateDepartmentMemberResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
|
||||
err, _ := imdb.GetOrganizationUser(req.DepartmentMember.UserID)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + req.DepartmentMember.UserID + " is not exist"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.CreateDepartmentMemberResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
|
||||
departmentMember := db.DepartmentMember{}
|
||||
utils.CopyStructFields(&departmentMember, req.DepartmentMember)
|
||||
log.Debug(req.OperationID, "src ", *req.DepartmentMember, "dst ", departmentMember)
|
||||
err = imdb.CreateDepartmentMember(&departmentMember)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + "CreateDepartmentMember failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg, departmentMember)
|
||||
return &rpc.CreateDepartmentMemberResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
log.Debug(req.OperationID, "UpdateOrganizationUser ", departmentMember)
|
||||
|
||||
resp := &rpc.CreateDepartmentMemberResp{}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", *resp)
|
||||
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) GetUserInDepartmentByUserID(userID string, operationID string) (*open_im_sdk.UserInDepartment, error) {
|
||||
err, organizationUser := imdb.GetOrganizationUser(userID)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "GetOrganizationUser failed")
|
||||
}
|
||||
err, departmentMemberList := imdb.GetUserInDepartment(userID)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "GetUserInDepartment failed")
|
||||
}
|
||||
log.Debug(operationID, "GetUserInDepartment ", departmentMemberList)
|
||||
resp := &open_im_sdk.UserInDepartment{OrganizationUser: &open_im_sdk.OrganizationUser{}}
|
||||
utils.CopyStructFields(resp.OrganizationUser, organizationUser)
|
||||
for _, v := range departmentMemberList {
|
||||
v1 := open_im_sdk.DepartmentMember{}
|
||||
utils.CopyStructFields(&v1, v)
|
||||
log.Debug(operationID, "DepartmentMember src ", v, "dst ", v1)
|
||||
resp.DepartmentMemberList = append(resp.DepartmentMemberList, &v1)
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) GetUserInDepartment(ctx context.Context, req *rpc.GetUserInDepartmentReq) (*rpc.GetUserInDepartmentResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
r, err := s.GetUserInDepartmentByUserID(req.UserID, req.OperationID)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + "GetUserInDepartmentByUserID failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg, req.UserID)
|
||||
return &rpc.GetUserInDepartmentResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
log.Debug(req.OperationID, "GetUserInDepartmentByUserID success ", req.UserID, r)
|
||||
resp := rpc.GetUserInDepartmentResp{UserInDepartment: &open_im_sdk.UserInDepartment{OrganizationUser: &open_im_sdk.OrganizationUser{}}}
|
||||
resp.UserInDepartment.DepartmentMemberList = r.DepartmentMemberList
|
||||
resp.UserInDepartment.OrganizationUser = r.OrganizationUser
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", resp)
|
||||
return &resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) UpdateUserInDepartment(ctx context.Context, req *rpc.UpdateUserInDepartmentReq) (*rpc.UpdateUserInDepartmentResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.UpdateUserInDepartmentResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
departmentMember := &db.DepartmentMember{}
|
||||
utils.CopyStructFields(departmentMember, req.DepartmentMember)
|
||||
log.Debug(req.OperationID, "dst ", departmentMember, "src ", req.DepartmentMember)
|
||||
err := imdb.UpdateUserInDepartment(departmentMember, nil)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + "UpdateUserInDepartment failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg, *departmentMember)
|
||||
return &rpc.UpdateUserInDepartmentResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
resp := &rpc.UpdateUserInDepartmentResp{}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", *resp)
|
||||
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) DeleteUserInDepartment(ctx context.Context, req *rpc.DeleteUserInDepartmentReq) (*rpc.DeleteUserInDepartmentResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.DeleteUserInDepartmentResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
|
||||
err := imdb.DeleteUserInDepartment(req.DepartmentID, req.UserID)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + "DeleteUserInDepartment failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg, req.DepartmentID, req.UserID)
|
||||
return &rpc.DeleteUserInDepartmentResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
log.Debug(req.OperationID, "DeleteUserInDepartment success ", req.DepartmentID, req.UserID)
|
||||
resp := &rpc.DeleteUserInDepartmentResp{}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", *resp)
|
||||
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) DeleteOrganizationUser(ctx context.Context, req *rpc.DeleteOrganizationUserReq) (*rpc.DeleteOrganizationUserResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.DeleteOrganizationUserResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
err := imdb.DeleteOrganizationUser(req.UserID)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + "DeleteOrganizationUser failed " + err.Error()
|
||||
log.Error(req.OperationID, errMsg, req.UserID)
|
||||
return &rpc.DeleteOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
log.Debug(req.OperationID, "DeleteOrganizationUser success ", req.UserID)
|
||||
resp := &rpc.DeleteOrganizationUserResp{}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", *resp)
|
||||
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) GetDepartmentMember(ctx context.Context, req *rpc.GetDepartmentMemberReq) (*rpc.GetDepartmentMemberResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
|
||||
err, departmentMemberList := imdb.GetDepartmentMemberList(req.DepartmentID)
|
||||
if err != nil {
|
||||
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
|
||||
log.Error(req.OperationID, errMsg)
|
||||
return &rpc.GetDepartmentMemberResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
|
||||
}
|
||||
|
||||
log.Debug(req.OperationID, "GetDepartmentMemberList ", departmentMemberList)
|
||||
resp := rpc.GetDepartmentMemberResp{}
|
||||
for _, v := range departmentMemberList {
|
||||
err, organizationUser := imdb.GetOrganizationUser(v.UserID)
|
||||
if err != nil {
|
||||
log.Error(req.OperationID, "GetOrganizationUser failed ", err.Error())
|
||||
continue
|
||||
}
|
||||
respOrganizationUser := &open_im_sdk.OrganizationUser{}
|
||||
respDepartmentMember := &open_im_sdk.DepartmentMember{}
|
||||
|
||||
utils.CopyStructFields(respOrganizationUser, organizationUser)
|
||||
utils.CopyStructFields(respDepartmentMember, &v)
|
||||
userDepartmentMember := open_im_sdk.UserDepartmentMember{OrganizationUser: respOrganizationUser, DepartmentMember: respDepartmentMember}
|
||||
|
||||
log.Debug(req.OperationID, "GetUserInDepartmentByUserID success ", userDepartmentMember)
|
||||
resp.UserDepartmentMemberList = append(resp.UserDepartmentMemberList, &userDepartmentMember)
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", resp)
|
||||
return &resp, nil
|
||||
}
|
@ -75,7 +75,7 @@ func (s *userServer) Run() {
|
||||
func syncPeerUserConversation(conversation *pbUser.Conversation, operationID string) error {
|
||||
peerUserConversation := db.Conversation{
|
||||
OwnerUserID: conversation.UserID,
|
||||
ConversationID: "single_" + conversation.OwnerUserID,
|
||||
ConversationID: utils.GetConversationIDBySessionType(conversation.OwnerUserID, constant.SingleChatType),
|
||||
ConversationType: constant.SingleChatType,
|
||||
UserID: conversation.OwnerUserID,
|
||||
GroupID: "",
|
||||
@ -129,6 +129,7 @@ func (s *userServer) BatchSetConversations(ctx context.Context, req *pbUser.Batc
|
||||
if err := utils.CopyStructFields(&conversation, v); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), v.String(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
//redis op
|
||||
if err := db.DB.SetSingleConversationRecvMsgOpt(req.OwnerUserID, v.ConversationID, v.RecvMsgOpt); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "cache failed, rpc return", err.Error())
|
||||
resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
@ -206,10 +207,23 @@ func (s *userServer) GetConversations(ctx context.Context, req *pbUser.GetConver
|
||||
|
||||
func (s *userServer) SetConversation(ctx context.Context, req *pbUser.SetConversationReq) (*pbUser.SetConversationResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp := &pbUser.SetConversationResp{}
|
||||
if req.NotificationType == 0 {
|
||||
req.NotificationType = constant.ConversationOptChangeNotification
|
||||
}
|
||||
resp := &pbUser.SetConversationResp{}
|
||||
if req.Conversation.ConversationType == constant.GroupChatType {
|
||||
groupInfo, err := imdb.GetGroupInfoByGroupID(req.Conversation.GroupID)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", req.Conversation.GroupID, err.Error())
|
||||
resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
||||
return resp, nil
|
||||
}
|
||||
if groupInfo.Status == constant.GroupStatusDismissed && !req.Conversation.IsNotInGroup {
|
||||
errMsg := "group status is dismissed"
|
||||
resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}
|
||||
return resp, nil
|
||||
}
|
||||
}
|
||||
var conversation db.Conversation
|
||||
if err := utils.CopyStructFields(&conversation, req.Conversation); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", *req.Conversation, err.Error())
|
||||
@ -278,8 +292,8 @@ func (s *userServer) SetRecvMsgOpt(ctx context.Context, req *pbUser.SetRecvMsgOp
|
||||
|
||||
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) {
|
||||
log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID)
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
log.NewError(req.OperationID, "IsManagerUserID false ", req.OpUserID)
|
||||
return &pbUser.DeleteUsersResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, FailedUserIDList: req.DeleteUserIDList}, nil
|
||||
}
|
||||
var common pbUser.CommonResp
|
||||
@ -299,8 +313,8 @@ func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq)
|
||||
|
||||
func (s *userServer) GetAllUserID(_ context.Context, req *pbUser.GetAllUserIDReq) (*pbUser.GetAllUserIDResp, error) {
|
||||
log.NewInfo(req.OperationID, "GetAllUserID args ", req.String())
|
||||
if !token_verify.IsMangerUserID(req.OpUserID) {
|
||||
log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID)
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
log.NewError(req.OperationID, "IsManagerUserID false ", req.OpUserID)
|
||||
return &pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
|
||||
}
|
||||
uidList, err := imdb.SelectAllUserID()
|
||||
@ -315,8 +329,8 @@ func (s *userServer) GetAllUserID(_ context.Context, req *pbUser.GetAllUserIDReq
|
||||
|
||||
func (s *userServer) AccountCheck(_ context.Context, req *pbUser.AccountCheckReq) (*pbUser.AccountCheckResp, error) {
|
||||
log.NewInfo(req.OperationID, "AccountCheck args ", req.String())
|
||||
if !token_verify.IsMangerUserID(req.OpUserID) {
|
||||
log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID)
|
||||
if !token_verify.IsManagerUserID(req.OpUserID) {
|
||||
log.NewError(req.OperationID, "IsManagerUserID false ", req.OpUserID)
|
||||
return &pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
|
||||
}
|
||||
uidList, err := imdb.SelectSomeUserID(req.CheckUserIDList)
|
||||
|
@ -43,6 +43,8 @@ type Conversation struct {
|
||||
DraftTextTime int64 `json:"draftTextTime"`
|
||||
IsPinned bool `json:"isPinned" binding:"omitempty"`
|
||||
IsPrivateChat bool `json:"isPrivateChat"`
|
||||
GroupAtType int32 `json:"groupAtType"`
|
||||
IsNotInGroup bool `json:"isNotInGroup"`
|
||||
AttachedInfo string `json:"attachedInfo"`
|
||||
Ex string `json:"ex"`
|
||||
}
|
||||
|
@ -220,3 +220,14 @@ type CancelMuteGroupReq struct {
|
||||
type CancelMuteGroupResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type SetGroupMemberNicknameReq struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
GroupID string `json:"groupID" binding:"required"`
|
||||
UserID string `json:"userID" binding:"required"`
|
||||
Nickname string `json:"nickname"`
|
||||
}
|
||||
|
||||
type SetGroupMemberNicknameResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
110
pkg/base_info/organization_api_struct.go
Normal file
110
pkg/base_info/organization_api_struct.go
Normal file
@ -0,0 +1,110 @@
|
||||
package base_info
|
||||
|
||||
import open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
|
||||
type CreateDepartmentReq struct {
|
||||
*open_im_sdk.Department
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
type CreateDepartmentResp struct {
|
||||
CommResp
|
||||
Department *open_im_sdk.Department `json:"-"`
|
||||
Data map[string]interface{} `json:"data"`
|
||||
}
|
||||
|
||||
type UpdateDepartmentReq struct {
|
||||
*open_im_sdk.Department
|
||||
DepartmentID string `json:"departmentID" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
type UpdateDepartmentResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type GetSubDepartmentReq struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
DepartmentID string `json:"departmentID" binding:"required"`
|
||||
}
|
||||
type GetSubDepartmentResp struct {
|
||||
CommResp
|
||||
DepartmentList []*open_im_sdk.Department `json:"-"`
|
||||
Data []map[string]interface{} `json:"data"`
|
||||
}
|
||||
|
||||
type DeleteDepartmentReq struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
DepartmentID string `json:"departmentID" binding:"required"`
|
||||
}
|
||||
type DeleteDepartmentResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type CreateOrganizationUserReq struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
*open_im_sdk.OrganizationUser
|
||||
}
|
||||
type CreateOrganizationUserResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type UpdateOrganizationUserReq struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
*open_im_sdk.OrganizationUser
|
||||
}
|
||||
type UpdateOrganizationUserResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type CreateDepartmentMemberReq struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
*open_im_sdk.DepartmentMember
|
||||
}
|
||||
|
||||
type CreateDepartmentMemberResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type GetUserInDepartmentReq struct {
|
||||
UserID string `json:"userID" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
type GetUserInDepartmentResp struct {
|
||||
CommResp
|
||||
UserInDepartment *open_im_sdk.UserInDepartment `json:"-"`
|
||||
Data map[string]interface{} `json:"data"`
|
||||
}
|
||||
|
||||
type UpdateUserInDepartmentReq struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
*open_im_sdk.DepartmentMember
|
||||
}
|
||||
type UpdateUserInDepartmentResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type DeleteOrganizationUserReq struct {
|
||||
UserID string `json:"userID" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
type DeleteOrganizationUserResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type GetDepartmentMemberReq struct {
|
||||
DepartmentID string `json:"departmentID" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
type GetDepartmentMemberResp struct {
|
||||
CommResp
|
||||
UserInDepartmentList []*open_im_sdk.UserDepartmentMember `json:"-"`
|
||||
Data []map[string]interface{} `json:"data"`
|
||||
}
|
||||
|
||||
type DeleteUserInDepartmentReq struct {
|
||||
DepartmentID string `json:"departmentID" binding:"required"`
|
||||
UserID string `json:"userID" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
type DeleteUserInDepartmentResp struct {
|
||||
CommResp
|
||||
}
|
116
pkg/base_info/work_moments_struct.go
Normal file
116
pkg/base_info/work_moments_struct.go
Normal file
@ -0,0 +1,116 @@
|
||||
package base_info
|
||||
|
||||
import "Open_IM/pkg/proto/office"
|
||||
|
||||
type CreateOneWorkMomentReq struct {
|
||||
office.CreateOneWorkMomentReq
|
||||
}
|
||||
|
||||
type CreateOneWorkMomentResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type DeleteOneWorkMomentReq struct {
|
||||
office.DeleteOneWorkMomentReq
|
||||
}
|
||||
|
||||
type DeleteOneWorkMomentResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type LikeOneWorkMomentReq struct {
|
||||
office.LikeOneWorkMomentReq
|
||||
}
|
||||
|
||||
type LikeOneWorkMomentResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type CommentOneWorkMomentReq struct {
|
||||
office.CommentOneWorkMomentReq
|
||||
}
|
||||
|
||||
type CommentOneWorkMomentResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
type WorkMomentsUserCommonReq struct {
|
||||
PageNumber int32 `json:"pageNumber" binding:"required"`
|
||||
ShowNumber int32 `json:"showNumber" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
|
||||
type GetWorkMomentByIDReq struct {
|
||||
office.GetWorkMomentByIDReq
|
||||
}
|
||||
|
||||
type WorkMoment struct {
|
||||
WorkMomentID string `json:"workMomentID"`
|
||||
UserID string `json:"userID"`
|
||||
Content string `json:"content"`
|
||||
LikeUserList []*WorkMomentUser `json:"likeUsers"`
|
||||
Comments []*Comment `json:"comments"`
|
||||
FaceURL string `json:"faceUrl"`
|
||||
UserName string `json:"userName"`
|
||||
//Permission int32 `json:"permission"`
|
||||
//PermissionUserIDList []string `json:"permissionUserIDList"`
|
||||
//PermissionGroupIDList []string `json:"permissionGroupIDList"`
|
||||
AtUserList []*WorkMomentUser `json:"atUsers"`
|
||||
CreateTime int32 `json:"createTime"`
|
||||
}
|
||||
|
||||
type WorkMomentUser struct {
|
||||
UserID string `json:"userID"`
|
||||
UserName string `json:"userName"`
|
||||
}
|
||||
|
||||
type Comment struct {
|
||||
UserID string `json:"userID"`
|
||||
UserName string `json:"userName"`
|
||||
ReplyUserID string `json:"replyUserID"`
|
||||
ReplyUserName string `json:"replyUserName"`
|
||||
ContentID string `json:"contentID"`
|
||||
Content string `json:"content"`
|
||||
CreateTime int32 `json:"createTime"`
|
||||
}
|
||||
|
||||
type GetWorkMomentByIDResp struct {
|
||||
CommResp
|
||||
Data struct {
|
||||
WorkMoment *WorkMoment `json:"workMoment"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
type GetUserWorkMomentsReq struct {
|
||||
WorkMomentsUserCommonReq
|
||||
}
|
||||
|
||||
type GetUserWorkMomentsResp struct {
|
||||
CommResp
|
||||
Data struct {
|
||||
WorkMoments []*WorkMoment `json:"workMoments"`
|
||||
CurrentPage int32 `json:"currentPage"`
|
||||
ShowNumber int32 `json:"showNumber"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
type GetUserFriendWorkMomentsReq struct {
|
||||
WorkMomentsUserCommonReq
|
||||
}
|
||||
|
||||
type GetUserFriendWorkMomentsResp struct {
|
||||
CommResp
|
||||
Data struct {
|
||||
WorkMoments []*WorkMoment `json:"workMoments"`
|
||||
CurrentPage int32 `json:"currentPage"`
|
||||
ShowNumber int32 `json:"showNumber"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
type SetUserWorkMomentsLevelReq struct {
|
||||
office.SetUserWorkMomentsLevelReq
|
||||
}
|
||||
|
||||
type SetUserWorkMomentsLevelResp struct {
|
||||
CommResp
|
||||
}
|
@ -56,11 +56,13 @@ type config struct {
|
||||
OssRoleArn string `yaml:"OssRoleArn"`
|
||||
}
|
||||
Minio struct {
|
||||
Bucket string `yaml:"bucket"`
|
||||
Location string `yaml:"location"`
|
||||
Endpoint string `yaml:"endpoint"`
|
||||
AccessKeyID string `yaml:"accessKeyID"`
|
||||
SecretAccessKey string `yaml:"secretAccessKey"`
|
||||
Bucket string `yaml:"bucket"`
|
||||
Location string `yaml:"location"`
|
||||
Endpoint string `yaml:"endpoint"`
|
||||
AccessKeyID string `yaml:"accessKeyID"`
|
||||
SecretAccessKey string `yaml:"secretAccessKey"`
|
||||
EndpointInner string `yaml:"endpointInner"`
|
||||
EndpointInnerEnable bool `yaml:"endpointInnerEnable"`
|
||||
} `yaml:"minio"`
|
||||
}
|
||||
|
||||
@ -115,6 +117,7 @@ type config struct {
|
||||
OpenImMessageCMSName string `yaml:"openImMessageCMSName"`
|
||||
OpenImAdminCMSName string `yaml:"openImAdminCMSName"`
|
||||
OpenImOfficeName string `yaml:"openImOfficeName"`
|
||||
OpenImOrganizationName string `yaml:"openImOrganizationName"`
|
||||
}
|
||||
Etcd struct {
|
||||
EtcdSchema string `yaml:"etcdSchema"`
|
||||
@ -173,6 +176,7 @@ type config struct {
|
||||
AppManagerUid []string `yaml:"appManagerUid"`
|
||||
Secrets []string `yaml:"secrets"`
|
||||
}
|
||||
|
||||
Kafka struct {
|
||||
Ws2mschat struct {
|
||||
Addr []string `yaml:"addr"`
|
||||
@ -188,9 +192,11 @@ type config struct {
|
||||
MsgToPush string `yaml:"msgToPush"`
|
||||
}
|
||||
}
|
||||
Secret string `yaml:"secret"`
|
||||
MultiLoginPolicy int `yaml:"multiloginpolicy"`
|
||||
TokenPolicy struct {
|
||||
Secret string `yaml:"secret"`
|
||||
MultiLoginPolicy int `yaml:"multiloginpolicy"`
|
||||
ChatPersistenceMysql bool `yaml:"chatPersistenceMysql"`
|
||||
|
||||
TokenPolicy struct {
|
||||
AccessSecret string `yaml:"accessSecret"`
|
||||
AccessExpire int64 `yaml:"accessExpire"`
|
||||
}
|
||||
@ -301,6 +307,16 @@ type config struct {
|
||||
OfflinePush POfflinePush `yaml:"offlinePush"`
|
||||
DefaultTips PDefaultTips `yaml:"defaultTips"`
|
||||
} `yaml:"groupMemberCancelMuted"`
|
||||
GroupMemberInfoSet struct {
|
||||
Conversation PConversation `yaml:"conversation"`
|
||||
OfflinePush POfflinePush `yaml:"offlinePush"`
|
||||
DefaultTips PDefaultTips `yaml:"defaultTips"`
|
||||
} `yaml:"groupMemberInfoSet"`
|
||||
OrganizationChanged struct {
|
||||
Conversation PConversation `yaml:"conversation"`
|
||||
OfflinePush POfflinePush `yaml:"offlinePush"`
|
||||
DefaultTips PDefaultTips `yaml:"defaultTips"`
|
||||
} `yaml:"organizationChanged"`
|
||||
|
||||
////////////////////////user///////////////////////
|
||||
UserInfoUpdated struct {
|
||||
@ -366,6 +382,11 @@ type config struct {
|
||||
CloseTips string `yaml:"closeTips"`
|
||||
} `yaml:"defaultTips"`
|
||||
} `yaml:"conversationSetPrivate"`
|
||||
WorkMomentsNotification struct {
|
||||
Conversation PConversation `yaml:"conversation"`
|
||||
OfflinePush POfflinePush `yaml:"offlinePush"`
|
||||
DefaultTips PDefaultTips `yaml:"defaultTips"`
|
||||
} `yaml:"workMomentsNotification"`
|
||||
}
|
||||
Demo struct {
|
||||
Port []int `yaml:"openImDemoPort"`
|
||||
|
@ -81,6 +81,7 @@ const (
|
||||
GroupMemberCancelMutedNotification = 1513
|
||||
GroupMutedNotification = 1514
|
||||
GroupCancelMutedNotification = 1515
|
||||
GroupMemberInfoSetNotification = 1516
|
||||
|
||||
SignalingNotificationBegin = 1600
|
||||
SignalingNotification = 1601
|
||||
@ -88,6 +89,11 @@ const (
|
||||
|
||||
ConversationPrivateChatNotification = 1701
|
||||
|
||||
OrganizationChangedNotification = 1801
|
||||
|
||||
WorkMomentNotificationBegin = 1900
|
||||
WorkMomentNotification = 1901
|
||||
|
||||
NotificationEnd = 2000
|
||||
|
||||
//status
|
||||
@ -177,6 +183,24 @@ const (
|
||||
OtherType = 1
|
||||
VideoType = 2
|
||||
ImageType = 3
|
||||
|
||||
// workMoment permission
|
||||
WorkMomentPublic = 0
|
||||
WorkMomentPrivate = 1
|
||||
WorkMomentPermissionCanSee = 2
|
||||
WorkMomentPermissionCantSee = 3
|
||||
|
||||
// workMoment sdk notification type
|
||||
WorkMomentCommentNotification = 0
|
||||
WorkMomentLikeNotification = 1
|
||||
WorkMomentAtUserNotification = 2
|
||||
)
|
||||
const (
|
||||
AtAllString = "AtAllTag"
|
||||
AtNormal = 0
|
||||
AtMe = 1
|
||||
AtAll = 2
|
||||
AtAllAtMe = 3
|
||||
)
|
||||
|
||||
var ContentType2PushContent = map[int64]string{
|
||||
|
@ -51,7 +51,8 @@ var (
|
||||
|
||||
ErrAccess = ErrInfo{ErrCode: 801, ErrMsg: AccessMsg.Error()}
|
||||
ErrDB = ErrInfo{ErrCode: 802, ErrMsg: DBMsg.Error()}
|
||||
ErrArgs = ErrInfo{ErrCode: 8003, ErrMsg: ArgsMsg.Error()}
|
||||
ErrArgs = ErrInfo{ErrCode: 803, ErrMsg: ArgsMsg.Error()}
|
||||
ErrStatus = ErrInfo{ErrCode: 804, ErrMsg: StatusMsg.Error()}
|
||||
ErrCallback = ErrInfo{ErrCode: 809, ErrMsg: CallBackMsg.Error()}
|
||||
)
|
||||
|
||||
@ -64,6 +65,7 @@ var (
|
||||
TokenUnknownMsg = errors.New("couldn't handle this token")
|
||||
TokenUserKickedMsg = errors.New("user has been kicked")
|
||||
AccessMsg = errors.New("no permission")
|
||||
StatusMsg = errors.New("status is abnormal")
|
||||
DBMsg = errors.New("db failed")
|
||||
ArgsMsg = errors.New("args failed")
|
||||
CallBackMsg = errors.New("callback failed")
|
||||
|
@ -2,6 +2,8 @@ package db
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
|
||||
//"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/utils"
|
||||
"fmt"
|
||||
@ -34,7 +36,6 @@ func key(dbAddress, dbName string) string {
|
||||
|
||||
func init() {
|
||||
//log.NewPrivateLog(constant.LogFileName)
|
||||
//var mgoSession *mgo.Session
|
||||
var mongoClient *mongo.Client
|
||||
var err1 error
|
||||
//mysql init
|
||||
@ -46,11 +47,15 @@ func init() {
|
||||
// example: mongodb://$user:$password@mongo1.mongo:27017,mongo2.mongo:27017,mongo3.mongo:27017/$DBDatabase/?replicaSet=rs0&readPreference=secondary&authSource=admin&maxPoolSize=$DBMaxPoolSize
|
||||
uri = config.Config.Mongo.DBUri
|
||||
} else {
|
||||
uri = fmt.Sprintf("mongodb://%s/%s/?maxPoolSize=%d",
|
||||
config.Config.Mongo.DBAddress[0], config.Config.Mongo.DBDatabase,
|
||||
config.Config.Mongo.DBMaxPoolSize)
|
||||
if config.Config.Mongo.DBPassword != "" && config.Config.Mongo.DBUserName != "" {
|
||||
uri = fmt.Sprintf("mongodb://%s:%s@%s/%s?maxPoolSize=%d", config.Config.Mongo.DBUserName, config.Config.Mongo.DBPassword, config.Config.Mongo.DBAddress[0],
|
||||
config.Config.Mongo.DBDatabase, config.Config.Mongo.DBMaxPoolSize)
|
||||
} else {
|
||||
uri = fmt.Sprintf("mongodb://%s/%s/?maxPoolSize=%d",
|
||||
config.Config.Mongo.DBAddress[0], config.Config.Mongo.DBDatabase,
|
||||
config.Config.Mongo.DBMaxPoolSize)
|
||||
}
|
||||
}
|
||||
|
||||
mongoClient, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(uri))
|
||||
if err != nil {
|
||||
fmt.Println(" mongo.Connect failed, try ", utils.GetSelfFuncName(), err.Error(), uri)
|
||||
@ -61,40 +66,68 @@ func init() {
|
||||
panic(err1.Error())
|
||||
}
|
||||
}
|
||||
fmt.Println("0", utils.GetSelfFuncName(), "mongo driver client init success")
|
||||
fmt.Println("0", utils.GetSelfFuncName(), "mongo driver client init success: ", uri)
|
||||
// mongodb create index
|
||||
opts := options.CreateIndexes().SetMaxTime(10 * time.Second)
|
||||
dataBase := mongoClient.Database(config.Config.Mongo.DBDatabase)
|
||||
|
||||
cCommentMsgModels := []mongo.IndexModel{
|
||||
{
|
||||
Keys: bson.M{"create_time": -1, "user_id": -1},
|
||||
},
|
||||
}
|
||||
result, err := dataBase.Collection(cCommentMsg).Indexes().CreateMany(context.Background(), cCommentMsgModels, opts)
|
||||
if err != nil {
|
||||
fmt.Println("mongodb create cCommentMsgModels failed", result, err.Error())
|
||||
}
|
||||
|
||||
cSendLogModels := []mongo.IndexModel{
|
||||
{
|
||||
Keys: bson.M{"user_id": -1, "send_time": -1},
|
||||
},
|
||||
}
|
||||
result, err = dataBase.Collection(cSendLog).Indexes().CreateMany(context.Background(), cSendLogModels, opts)
|
||||
if err != nil {
|
||||
fmt.Println("mongodb create cSendLogModels failed", result, err.Error())
|
||||
}
|
||||
|
||||
cChatModels := []mongo.IndexModel{
|
||||
{
|
||||
Keys: bson.M{"uid": -1},
|
||||
},
|
||||
}
|
||||
result, err = dataBase.Collection(cChat).Indexes().CreateMany(context.Background(), cChatModels, opts)
|
||||
if err != nil {
|
||||
fmt.Println("mongodb create cChatModels failed", result, err.Error())
|
||||
}
|
||||
|
||||
cWorkMomentModels := []mongo.IndexModel{
|
||||
{
|
||||
Keys: bson.M{"work_moment_id": -1},
|
||||
},
|
||||
{
|
||||
Keys: bson.M{"user_id": -1, "create_time": -1},
|
||||
},
|
||||
}
|
||||
result, err = dataBase.Collection(cWorkMoment).Indexes().CreateMany(context.Background(), cWorkMomentModels, opts)
|
||||
if err != nil {
|
||||
fmt.Println("mongodb create cWorkMomentModels failed", result, err.Error())
|
||||
}
|
||||
|
||||
cTagModels := []mongo.IndexModel{
|
||||
{
|
||||
Keys: bson.M{"tag_id": -1},
|
||||
},
|
||||
{
|
||||
Keys: bson.M{"user_id": -1, "tag_id": -1},
|
||||
},
|
||||
}
|
||||
result, err = dataBase.Collection(cTag).Indexes().CreateMany(context.Background(), cTagModels, opts)
|
||||
if err != nil {
|
||||
fmt.Println("mongodb create cTagModels failed", result, err.Error())
|
||||
}
|
||||
DB.mongoClient = mongoClient
|
||||
|
||||
//mgoDailInfo := &mgo.DialInfo{
|
||||
// Addrs: config.Config.Mongo.DBAddress,
|
||||
// Direct: config.Config.Mongo.DBDirect,
|
||||
// Timeout: time.Second * time.Duration(config.Config.Mongo.DBTimeout),
|
||||
// Database: config.Config.Mongo.DBDatabase,
|
||||
// Source: config.Config.Mongo.DBSource,
|
||||
// Username: config.Config.Mongo.DBUserName,
|
||||
// Password: config.Config.Mongo.DBPassword,
|
||||
// PoolLimit: config.Config.Mongo.DBMaxPoolSize,
|
||||
//}
|
||||
//mgoSession, err = mgo.DialWithInfo(mgoDailInfo)
|
||||
//
|
||||
//if err != nil {
|
||||
//
|
||||
// mgoSession, err1 = mgo.DialWithInfo(mgoDailInfo)
|
||||
// if err1 != nil {
|
||||
// log.NewError(" mongo.Connect failed, panic", err.Error())
|
||||
// panic(err1.Error())
|
||||
// }
|
||||
//}
|
||||
|
||||
//DB.mgoSession = mgoSession
|
||||
//DB.mgoSession.SetMode(mgo.Monotonic, true)
|
||||
//c := DB.mgoSession.DB(config.Config.Mongo.DBDatabase).C(cChat)
|
||||
//err = c.EnsureIndexKey("uid")
|
||||
//if err != nil {
|
||||
// panic(err.Error())
|
||||
//}
|
||||
//
|
||||
|
||||
// redis pool init
|
||||
DB.redisPool = &redis.Pool{
|
||||
MaxIdle: config.Config.Redis.DBMaxIdle,
|
||||
|
@ -215,6 +215,8 @@ type Conversation struct {
|
||||
DraftTextTime int64 `gorm:"column:draft_text_time" json:"draftTextTime"`
|
||||
IsPinned bool `gorm:"column:is_pinned" json:"isPinned"`
|
||||
IsPrivateChat bool `gorm:"column:is_private_chat" json:"isPrivateChat"`
|
||||
GroupAtType int32 `gorm:"column:group_at_type" json:"groupAtType"`
|
||||
IsNotInGroup bool `gorm:"column:is_not_in_group" json:"isNotInGroup"`
|
||||
AttachedInfo string `gorm:"column:attached_info;type:varchar(1024)" json:"attachedInfo"`
|
||||
Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"`
|
||||
}
|
||||
@ -227,9 +229,9 @@ type Department struct {
|
||||
DepartmentID string `gorm:"column:department_id;primary_key;size:64" json:"departmentID"`
|
||||
FaceURL string `gorm:"column:face_url;size:255" json:"faceURL"`
|
||||
Name string `gorm:"column:name;size:256" json:"name" binding:"required"`
|
||||
ParentID string `gorm:"column:parent_id;size:64" json:"parentID" binding:"required"`
|
||||
Order int32 `gorm:"column:order" json:"order" `
|
||||
DepartmentType int32 `gorm:"column:department_type" json:"departmentType"`
|
||||
ParentID string `gorm:"column:parent_id;size:64" json:"parentID" binding:"required"` // "0" or Real parent id
|
||||
Order int32 `gorm:"column:order" json:"order" ` // 1, 2, ...
|
||||
DepartmentType int32 `gorm:"column:department_type" json:"departmentType"` //1, 2...
|
||||
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
|
||||
Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"`
|
||||
}
|
||||
@ -238,32 +240,33 @@ func (Department) TableName() string {
|
||||
return "departments"
|
||||
}
|
||||
|
||||
type DepartmentUser struct {
|
||||
type OrganizationUser struct {
|
||||
UserID string `gorm:"column:user_id;primary_key;size:64"`
|
||||
Nickname string `gorm:"column:nickname;size:256"`
|
||||
EnglishName string `gorm:"column:english_name;size:256"`
|
||||
FaceURL string `gorm:"column:face_url;size:256"`
|
||||
Gender int32 `gorm:"column:gender"`
|
||||
mobile string `gorm:"column:mobile;size:32"`
|
||||
telephone string `gorm:"column:telephone;size:32"`
|
||||
Gender int32 `gorm:"column:gender"` //1 ,2
|
||||
Mobile string `gorm:"column:mobile;size:32"`
|
||||
Telephone string `gorm:"column:telephone;size:32"`
|
||||
Birth time.Time `gorm:"column:birth"`
|
||||
Email string `gorm:"column:email;size:64"`
|
||||
CreateTime time.Time `gorm:"column:create_time"`
|
||||
Ex string `gorm:"column:ex;size:1024"`
|
||||
}
|
||||
|
||||
func (DepartmentUser) TableName() string {
|
||||
return "Department_users"
|
||||
func (OrganizationUser) TableName() string {
|
||||
return "organization_users"
|
||||
}
|
||||
|
||||
type DepartmentMember struct {
|
||||
userID string `gorm:"column:user_id;primary_key;size:64"`
|
||||
DepartmentID string `gorm:"column:department_id;primary_key;size:64"`
|
||||
Order int32 `gorm:"column:order" json:"order"`
|
||||
Position string `gorm:"column:position;size:256" json:"position"`
|
||||
Leader int32 `gorm:"column:leader" json:"leader"`
|
||||
Status int32 `gorm:"column:status" json:"status"`
|
||||
Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"`
|
||||
UserID string `gorm:"column:user_id;primary_key;size:64"`
|
||||
DepartmentID string `gorm:"column:department_id;primary_key;size:64"`
|
||||
Order int32 `gorm:"column:order" json:"order"` //1,2
|
||||
Position string `gorm:"column:position;size:256" json:"position"`
|
||||
Leader int32 `gorm:"column:leader" json:"leader"` //-1, 1
|
||||
Status int32 `gorm:"column:status" json:"status"` //-1, 1
|
||||
CreateTime time.Time `gorm:"column:create_time"`
|
||||
Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"`
|
||||
}
|
||||
|
||||
func (DepartmentMember) TableName() string {
|
||||
|
@ -26,6 +26,8 @@ const cChat = "msg"
|
||||
const cGroup = "group"
|
||||
const cTag = "tag"
|
||||
const cSendLog = "send_log"
|
||||
const cWorkMoment = "work_moment"
|
||||
const cCommentMsg = "comment_msg"
|
||||
const singleGocMsgNum = 5000
|
||||
|
||||
type MsgInfo struct {
|
||||
@ -563,10 +565,141 @@ func (d *DataBases) GetTagSendLogs(userID string, showNumber, pageNumber int32)
|
||||
return tagSendLogs, nil
|
||||
}
|
||||
|
||||
type WorkMoment struct {
|
||||
WorkMomentID string `bson:"work_moment_id"`
|
||||
UserID string `bson:"user_id"`
|
||||
UserName string `bson:"user_name"`
|
||||
FaceURL string `bson:"face_url"`
|
||||
Content string `bson:"content"`
|
||||
LikeUserList []*LikeUser `bson:"like_user_list"`
|
||||
AtUserList []*AtUser `bson:"at_user_list"`
|
||||
Comments []*Comment `bson:"comments"`
|
||||
PermissionUserIDList []string `bson:"permission_user_id_list"`
|
||||
Permission int32 `bson:"permission"`
|
||||
CreateTime int32 `bson:"create_time"`
|
||||
}
|
||||
|
||||
type AtUser struct {
|
||||
UserID string `bson:"user_id"`
|
||||
UserName string `bson:"user_name"`
|
||||
}
|
||||
|
||||
type LikeUser struct {
|
||||
UserID string `bson:"user_id"`
|
||||
UserName string `bson:"user_name"`
|
||||
}
|
||||
|
||||
type Comment struct {
|
||||
UserID string `bson:"user_id" json:"user_id"`
|
||||
UserName string `bson:"user_name" json:"user_name"`
|
||||
ReplyUserID string `bson:"reply_user_id" json:"reply_user_id"`
|
||||
ReplyUserName string `bson:"reply_user_name" json:"reply_user_name"`
|
||||
ContentID string `bson:"content_id" json:"content_id"`
|
||||
Content string `bson:"content" json:"content"`
|
||||
CreateTime int32 `bson:"create_time" json:"create_time"`
|
||||
}
|
||||
|
||||
func (d *DataBases) CreateOneWorkMoment(workMoment *WorkMoment) error {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment)
|
||||
workMomentID := generateWorkMomentID(workMoment.UserID)
|
||||
workMoment.WorkMomentID = workMomentID
|
||||
workMoment.CreateTime = int32(time.Now().Unix())
|
||||
_, err := c.InsertOne(ctx, workMoment)
|
||||
return err
|
||||
}
|
||||
|
||||
func (d *DataBases) DeleteOneWorkMoment(workMomentID string) error {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment)
|
||||
_, err := c.DeleteOne(ctx, bson.M{"work_moment_id": workMomentID})
|
||||
return err
|
||||
}
|
||||
|
||||
func (d *DataBases) GetWorkMomentByID(workMomentID string) (*WorkMoment, error) {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment)
|
||||
workMoment := &WorkMoment{}
|
||||
err := c.FindOne(ctx, bson.M{"work_moment_id": workMomentID}).Decode(workMoment)
|
||||
return workMoment, err
|
||||
}
|
||||
|
||||
func (d *DataBases) LikeOneWorkMoment(likeUserID, userName, workMomentID string) (*WorkMoment, bool, error) {
|
||||
workMoment, err := d.GetWorkMomentByID(workMomentID)
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
var isAlreadyLike bool
|
||||
for i, user := range workMoment.LikeUserList {
|
||||
if likeUserID == user.UserID {
|
||||
isAlreadyLike = true
|
||||
workMoment.LikeUserList = append(workMoment.LikeUserList[0:i], workMoment.LikeUserList[i+1:]...)
|
||||
}
|
||||
}
|
||||
if !isAlreadyLike {
|
||||
workMoment.LikeUserList = append(workMoment.LikeUserList, &LikeUser{UserID: likeUserID, UserName: userName})
|
||||
}
|
||||
log.NewDebug("", utils.GetSelfFuncName(), workMoment)
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment)
|
||||
_, err = c.UpdateOne(ctx, bson.M{"work_moment_id": workMomentID}, bson.M{"$set": bson.M{"like_user_list": workMoment.LikeUserList}})
|
||||
return workMoment, !isAlreadyLike, err
|
||||
}
|
||||
|
||||
func (d *DataBases) SetUserWorkMomentsLevel(userID string, level int32) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *DataBases) CommentOneWorkMoment(comment *Comment, workMomentID string) (WorkMoment, error) {
|
||||
comment.ContentID = generateWorkMomentCommentID(workMomentID)
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment)
|
||||
var workMoment WorkMoment
|
||||
err := c.FindOneAndUpdate(ctx, bson.M{"work_moment_id": workMomentID}, bson.M{"$push": bson.M{"comments": comment}}).Decode(&workMoment)
|
||||
return workMoment, err
|
||||
}
|
||||
|
||||
func (d *DataBases) GetUserWorkMoments(userID string, showNumber, pageNumber int32) ([]WorkMoment, error) {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment)
|
||||
var workMomentList []WorkMoment
|
||||
findOpts := options.Find().SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1)).SetSort(bson.M{"create_time": -1})
|
||||
result, err := c.Find(ctx, bson.M{"user_id": userID}, findOpts)
|
||||
if err != nil {
|
||||
return workMomentList, nil
|
||||
}
|
||||
err = result.All(ctx, &workMomentList)
|
||||
return workMomentList, err
|
||||
}
|
||||
|
||||
func (d *DataBases) GetUserFriendWorkMoments(friendIDList []*string, showNumber, pageNumber int32, userID string) ([]WorkMoment, error) {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment)
|
||||
var workMomentList []WorkMoment
|
||||
findOpts := options.Find().SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1)).SetSort(bson.M{"create_time": -1})
|
||||
result, err := c.Find(ctx,
|
||||
bson.M{"user_id": friendIDList, "$or": bson.M{"who_can_see_user_id_list": bson.M{"$elemMatch": bson.M{"$eq": userID}},
|
||||
"who_cant_see_user_id_list": bson.M{"$nin": userID}},
|
||||
}, findOpts)
|
||||
if err != nil {
|
||||
return workMomentList, err
|
||||
}
|
||||
err = result.All(ctx, &workMomentList)
|
||||
return workMomentList, err
|
||||
}
|
||||
|
||||
func generateTagID(tagName, userID string) string {
|
||||
return utils.Md5(tagName + userID + strconv.Itoa(rand.Int()) + time.Now().String())
|
||||
}
|
||||
|
||||
func generateWorkMomentID(userID string) string {
|
||||
return utils.Md5(userID + strconv.Itoa(rand.Int()) + time.Now().String())
|
||||
}
|
||||
|
||||
func generateWorkMomentCommentID(workMomentID string) string {
|
||||
return utils.Md5(workMomentID + strconv.Itoa(rand.Int()) + time.Now().String())
|
||||
}
|
||||
|
||||
func getCurrentTimestampByMill() int64 {
|
||||
return time.Now().UnixNano() / 1e6
|
||||
}
|
||||
@ -588,9 +721,7 @@ func getMsgIndex(seq uint32) int {
|
||||
}
|
||||
|
||||
func isContainInt32(target uint32, List []uint32) bool {
|
||||
|
||||
for _, element := range List {
|
||||
|
||||
if target == element {
|
||||
return true
|
||||
}
|
||||
|
@ -106,18 +106,20 @@ func initMysqlDB() {
|
||||
fmt.Println("CreateTable Conversation")
|
||||
db.CreateTable(&Conversation{})
|
||||
}
|
||||
if db.HasTable(&Department{}) {
|
||||
|
||||
if !db.HasTable(&Department{}) {
|
||||
fmt.Println("CreateTable Department")
|
||||
db.CreateTable(&Department{})
|
||||
}
|
||||
if db.HasTable(&DepartmentUser{}) {
|
||||
fmt.Println("CreateTable DepartmentUser")
|
||||
db.CreateTable(&DepartmentUser{})
|
||||
if !db.HasTable(&OrganizationUser{}) {
|
||||
fmt.Println("CreateTable OrganizationUser")
|
||||
db.CreateTable(&OrganizationUser{})
|
||||
}
|
||||
if db.HasTable(&DepartmentMember{}) {
|
||||
if !db.HasTable(&DepartmentMember{}) {
|
||||
fmt.Println("CreateTable DepartmentMember")
|
||||
db.CreateTable(&DepartmentMember{})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,19 @@ func GetFriendListByUserID(OwnerUserID string) ([]db.Friend, error) {
|
||||
return friends, nil
|
||||
}
|
||||
|
||||
func GetFriendIDListByUserID(OwnerUserID string) ([]*string, error) {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var friendIDList []*string
|
||||
err = dbConn.Table("friends").Select("friend_user_id").Where("owner_user_id=?", OwnerUserID).Find(&friendIDList).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return friendIDList, nil
|
||||
}
|
||||
|
||||
func UpdateFriendComment(OwnerUserID, FriendUserID, Remark string) error {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
|
238
pkg/common/db/mysql_model/im_mysql_model/organization_model.go
Normal file
238
pkg/common/db/mysql_model/im_mysql_model/organization_model.go
Normal file
@ -0,0 +1,238 @@
|
||||
package im_mysql_model
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/db"
|
||||
"Open_IM/pkg/utils"
|
||||
"time"
|
||||
)
|
||||
|
||||
func CreateDepartment(department *db.Department) error {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
department.CreateTime = time.Now()
|
||||
return dbConn.Table("departments").Create(department).Error
|
||||
}
|
||||
|
||||
func GetDepartment(departmentID string) (error, *db.Department) {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err, nil
|
||||
}
|
||||
var department db.Department
|
||||
err = dbConn.Table("departments").Where("department_id=?", departmentID).Find(&department).Error
|
||||
return err, &department
|
||||
}
|
||||
|
||||
func UpdateDepartment(department *db.Department, args map[string]interface{}) error {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = dbConn.Table("departments").Where("department_id=?", department.DepartmentID).Updates(department).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
if args != nil {
|
||||
return dbConn.Table("departments").Where("department_id=?", department.DepartmentID).Updates(args).Error
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetSubDepartmentList(departmentID string) (error, []db.Department) {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err, nil
|
||||
}
|
||||
var departmentList []db.Department
|
||||
if departmentID == "-1" {
|
||||
err = dbConn.Table("departments").Find(&departmentList).Error
|
||||
} else {
|
||||
err = dbConn.Table("departments").Where("parent_id=?", departmentID).Find(&departmentList).Error
|
||||
}
|
||||
|
||||
return err, departmentList
|
||||
}
|
||||
|
||||
func DeleteDepartment(departmentID string) error {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = dbConn.Table("departments").Where("department_id=?", departmentID).Delete(db.Department{}).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
if err = dbConn.Table("department_members").Where("department_id=?", departmentID).Delete(db.DepartmentMember{}).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func CreateOrganizationUser(organizationUser *db.OrganizationUser) error {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
organizationUser.CreateTime = time.Now()
|
||||
|
||||
return dbConn.Table("organization_users").Create(organizationUser).Error
|
||||
}
|
||||
|
||||
func GetOrganizationUser(userID string) (error, *db.OrganizationUser) {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err, nil
|
||||
}
|
||||
organizationUser := db.OrganizationUser{}
|
||||
err = dbConn.Table("organization_users").Where("user_id=?", userID).Take(&organizationUser).Error
|
||||
return err, &organizationUser
|
||||
}
|
||||
|
||||
func UpdateOrganizationUser(organizationUser *db.OrganizationUser, args map[string]interface{}) error {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = dbConn.Table("organization_users").Where("user_id=?", organizationUser.UserID).Updates(organizationUser).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
if args != nil {
|
||||
return dbConn.Table("organization_users").Where("user_id=?", organizationUser.UserID).Updates(args).Error
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func CreateDepartmentMember(departmentMember *db.DepartmentMember) error {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
departmentMember.CreateTime = time.Now()
|
||||
return dbConn.Table("department_members").Create(departmentMember).Error
|
||||
}
|
||||
|
||||
func GetUserInDepartment(userID string) (error, []db.DepartmentMember) {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err, nil
|
||||
}
|
||||
var departmentMemberList []db.DepartmentMember
|
||||
err = dbConn.Table("department_members").Where("user_id=?", userID).Find(&departmentMemberList).Error
|
||||
return err, departmentMemberList
|
||||
}
|
||||
|
||||
func UpdateUserInDepartment(departmentMember *db.DepartmentMember, args map[string]interface{}) error {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = dbConn.Table("department_members").Where("department_id=? AND user_id=?", departmentMember.DepartmentID, departmentMember.UserID).
|
||||
Updates(departmentMember).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
if args != nil {
|
||||
return dbConn.Table("department_members").Where("department_id=? AND user_id=?", departmentMember.DepartmentID, departmentMember.UserID).
|
||||
Updates(args).Error
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeleteUserInDepartment(departmentID, userID string) error {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return dbConn.Table("department_members").Where("department_id=? AND user_id=?", departmentID, userID).Delete(db.DepartmentMember{}).Error
|
||||
}
|
||||
|
||||
func DeleteUserInAllDepartment(userID string) error {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return dbConn.Table("department_members").Where("user_id=?", userID).Delete(db.DepartmentMember{}).Error
|
||||
}
|
||||
|
||||
func DeleteOrganizationUser(OrganizationUserID string) error {
|
||||
if err := DeleteUserInAllDepartment(OrganizationUserID); err != nil {
|
||||
return err
|
||||
}
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return dbConn.Table("organization_users").Where("user_id=?", OrganizationUserID).Delete(db.OrganizationUser{}).Error
|
||||
}
|
||||
|
||||
func GetDepartmentMemberUserIDList(departmentID string) (error, []string) {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err, nil
|
||||
}
|
||||
var departmentMemberList []db.DepartmentMember
|
||||
err = dbConn.Table("department_members").Where("department_id=?", departmentID).Take(&departmentMemberList).Error
|
||||
if err != nil {
|
||||
return err, nil
|
||||
}
|
||||
var userIDList []string = make([]string, 0)
|
||||
for _, v := range departmentMemberList {
|
||||
userIDList = append(userIDList, v.UserID)
|
||||
}
|
||||
return err, userIDList
|
||||
}
|
||||
|
||||
func GetDepartmentMemberList(departmentID string) (error, []db.DepartmentMember) {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err, nil
|
||||
}
|
||||
var departmentMemberList []db.DepartmentMember
|
||||
if departmentID == "-1" {
|
||||
err = dbConn.Table("department_members").Find(&departmentMemberList).Error
|
||||
} else {
|
||||
err = dbConn.Table("department_members").Where("department_id=?", departmentID).Find(&departmentMemberList).Error
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err, nil
|
||||
}
|
||||
return err, departmentMemberList
|
||||
}
|
||||
|
||||
func GetAllOrganizationUserID() (error, []string) {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return err, nil
|
||||
}
|
||||
var OrganizationUser db.OrganizationUser
|
||||
var result []string
|
||||
return dbConn.Model(&OrganizationUser).Pluck("user_id", &result).Error, result
|
||||
}
|
||||
|
||||
func GetDepartmentMemberNum(departmentID string) (error, uint32) {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return utils.Wrap(err, "DefaultGormDB failed"), 0
|
||||
}
|
||||
var number uint32
|
||||
err = dbConn.Table("department_members").Where("department_id=?", departmentID).Count(&number).Error
|
||||
if err != nil {
|
||||
return utils.Wrap(err, ""), 0
|
||||
}
|
||||
return nil, number
|
||||
|
||||
}
|
||||
|
||||
func GetSubDepartmentNum(departmentID string) (error, uint32) {
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return utils.Wrap(err, "DefaultGormDB failed"), 0
|
||||
}
|
||||
var number uint32
|
||||
err = dbConn.Table("departments").Where("parent_id=?", departmentID).Count(&number).Error
|
||||
if err != nil {
|
||||
return utils.Wrap(err, ""), 0
|
||||
}
|
||||
return nil, number
|
||||
|
||||
}
|
@ -321,7 +321,8 @@ func SetConversation(conversation db.Conversation) error {
|
||||
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "exist in db, update")
|
||||
//force update
|
||||
return dbConn.Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
|
||||
Update(map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt, "is_pinned": conversation.IsPinned, "is_private_chat": conversation.IsPrivateChat}).Error
|
||||
Update(map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt, "is_pinned": conversation.IsPinned, "is_private_chat": conversation.IsPrivateChat,
|
||||
"group_at_type": conversation.GroupAtType, "is_not_in_group": conversation.IsNotInGroup}).Error
|
||||
}
|
||||
}
|
||||
|
||||
@ -380,10 +381,7 @@ func GetConversation(OwnerUserID, conversationID string) (db.Conversation, error
|
||||
if err != nil {
|
||||
return conversation, err
|
||||
}
|
||||
err = dbConn.Model(&db.Conversation{
|
||||
OwnerUserID: OwnerUserID,
|
||||
ConversationID: conversationID,
|
||||
}).Find(&conversation).Error
|
||||
err = dbConn.Table("conversations").Where("owner_user_id=? and conversation_id=?", OwnerUserID, conversationID).Take(&conversation).Error
|
||||
return conversation, err
|
||||
}
|
||||
|
||||
@ -396,3 +394,12 @@ func GetConversations(OwnerUserID string, conversationIDs []string) ([]db.Conver
|
||||
err = dbConn.Model(&db.Conversation{}).Where("conversation_id IN (?) and owner_user_id=?", conversationIDs, OwnerUserID).Find(&conversations).Error
|
||||
return conversations, err
|
||||
}
|
||||
func GetConversationsByConversationIDMultipleOwner(OwnerUserIDList []string, conversationID string) ([]db.Conversation, error) {
|
||||
var conversations []db.Conversation
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return conversations, err
|
||||
}
|
||||
err = dbConn.Model(&db.Conversation{}).Where("owner_user_id IN (?) and conversation_id=?", OwnerUserIDList, conversationID).Find(&conversations).Error
|
||||
return conversations, err
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ func GetClaimFromToken(tokensString string) (*Claims, error) {
|
||||
}
|
||||
} else {
|
||||
if claims, ok := token.Claims.(*Claims); ok && token.Valid {
|
||||
log.NewDebug("", claims.UID, claims.Platform)
|
||||
//log.NewDebug("", claims.UID, claims.Platform)
|
||||
return claims, nil
|
||||
}
|
||||
return nil, &constant.ErrTokenNotValidYet
|
||||
@ -111,7 +111,7 @@ func IsAppManagerAccess(token string, OpUserID string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func IsMangerUserID(OpUserID string) bool {
|
||||
func IsManagerUserID(OpUserID string) bool {
|
||||
if utils.IsContain(OpUserID, config.Config.Manager.AppManagerUid) {
|
||||
return true
|
||||
} else {
|
||||
@ -138,21 +138,29 @@ func GetUserIDFromToken(token string, operationID string) (bool, string) {
|
||||
return true, claims.UID
|
||||
}
|
||||
|
||||
func ParseTokenGetUserID(token string, operationID string) (error, string) {
|
||||
claims, err := ParseToken(token, operationID)
|
||||
if err != nil {
|
||||
return utils.Wrap(err, ""), ""
|
||||
}
|
||||
return nil, claims.UID
|
||||
}
|
||||
|
||||
func ParseToken(tokensString, operationID string) (claims *Claims, err error) {
|
||||
claims, err = GetClaimFromToken(tokensString)
|
||||
if err != nil {
|
||||
log.NewError(operationID, "token validate err", err.Error(), tokensString)
|
||||
return nil, err
|
||||
return nil, utils.Wrap(err, "")
|
||||
}
|
||||
|
||||
m, err := commonDB.DB.GetTokenMapByUidPid(claims.UID, claims.Platform)
|
||||
if err != nil {
|
||||
log.NewError(operationID, "get token from redis err", err.Error(), tokensString)
|
||||
return nil, &constant.ErrTokenInvalid
|
||||
return nil, utils.Wrap(&constant.ErrTokenInvalid, "get token from redis err")
|
||||
}
|
||||
if m == nil {
|
||||
log.NewError(operationID, "get token from redis err", "m is nil", tokensString)
|
||||
return nil, &constant.ErrTokenInvalid
|
||||
return nil, utils.Wrap(&constant.ErrTokenInvalid, "get token from redis err")
|
||||
}
|
||||
if v, ok := m[tokensString]; ok {
|
||||
switch v {
|
||||
@ -160,18 +168,18 @@ func ParseToken(tokensString, operationID string) (claims *Claims, err error) {
|
||||
log.NewDebug(operationID, "this is normal return", claims)
|
||||
return claims, nil
|
||||
case constant.InValidToken:
|
||||
return nil, &constant.ErrTokenInvalid
|
||||
return nil, utils.Wrap(&constant.ErrTokenInvalid, "")
|
||||
case constant.KickedToken:
|
||||
log.Error(operationID, "this token has been kicked by other same terminal ", constant.ErrTokenKicked)
|
||||
return nil, &constant.ErrTokenKicked
|
||||
return nil, utils.Wrap(&constant.ErrTokenKicked, "this token has been kicked by other same terminal ")
|
||||
case constant.ExpiredToken:
|
||||
return nil, &constant.ErrTokenExpired
|
||||
return nil, utils.Wrap(&constant.ErrTokenExpired, "")
|
||||
default:
|
||||
return nil, &constant.ErrTokenUnknown
|
||||
return nil, utils.Wrap(&constant.ErrTokenUnknown, "")
|
||||
}
|
||||
}
|
||||
log.NewError(operationID, "redis token map not find", constant.ErrTokenUnknown)
|
||||
return nil, &constant.ErrTokenUnknown
|
||||
return nil, utils.Wrap(&constant.ErrTokenUnknown, "redis token map not find")
|
||||
}
|
||||
|
||||
//func MakeTheTokenInvalid(currentClaims *Claims, platformClass string) (bool, error) {
|
||||
@ -210,13 +218,13 @@ func VerifyToken(token, uid string) (bool, error) {
|
||||
func WsVerifyToken(token, uid string, platformID string) (bool, error, string) {
|
||||
claims, err := ParseToken(token, "")
|
||||
if err != nil {
|
||||
return false, err, "parse token err"
|
||||
return false, utils.Wrap(err, "parse token err"), "parse token err"
|
||||
}
|
||||
if claims.UID != uid {
|
||||
return false, &constant.ErrTokenUnknown, "uid is not same to token uid"
|
||||
return false, utils.Wrap(&constant.ErrTokenUnknown, "uid is not same to token uid"), "uid is not same to token uid"
|
||||
}
|
||||
if claims.Platform != constant.PlatformIDToName(utils.StringToInt32(platformID)) {
|
||||
return false, &constant.ErrTokenUnknown, "platform is not same to token platform"
|
||||
return false, utils.Wrap(&constant.ErrTokenUnknown, "platform is not same to token platform"), "platform is not same to token platform"
|
||||
}
|
||||
log.NewDebug("", claims.UID, claims.Platform)
|
||||
return true, nil, ""
|
||||
|
@ -107,7 +107,7 @@ func GroupMemberOpenIMCopyDB(dst *db.GroupMember, src *open_im_sdk.GroupMemberFu
|
||||
|
||||
func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src *db.GroupMember) error {
|
||||
utils.CopyStructFields(dst, src)
|
||||
if token_verify.IsMangerUserID(src.UserID) {
|
||||
if token_verify.IsManagerUserID(src.UserID) {
|
||||
u, err := imdb.GetUserByUserID(src.UserID)
|
||||
if err != nil {
|
||||
return utils.Wrap(err, "")
|
||||
|
302
pkg/proto/conversation/conversation.proto
Normal file
302
pkg/proto/conversation/conversation.proto
Normal file
@ -0,0 +1,302 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./conversation;conversation";
|
||||
package conversation;
|
||||
|
||||
message CommonResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
}
|
||||
|
||||
message DeleteUsersReq{
|
||||
repeated string DeleteUserIDList = 2;
|
||||
string OpUserID = 3;
|
||||
string OperationID = 4;
|
||||
}
|
||||
|
||||
message DeleteUsersResp{
|
||||
CommonResp CommonResp = 1;
|
||||
repeated string FailedUserIDList = 2;
|
||||
}
|
||||
|
||||
|
||||
message GetAllUserIDReq{
|
||||
string opUserID = 1;
|
||||
string operationID = 2;
|
||||
}
|
||||
message GetAllUserIDResp{
|
||||
CommonResp CommonResp = 1;
|
||||
repeated string UserIDList = 2;
|
||||
}
|
||||
|
||||
|
||||
message AccountCheckReq{
|
||||
repeated string CheckUserIDList = 1;
|
||||
string OpUserID = 2;
|
||||
string OperationID = 3;
|
||||
|
||||
}
|
||||
message AccountCheckResp{
|
||||
CommonResp commonResp = 1;
|
||||
message SingleUserStatus {
|
||||
string userID = 1;
|
||||
string accountStatus = 2;
|
||||
}
|
||||
repeated SingleUserStatus ResultList = 2;
|
||||
}
|
||||
|
||||
|
||||
message GetUserInfoReq{
|
||||
repeated string userIDList = 1;
|
||||
string OpUserID = 2;
|
||||
string OperationID = 3;
|
||||
}
|
||||
message GetUserInfoResp{
|
||||
CommonResp commonResp = 1;
|
||||
repeated server_api_params.UserInfo UserInfoList = 3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
message UpdateUserInfoReq{
|
||||
server_api_params.UserInfo UserInfo = 1;
|
||||
string OpUserID = 2;
|
||||
string operationID = 3;
|
||||
}
|
||||
message UpdateUserInfoResp{
|
||||
CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
message Conversation{
|
||||
string OwnerUserID = 1;
|
||||
string ConversationID = 2;
|
||||
int32 RecvMsgOpt = 3;
|
||||
int32 ConversationType = 4;
|
||||
string UserID = 5;
|
||||
string GroupID = 6;
|
||||
int32 UnreadCount = 7;
|
||||
int64 DraftTextTime = 8;
|
||||
bool IsPinned = 9;
|
||||
string AttachedInfo = 10;
|
||||
bool IsPrivateChat = 11;
|
||||
int32 GroupAtType = 12;
|
||||
bool IsNotInGroup = 13;
|
||||
string Ex = 14;
|
||||
}
|
||||
|
||||
message ModifyConversationFiledReq{
|
||||
Conversation Conversation = 1;
|
||||
int32 notificationType = 2;
|
||||
string OperationID = 3;
|
||||
}
|
||||
|
||||
message SetConversationResp{
|
||||
CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
message SetRecvMsgOptReq {
|
||||
string OwnerUserID = 1;
|
||||
string ConversationID = 2;
|
||||
int32 RecvMsgOpt = 3;
|
||||
int32 notificationType = 4;
|
||||
string OperationID = 5;
|
||||
}
|
||||
|
||||
message SetRecvMsgOptResp {
|
||||
CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
message GetConversationReq{
|
||||
string ConversationID = 1;
|
||||
string OwnerUserID = 2;
|
||||
string OperationID = 3;
|
||||
}
|
||||
|
||||
message GetConversationResp{
|
||||
CommonResp commonResp = 1;
|
||||
Conversation Conversation = 2;
|
||||
}
|
||||
|
||||
message GetConversationsReq{
|
||||
string OwnerUserID = 1;
|
||||
repeated string ConversationIDs = 2;
|
||||
string OperationID = 3;
|
||||
}
|
||||
|
||||
message GetConversationsResp{
|
||||
CommonResp commonResp = 1;
|
||||
repeated Conversation Conversations = 2;
|
||||
}
|
||||
|
||||
message GetAllConversationsReq{
|
||||
string OwnerUserID = 1;
|
||||
string OperationID = 2;
|
||||
}
|
||||
|
||||
message GetAllConversationsResp{
|
||||
CommonResp commonResp = 1;
|
||||
repeated Conversation Conversations = 2;
|
||||
}
|
||||
|
||||
message BatchSetConversationsReq{
|
||||
repeated Conversation Conversations = 1;
|
||||
string OwnerUserID = 2;
|
||||
int32 notificationType = 3;
|
||||
string OperationID = 4;
|
||||
}
|
||||
|
||||
message BatchSetConversationsResp{
|
||||
CommonResp commonResp = 1;
|
||||
repeated string Success = 2;
|
||||
repeated string Failed = 3;
|
||||
}
|
||||
|
||||
message ResignUserReq{
|
||||
string UserId = 1;
|
||||
string OperationID = 2;
|
||||
}
|
||||
|
||||
message ResignUserResp{
|
||||
CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
message GetUserByIdReq{
|
||||
string UserId = 1;
|
||||
string OperationID = 2;
|
||||
}
|
||||
|
||||
message User{
|
||||
string ProfilePhoto = 1;
|
||||
string Nickname = 2;
|
||||
string UserId = 3;
|
||||
string CreateTime = 4;
|
||||
bool IsBlock = 5;
|
||||
}
|
||||
|
||||
message GetUserByIdResp{
|
||||
CommonResp CommonResp = 1;
|
||||
User user = 2;
|
||||
}
|
||||
|
||||
message GetUsersByNameReq {
|
||||
string UserName = 1;
|
||||
server_api_params.RequestPagination Pagination = 2;
|
||||
string OperationID = 3;
|
||||
}
|
||||
|
||||
message GetUsersByNameResp {
|
||||
repeated User users = 1;
|
||||
server_api_params.ResponsePagination Pagination = 2;
|
||||
int32 UserNums = 3;
|
||||
}
|
||||
|
||||
message AlterUserReq{
|
||||
string UserId = 1;
|
||||
string OperationID = 2;
|
||||
int64 PhoneNumber = 3;
|
||||
string Nickname = 4;
|
||||
string Email = 5;
|
||||
string OpUserId = 6;
|
||||
}
|
||||
|
||||
message AlterUserResp{
|
||||
CommonResp CommonResp = 1;
|
||||
}
|
||||
|
||||
message GetUsersReq {
|
||||
string OperationID = 1;
|
||||
server_api_params.RequestPagination Pagination = 2;
|
||||
string UserName = 3;
|
||||
}
|
||||
|
||||
message GetUsersResp{
|
||||
CommonResp CommonResp = 1;
|
||||
repeated User user = 2;
|
||||
server_api_params.ResponsePagination Pagination = 3;
|
||||
int32 UserNums = 4;
|
||||
}
|
||||
|
||||
message AddUserReq{
|
||||
string OperationID = 1;
|
||||
string PhoneNumber = 2;
|
||||
string UserId = 3;
|
||||
string name = 4;
|
||||
string OpUserId = 5;
|
||||
}
|
||||
|
||||
message AddUserResp{
|
||||
CommonResp CommonResp = 1;
|
||||
}
|
||||
|
||||
|
||||
message BlockUserReq{
|
||||
string UserId = 1;
|
||||
string EndDisableTime = 2;
|
||||
string OperationID = 3;
|
||||
string OpUserId = 4;
|
||||
}
|
||||
|
||||
message BlockUserResp{
|
||||
CommonResp CommonResp = 1;
|
||||
}
|
||||
|
||||
message UnBlockUserReq{
|
||||
string UserId = 1;
|
||||
string OperationID = 2;
|
||||
string OpUserId = 3;
|
||||
}
|
||||
|
||||
message UnBlockUserResp{
|
||||
CommonResp CommonResp = 1;
|
||||
}
|
||||
|
||||
message GetBlockUsersReq{
|
||||
server_api_params.RequestPagination Pagination = 1;
|
||||
string OperationID = 2;
|
||||
int32 BlockUserNum = 3;
|
||||
}
|
||||
|
||||
message BlockUser {
|
||||
User User = 1;
|
||||
string BeginDisableTime = 2;
|
||||
string EndDisableTime = 3;
|
||||
}
|
||||
|
||||
message GetBlockUsersResp{
|
||||
CommonResp CommonResp = 1;
|
||||
repeated BlockUser BlockUsers = 2;
|
||||
server_api_params.ResponsePagination Pagination = 3;
|
||||
int32 UserNums = 4;
|
||||
}
|
||||
|
||||
message GetBlockUserByIdReq {
|
||||
string User_id = 1;
|
||||
string OperationID = 2;
|
||||
}
|
||||
|
||||
message GetBlockUserByIdResp {
|
||||
BlockUser BlockUser = 2;
|
||||
}
|
||||
|
||||
message DeleteUserReq {
|
||||
string User_id = 1;
|
||||
string OperationID = 2;
|
||||
string OpUserId = 3;
|
||||
}
|
||||
|
||||
message DeleteUserResp {
|
||||
CommonResp CommonResp = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
service user {
|
||||
rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp);
|
||||
rpc GetConversation(GetConversationReq)returns(GetConversationResp);
|
||||
rpc GetAllConversations(GetAllConversationsReq)returns(GetAllConversationsResp);
|
||||
rpc GetConversations(GetConversationsReq)returns(GetConversationsResp);
|
||||
rpc BatchSetConversations(BatchSetConversationsReq)returns(BatchSetConversationsResp);
|
||||
rpc SetConversation(SetConversationReq)returns(SetConversationResp);
|
||||
rpc SetRecvMsgOpt(SetRecvMsgOptReq)returns(SetRecvMsgOptResp);
|
||||
|
||||
|
||||
}
|
@ -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_group_3c77315b028a1402, []int{0}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{0}
|
||||
}
|
||||
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
|
||||
@ -82,7 +82,7 @@ func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} }
|
||||
func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupAddMemberInfo) ProtoMessage() {}
|
||||
func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{1}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{1}
|
||||
}
|
||||
func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b)
|
||||
@ -131,7 +131,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} }
|
||||
func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateGroupReq) ProtoMessage() {}
|
||||
func (*CreateGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{2}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{2}
|
||||
}
|
||||
func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b)
|
||||
@ -199,7 +199,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} }
|
||||
func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateGroupResp) ProtoMessage() {}
|
||||
func (*CreateGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{3}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{3}
|
||||
}
|
||||
func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b)
|
||||
@ -253,7 +253,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} }
|
||||
func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupsInfoReq) ProtoMessage() {}
|
||||
func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{4}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{4}
|
||||
}
|
||||
func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b)
|
||||
@ -307,7 +307,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} }
|
||||
func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupsInfoResp) ProtoMessage() {}
|
||||
func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{5}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{5}
|
||||
}
|
||||
func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b)
|
||||
@ -361,7 +361,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} }
|
||||
func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupInfoReq) ProtoMessage() {}
|
||||
func (*SetGroupInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{6}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{6}
|
||||
}
|
||||
func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b)
|
||||
@ -413,7 +413,7 @@ func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} }
|
||||
func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupInfoResp) ProtoMessage() {}
|
||||
func (*SetGroupInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{7}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{7}
|
||||
}
|
||||
func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b)
|
||||
@ -453,7 +453,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL
|
||||
func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupApplicationListReq) ProtoMessage() {}
|
||||
func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{8}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{8}
|
||||
}
|
||||
func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b)
|
||||
@ -507,7 +507,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication
|
||||
func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupApplicationListResp) ProtoMessage() {}
|
||||
func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{9}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{9}
|
||||
}
|
||||
func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b)
|
||||
@ -561,7 +561,7 @@ func (m *GetUserReqApplicationListReq) Reset() { *m = GetUserReqApplicat
|
||||
func (m *GetUserReqApplicationListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUserReqApplicationListReq) ProtoMessage() {}
|
||||
func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{10}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{10}
|
||||
}
|
||||
func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b)
|
||||
@ -614,7 +614,7 @@ func (m *GetUserReqApplicationListResp) Reset() { *m = GetUserReqApplica
|
||||
func (m *GetUserReqApplicationListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUserReqApplicationListResp) ProtoMessage() {}
|
||||
func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{11}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{11}
|
||||
}
|
||||
func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b)
|
||||
@ -663,7 +663,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} }
|
||||
func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*TransferGroupOwnerReq) ProtoMessage() {}
|
||||
func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{12}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{12}
|
||||
}
|
||||
func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b)
|
||||
@ -729,7 +729,7 @@ func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{}
|
||||
func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*TransferGroupOwnerResp) ProtoMessage() {}
|
||||
func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{13}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{13}
|
||||
}
|
||||
func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b)
|
||||
@ -770,7 +770,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} }
|
||||
func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinGroupReq) ProtoMessage() {}
|
||||
func (*JoinGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{14}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{14}
|
||||
}
|
||||
func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b)
|
||||
@ -829,7 +829,7 @@ func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} }
|
||||
func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinGroupResp) ProtoMessage() {}
|
||||
func (*JoinGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{15}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{15}
|
||||
}
|
||||
func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b)
|
||||
@ -872,7 +872,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes
|
||||
func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupApplicationResponseReq) ProtoMessage() {}
|
||||
func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{16}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{16}
|
||||
}
|
||||
func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b)
|
||||
@ -945,7 +945,7 @@ func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationRe
|
||||
func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupApplicationResponseResp) ProtoMessage() {}
|
||||
func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{17}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{17}
|
||||
}
|
||||
func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b)
|
||||
@ -985,7 +985,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} }
|
||||
func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuitGroupReq) ProtoMessage() {}
|
||||
func (*QuitGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{18}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{18}
|
||||
}
|
||||
func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b)
|
||||
@ -1037,7 +1037,7 @@ func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} }
|
||||
func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuitGroupResp) ProtoMessage() {}
|
||||
func (*QuitGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{19}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{19}
|
||||
}
|
||||
func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b)
|
||||
@ -1079,7 +1079,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} }
|
||||
func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMemberListReq) ProtoMessage() {}
|
||||
func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{20}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{20}
|
||||
}
|
||||
func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b)
|
||||
@ -1148,7 +1148,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{}
|
||||
func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMemberListResp) ProtoMessage() {}
|
||||
func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{21}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{21}
|
||||
}
|
||||
func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b)
|
||||
@ -1210,7 +1210,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{}
|
||||
func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMembersInfoReq) ProtoMessage() {}
|
||||
func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{22}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{22}
|
||||
}
|
||||
func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b)
|
||||
@ -1271,7 +1271,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp
|
||||
func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMembersInfoResp) ProtoMessage() {}
|
||||
func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{23}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{23}
|
||||
}
|
||||
func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b)
|
||||
@ -1327,7 +1327,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} }
|
||||
func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*KickGroupMemberReq) ProtoMessage() {}
|
||||
func (*KickGroupMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{24}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{24}
|
||||
}
|
||||
func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b)
|
||||
@ -1394,7 +1394,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} }
|
||||
func (m *Id2Result) String() string { return proto.CompactTextString(m) }
|
||||
func (*Id2Result) ProtoMessage() {}
|
||||
func (*Id2Result) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{25}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{25}
|
||||
}
|
||||
func (m *Id2Result) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Id2Result.Unmarshal(m, b)
|
||||
@ -1441,7 +1441,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} }
|
||||
func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*KickGroupMemberResp) ProtoMessage() {}
|
||||
func (*KickGroupMemberResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{26}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{26}
|
||||
}
|
||||
func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b)
|
||||
@ -1495,7 +1495,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} }
|
||||
func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetJoinedGroupListReq) ProtoMessage() {}
|
||||
func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{27}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{27}
|
||||
}
|
||||
func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b)
|
||||
@ -1549,7 +1549,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{}
|
||||
func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetJoinedGroupListResp) ProtoMessage() {}
|
||||
func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{28}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{28}
|
||||
}
|
||||
func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b)
|
||||
@ -1605,7 +1605,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} }
|
||||
func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*InviteUserToGroupReq) ProtoMessage() {}
|
||||
func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{29}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{29}
|
||||
}
|
||||
func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b)
|
||||
@ -1673,7 +1673,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} }
|
||||
func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*InviteUserToGroupResp) ProtoMessage() {}
|
||||
func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{30}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{30}
|
||||
}
|
||||
func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b)
|
||||
@ -1727,7 +1727,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} }
|
||||
func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupAllMemberReq) ProtoMessage() {}
|
||||
func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{31}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{31}
|
||||
}
|
||||
func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b)
|
||||
@ -1781,7 +1781,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} }
|
||||
func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupAllMemberResp) ProtoMessage() {}
|
||||
func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{32}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{32}
|
||||
}
|
||||
func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b)
|
||||
@ -1835,7 +1835,7 @@ func (m *CMSGroup) Reset() { *m = CMSGroup{} }
|
||||
func (m *CMSGroup) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMSGroup) ProtoMessage() {}
|
||||
func (*CMSGroup) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{33}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{33}
|
||||
}
|
||||
func (m *CMSGroup) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CMSGroup.Unmarshal(m, b)
|
||||
@ -1889,7 +1889,7 @@ func (m *GetGroupReq) Reset() { *m = GetGroupReq{} }
|
||||
func (m *GetGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupReq) ProtoMessage() {}
|
||||
func (*GetGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{34}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{34}
|
||||
}
|
||||
func (m *GetGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupReq.Unmarshal(m, b)
|
||||
@ -1943,7 +1943,7 @@ func (m *GetGroupResp) Reset() { *m = GetGroupResp{} }
|
||||
func (m *GetGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupResp) ProtoMessage() {}
|
||||
func (*GetGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{35}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{35}
|
||||
}
|
||||
func (m *GetGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupResp.Unmarshal(m, b)
|
||||
@ -1996,7 +1996,7 @@ func (m *GetGroupsReq) Reset() { *m = GetGroupsReq{} }
|
||||
func (m *GetGroupsReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupsReq) ProtoMessage() {}
|
||||
func (*GetGroupsReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{36}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{36}
|
||||
}
|
||||
func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b)
|
||||
@ -2043,7 +2043,7 @@ func (m *GetGroupsResp) Reset() { *m = GetGroupsResp{} }
|
||||
func (m *GetGroupsResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupsResp) ProtoMessage() {}
|
||||
func (*GetGroupsResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{37}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{37}
|
||||
}
|
||||
func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b)
|
||||
@ -2096,7 +2096,7 @@ func (m *GetGroupMemberReq) Reset() { *m = GetGroupMemberReq{} }
|
||||
func (m *GetGroupMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMemberReq) ProtoMessage() {}
|
||||
func (*GetGroupMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{38}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{38}
|
||||
}
|
||||
func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b)
|
||||
@ -2143,7 +2143,7 @@ func (m *OperateGroupStatusReq) Reset() { *m = OperateGroupStatusReq{} }
|
||||
func (m *OperateGroupStatusReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*OperateGroupStatusReq) ProtoMessage() {}
|
||||
func (*OperateGroupStatusReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{39}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{39}
|
||||
}
|
||||
func (m *OperateGroupStatusReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_OperateGroupStatusReq.Unmarshal(m, b)
|
||||
@ -2194,7 +2194,7 @@ func (m *OperateGroupStatusResp) Reset() { *m = OperateGroupStatusResp{}
|
||||
func (m *OperateGroupStatusResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*OperateGroupStatusResp) ProtoMessage() {}
|
||||
func (*OperateGroupStatusResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{40}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{40}
|
||||
}
|
||||
func (m *OperateGroupStatusResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_OperateGroupStatusResp.Unmarshal(m, b)
|
||||
@ -2228,7 +2228,7 @@ func (m *OperateUserRoleReq) Reset() { *m = OperateUserRoleReq{} }
|
||||
func (m *OperateUserRoleReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*OperateUserRoleReq) ProtoMessage() {}
|
||||
func (*OperateUserRoleReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{41}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{41}
|
||||
}
|
||||
func (m *OperateUserRoleReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_OperateUserRoleReq.Unmarshal(m, b)
|
||||
@ -2286,7 +2286,7 @@ func (m *OperateUserRoleResp) Reset() { *m = OperateUserRoleResp{} }
|
||||
func (m *OperateUserRoleResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*OperateUserRoleResp) ProtoMessage() {}
|
||||
func (*OperateUserRoleResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{42}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{42}
|
||||
}
|
||||
func (m *OperateUserRoleResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_OperateUserRoleResp.Unmarshal(m, b)
|
||||
@ -2318,7 +2318,7 @@ func (m *DeleteGroupReq) Reset() { *m = DeleteGroupReq{} }
|
||||
func (m *DeleteGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteGroupReq) ProtoMessage() {}
|
||||
func (*DeleteGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{43}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{43}
|
||||
}
|
||||
func (m *DeleteGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteGroupReq.Unmarshal(m, b)
|
||||
@ -2362,7 +2362,7 @@ func (m *DeleteGroupResp) Reset() { *m = DeleteGroupResp{} }
|
||||
func (m *DeleteGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteGroupResp) ProtoMessage() {}
|
||||
func (*DeleteGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{44}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{44}
|
||||
}
|
||||
func (m *DeleteGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteGroupResp.Unmarshal(m, b)
|
||||
@ -2394,7 +2394,7 @@ func (m *GetGroupByIdReq) Reset() { *m = GetGroupByIdReq{} }
|
||||
func (m *GetGroupByIdReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupByIdReq) ProtoMessage() {}
|
||||
func (*GetGroupByIdReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{45}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{45}
|
||||
}
|
||||
func (m *GetGroupByIdReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupByIdReq.Unmarshal(m, b)
|
||||
@ -2439,7 +2439,7 @@ func (m *GetGroupByIdResp) Reset() { *m = GetGroupByIdResp{} }
|
||||
func (m *GetGroupByIdResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupByIdResp) ProtoMessage() {}
|
||||
func (*GetGroupByIdResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{46}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{46}
|
||||
}
|
||||
func (m *GetGroupByIdResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupByIdResp.Unmarshal(m, b)
|
||||
@ -2480,7 +2480,7 @@ func (m *GetGroupMembersCMSReq) Reset() { *m = GetGroupMembersCMSReq{} }
|
||||
func (m *GetGroupMembersCMSReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMembersCMSReq) ProtoMessage() {}
|
||||
func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{47}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{47}
|
||||
}
|
||||
func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b)
|
||||
@ -2541,7 +2541,7 @@ func (m *GetGroupMembersCMSResp) Reset() { *m = GetGroupMembersCMSResp{}
|
||||
func (m *GetGroupMembersCMSResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMembersCMSResp) ProtoMessage() {}
|
||||
func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{48}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{48}
|
||||
}
|
||||
func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b)
|
||||
@ -2596,7 +2596,7 @@ func (m *RemoveGroupMembersCMSReq) Reset() { *m = RemoveGroupMembersCMSR
|
||||
func (m *RemoveGroupMembersCMSReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*RemoveGroupMembersCMSReq) ProtoMessage() {}
|
||||
func (*RemoveGroupMembersCMSReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{49}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{49}
|
||||
}
|
||||
func (m *RemoveGroupMembersCMSReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RemoveGroupMembersCMSReq.Unmarshal(m, b)
|
||||
@ -2656,7 +2656,7 @@ func (m *RemoveGroupMembersCMSResp) Reset() { *m = RemoveGroupMembersCMS
|
||||
func (m *RemoveGroupMembersCMSResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*RemoveGroupMembersCMSResp) ProtoMessage() {}
|
||||
func (*RemoveGroupMembersCMSResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{50}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{50}
|
||||
}
|
||||
func (m *RemoveGroupMembersCMSResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RemoveGroupMembersCMSResp.Unmarshal(m, b)
|
||||
@ -2704,7 +2704,7 @@ func (m *AddGroupMembersCMSReq) Reset() { *m = AddGroupMembersCMSReq{} }
|
||||
func (m *AddGroupMembersCMSReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddGroupMembersCMSReq) ProtoMessage() {}
|
||||
func (*AddGroupMembersCMSReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{51}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{51}
|
||||
}
|
||||
func (m *AddGroupMembersCMSReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AddGroupMembersCMSReq.Unmarshal(m, b)
|
||||
@ -2764,7 +2764,7 @@ func (m *AddGroupMembersCMSResp) Reset() { *m = AddGroupMembersCMSResp{}
|
||||
func (m *AddGroupMembersCMSResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddGroupMembersCMSResp) ProtoMessage() {}
|
||||
func (*AddGroupMembersCMSResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{52}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{52}
|
||||
}
|
||||
func (m *AddGroupMembersCMSResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AddGroupMembersCMSResp.Unmarshal(m, b)
|
||||
@ -2811,7 +2811,7 @@ func (m *DismissGroupReq) Reset() { *m = DismissGroupReq{} }
|
||||
func (m *DismissGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*DismissGroupReq) ProtoMessage() {}
|
||||
func (*DismissGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{53}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{53}
|
||||
}
|
||||
func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b)
|
||||
@ -2863,7 +2863,7 @@ func (m *DismissGroupResp) Reset() { *m = DismissGroupResp{} }
|
||||
func (m *DismissGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*DismissGroupResp) ProtoMessage() {}
|
||||
func (*DismissGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{54}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{54}
|
||||
}
|
||||
func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b)
|
||||
@ -2905,7 +2905,7 @@ func (m *MuteGroupMemberReq) Reset() { *m = MuteGroupMemberReq{} }
|
||||
func (m *MuteGroupMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*MuteGroupMemberReq) ProtoMessage() {}
|
||||
func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{55}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{55}
|
||||
}
|
||||
func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b)
|
||||
@ -2971,7 +2971,7 @@ func (m *MuteGroupMemberResp) Reset() { *m = MuteGroupMemberResp{} }
|
||||
func (m *MuteGroupMemberResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*MuteGroupMemberResp) ProtoMessage() {}
|
||||
func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{56}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{56}
|
||||
}
|
||||
func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b)
|
||||
@ -3012,7 +3012,7 @@ func (m *CancelMuteGroupMemberReq) Reset() { *m = CancelMuteGroupMemberR
|
||||
func (m *CancelMuteGroupMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*CancelMuteGroupMemberReq) ProtoMessage() {}
|
||||
func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{57}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{57}
|
||||
}
|
||||
func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b)
|
||||
@ -3071,7 +3071,7 @@ func (m *CancelMuteGroupMemberResp) Reset() { *m = CancelMuteGroupMember
|
||||
func (m *CancelMuteGroupMemberResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CancelMuteGroupMemberResp) ProtoMessage() {}
|
||||
func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{58}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{58}
|
||||
}
|
||||
func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b)
|
||||
@ -3111,7 +3111,7 @@ func (m *MuteGroupReq) Reset() { *m = MuteGroupReq{} }
|
||||
func (m *MuteGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*MuteGroupReq) ProtoMessage() {}
|
||||
func (*MuteGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{59}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{59}
|
||||
}
|
||||
func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b)
|
||||
@ -3163,7 +3163,7 @@ func (m *MuteGroupResp) Reset() { *m = MuteGroupResp{} }
|
||||
func (m *MuteGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*MuteGroupResp) ProtoMessage() {}
|
||||
func (*MuteGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{60}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{60}
|
||||
}
|
||||
func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b)
|
||||
@ -3203,7 +3203,7 @@ func (m *CancelMuteGroupReq) Reset() { *m = CancelMuteGroupReq{} }
|
||||
func (m *CancelMuteGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*CancelMuteGroupReq) ProtoMessage() {}
|
||||
func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{61}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{61}
|
||||
}
|
||||
func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b)
|
||||
@ -3255,7 +3255,7 @@ func (m *CancelMuteGroupResp) Reset() { *m = CancelMuteGroupResp{} }
|
||||
func (m *CancelMuteGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CancelMuteGroupResp) ProtoMessage() {}
|
||||
func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_3c77315b028a1402, []int{62}
|
||||
return fileDescriptor_group_95c16320d90511af, []int{62}
|
||||
}
|
||||
func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b)
|
||||
@ -3282,6 +3282,114 @@ func (m *CancelMuteGroupResp) GetCommonResp() *CommonResp {
|
||||
return nil
|
||||
}
|
||||
|
||||
type SetGroupMemberNicknameReq struct {
|
||||
GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"`
|
||||
Nickname string `protobuf:"bytes,2,opt,name=nickname" json:"nickname,omitempty"`
|
||||
OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"`
|
||||
OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"`
|
||||
UserID string `protobuf:"bytes,5,opt,name=userID" json:"userID,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SetGroupMemberNicknameReq) Reset() { *m = SetGroupMemberNicknameReq{} }
|
||||
func (m *SetGroupMemberNicknameReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupMemberNicknameReq) ProtoMessage() {}
|
||||
func (*SetGroupMemberNicknameReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_95c16320d90511af, []int{63}
|
||||
}
|
||||
func (m *SetGroupMemberNicknameReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupMemberNicknameReq.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SetGroupMemberNicknameReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SetGroupMemberNicknameReq.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *SetGroupMemberNicknameReq) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SetGroupMemberNicknameReq.Merge(dst, src)
|
||||
}
|
||||
func (m *SetGroupMemberNicknameReq) XXX_Size() int {
|
||||
return xxx_messageInfo_SetGroupMemberNicknameReq.Size(m)
|
||||
}
|
||||
func (m *SetGroupMemberNicknameReq) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SetGroupMemberNicknameReq.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SetGroupMemberNicknameReq proto.InternalMessageInfo
|
||||
|
||||
func (m *SetGroupMemberNicknameReq) GetGroupID() string {
|
||||
if m != nil {
|
||||
return m.GroupID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SetGroupMemberNicknameReq) GetNickname() string {
|
||||
if m != nil {
|
||||
return m.Nickname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SetGroupMemberNicknameReq) GetOpUserID() string {
|
||||
if m != nil {
|
||||
return m.OpUserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SetGroupMemberNicknameReq) GetOperationID() string {
|
||||
if m != nil {
|
||||
return m.OperationID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SetGroupMemberNicknameReq) GetUserID() string {
|
||||
if m != nil {
|
||||
return m.UserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SetGroupMemberNicknameResp struct {
|
||||
CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SetGroupMemberNicknameResp) Reset() { *m = SetGroupMemberNicknameResp{} }
|
||||
func (m *SetGroupMemberNicknameResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupMemberNicknameResp) ProtoMessage() {}
|
||||
func (*SetGroupMemberNicknameResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_95c16320d90511af, []int{64}
|
||||
}
|
||||
func (m *SetGroupMemberNicknameResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupMemberNicknameResp.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SetGroupMemberNicknameResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SetGroupMemberNicknameResp.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *SetGroupMemberNicknameResp) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SetGroupMemberNicknameResp.Merge(dst, src)
|
||||
}
|
||||
func (m *SetGroupMemberNicknameResp) XXX_Size() int {
|
||||
return xxx_messageInfo_SetGroupMemberNicknameResp.Size(m)
|
||||
}
|
||||
func (m *SetGroupMemberNicknameResp) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SetGroupMemberNicknameResp.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SetGroupMemberNicknameResp proto.InternalMessageInfo
|
||||
|
||||
func (m *SetGroupMemberNicknameResp) GetCommonResp() *CommonResp {
|
||||
if m != nil {
|
||||
return m.CommonResp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CommonResp)(nil), "group.CommonResp")
|
||||
proto.RegisterType((*GroupAddMemberInfo)(nil), "group.GroupAddMemberInfo")
|
||||
@ -3346,6 +3454,8 @@ func init() {
|
||||
proto.RegisterType((*MuteGroupResp)(nil), "group.MuteGroupResp")
|
||||
proto.RegisterType((*CancelMuteGroupReq)(nil), "group.CancelMuteGroupReq")
|
||||
proto.RegisterType((*CancelMuteGroupResp)(nil), "group.CancelMuteGroupResp")
|
||||
proto.RegisterType((*SetGroupMemberNicknameReq)(nil), "group.SetGroupMemberNicknameReq")
|
||||
proto.RegisterType((*SetGroupMemberNicknameResp)(nil), "group.SetGroupMemberNicknameResp")
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -3388,6 +3498,7 @@ type GroupClient interface {
|
||||
CancelMuteGroupMember(ctx context.Context, in *CancelMuteGroupMemberReq, opts ...grpc.CallOption) (*CancelMuteGroupMemberResp, error)
|
||||
MuteGroup(ctx context.Context, in *MuteGroupReq, opts ...grpc.CallOption) (*MuteGroupResp, error)
|
||||
CancelMuteGroup(ctx context.Context, in *CancelMuteGroupReq, opts ...grpc.CallOption) (*CancelMuteGroupResp, error)
|
||||
SetGroupMemberNickname(ctx context.Context, in *SetGroupMemberNicknameReq, opts ...grpc.CallOption) (*SetGroupMemberNicknameResp, error)
|
||||
}
|
||||
|
||||
type groupClient struct {
|
||||
@ -3659,6 +3770,15 @@ func (c *groupClient) CancelMuteGroup(ctx context.Context, in *CancelMuteGroupRe
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *groupClient) SetGroupMemberNickname(ctx context.Context, in *SetGroupMemberNicknameReq, opts ...grpc.CallOption) (*SetGroupMemberNicknameResp, error) {
|
||||
out := new(SetGroupMemberNicknameResp)
|
||||
err := grpc.Invoke(ctx, "/group.group/SetGroupMemberNickname", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for Group service
|
||||
|
||||
type GroupServer interface {
|
||||
@ -3691,6 +3811,7 @@ type GroupServer interface {
|
||||
CancelMuteGroupMember(context.Context, *CancelMuteGroupMemberReq) (*CancelMuteGroupMemberResp, error)
|
||||
MuteGroup(context.Context, *MuteGroupReq) (*MuteGroupResp, error)
|
||||
CancelMuteGroup(context.Context, *CancelMuteGroupReq) (*CancelMuteGroupResp, error)
|
||||
SetGroupMemberNickname(context.Context, *SetGroupMemberNicknameReq) (*SetGroupMemberNicknameResp, error)
|
||||
}
|
||||
|
||||
func RegisterGroupServer(s *grpc.Server, srv GroupServer) {
|
||||
@ -4219,6 +4340,24 @@ func _Group_CancelMuteGroup_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Group_SetGroupMemberNickname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetGroupMemberNicknameReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GroupServer).SetGroupMemberNickname(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/group.group/SetGroupMemberNickname",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServer).SetGroupMemberNickname(ctx, req.(*SetGroupMemberNicknameReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Group_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "group.group",
|
||||
HandlerType: (*GroupServer)(nil),
|
||||
@ -4339,143 +4478,151 @@ var _Group_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "CancelMuteGroup",
|
||||
Handler: _Group_CancelMuteGroup_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetGroupMemberNickname",
|
||||
Handler: _Group_SetGroupMemberNickname_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "group/group.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_3c77315b028a1402) }
|
||||
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_95c16320d90511af) }
|
||||
|
||||
var fileDescriptor_group_3c77315b028a1402 = []byte{
|
||||
// 2068 bytes of a gzipped FileDesc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x1e, 0x09, 0xc5, 0x74, 0x4d, 0xac, 0x4e,
|
||||
0x49, 0xf8, 0x4b, 0x68, 0x66, 0x14, 0xae, 0xb2, 0x05, 0x59, 0x05, 0xe7, 0xdf, 0x48, 0x41, 0x1c,
|
||||
0xc2, 0xea, 0x23, 0x12, 0xb1, 0x31, 0x65, 0x73, 0xe4, 0x22, 0x86, 0xcd, 0x19, 0x0e, 0xa4, 0xc1,
|
||||
0xeb, 0x8e, 0x4a, 0xd2, 0xcd, 0x32, 0x57, 0x6e, 0x96, 0xf9, 0xac, 0x59, 0xf0, 0xd7, 0x16, 0xac,
|
||||
0x69, 0x42, 0x2b, 0xe9, 0xbd, 0x07, 0x0d, 0xa9, 0x08, 0x43, 0x3a, 0xcf, 0x8e, 0x46, 0xb9, 0xee,
|
||||
0xd9, 0x25, 0xf8, 0xb7, 0x16, 0x34, 0x4f, 0x05, 0x96, 0x44, 0xff, 0x8c, 0x3d, 0xad, 0x37, 0x3b,
|
||||
0x30, 0xaa, 0xde, 0x73, 0x86, 0xe3, 0x50, 0x7a, 0x98, 0xf0, 0x21, 0xac, 0x66, 0xc1, 0xd0, 0x00,
|
||||
0x7d, 0x5f, 0x75, 0x50, 0x01, 0x67, 0x4d, 0x9c, 0xfe, 0x74, 0xc2, 0x51, 0x98, 0xf0, 0xaf, 0xc0,
|
||||
0x4e, 0xec, 0xfb, 0x20, 0x08, 0x46, 0xc3, 0x3e, 0xfb, 0x7e, 0xac, 0x6f, 0xac, 0x9e, 0x0a, 0xd1,
|
||||
0x2a, 0x87, 0x68, 0xd8, 0xd8, 0x5b, 0x00, 0x0f, 0x43, 0x7f, 0x9c, 0xd9, 0x5a, 0x85, 0x82, 0xff,
|
||||
0x64, 0xc1, 0x07, 0x85, 0xc2, 0x2b, 0x6d, 0xf3, 0x13, 0x58, 0x4d, 0xc2, 0xc1, 0x84, 0xd0, 0x48,
|
||||
0xd9, 0xe9, 0x8f, 0x8a, 0x76, 0x45, 0xb0, 0x3a, 0xb9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cf, 0xf7, 0x53, 0xa1, 0x20, 0x0c, 0x2b, 0x7c, 0xe4, 0x10,
|
||||
0x3a, 0x19, 0x45, 0xed, 0x05, 0x16, 0x2f, 0x32, 0x34, 0xfc, 0x0c, 0xb6, 0x8a, 0x55, 0xab, 0x66,
|
||||
0xae, 0x33, 0x58, 0x79, 0x36, 0x19, 0x46, 0x53, 0x6c, 0xfd, 0x6c, 0xd7, 0xe0, 0x1e, 0x34, 0x14,
|
||||
0x39, 0xd5, 0xb0, 0xbe, 0xb6, 0xa0, 0x95, 0x44, 0xdb, 0x34, 0xe5, 0x29, 0x47, 0x3d, 0x53, 0x28,
|
||||
0x8b, 0x03, 0xe4, 0xc3, 0xe1, 0x28, 0x22, 0x21, 0xdb, 0xd0, 0x9a, 0x23, 0x46, 0xb1, 0xbc, 0x63,
|
||||
0xf2, 0x8b, 0xe8, 0x94, 0x5c, 0xb0, 0x9d, 0xac, 0x39, 0xc9, 0x10, 0xff, 0xcd, 0x82, 0x0d, 0x13,
|
||||
0xc6, 0x4a, 0x97, 0xc1, 0x43, 0x80, 0x71, 0x9a, 0x0b, 0xf2, 0x6b, 0xe0, 0xd3, 0xa2, 0x70, 0xc7,
|
||||
0xa5, 0x3d, 0x9c, 0x8c, 0x46, 0xec, 0x36, 0x55, 0x56, 0xc6, 0x92, 0x3d, 0x01, 0x97, 0xeb, 0x91,
|
||||
0x0c, 0xf1, 0xef, 0x73, 0x70, 0x65, 0x62, 0x54, 0x1a, 0x04, 0x14, 0x58, 0x73, 0x2c, 0x63, 0x52,
|
||||
0xc5, 0xcd, 0x16, 0x04, 0xfe, 0x68, 0xc1, 0xa6, 0x11, 0xd2, 0xfb, 0x34, 0x21, 0xfe, 0xbb, 0x05,
|
||||
0xe8, 0xc9, 0xb0, 0x7f, 0xae, 0xf0, 0x95, 0x1b, 0xe9, 0xdb, 0xb0, 0x1a, 0xf3, 0x13, 0x97, 0x2b,
|
||||
0xae, 0x98, 0x2a, 0x47, 0x8f, 0xc1, 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0x1c, 0xbe, 0x36, 0x6c, 0x98, 0x84, 0xf1, 0xca, 0x0c, 0x89, 0x29, 0x56, 0x4e, 0xfb,
|
||||
0x23, 0x72, 0x25, 0x08, 0x16, 0xb6, 0xdc, 0x24, 0xac, 0xf0, 0x51, 0xb6, 0x15, 0x39, 0xaf, 0xb5,
|
||||
0x22, 0xa7, 0x48, 0xca, 0x5a, 0xb0, 0x9e, 0xc3, 0x41, 0x03, 0xfc, 0x14, 0xae, 0x1f, 0x90, 0x11,
|
||||
0x51, 0x5a, 0x98, 0xb3, 0x18, 0x7d, 0x0d, 0x9a, 0x99, 0xaf, 0xd1, 0x00, 0x77, 0xa1, 0x99, 0x6c,
|
||||
0xec, 0xde, 0x2f, 0x3b, 0xee, 0xac, 0x12, 0xee, 0xa7, 0x0d, 0x40, 0xfe, 0x39, 0x1a, 0xa0, 0xef,
|
||||
0xa4, 0x81, 0x52, 0x38, 0x51, 0xee, 0x2c, 0x4b, 0x06, 0xfc, 0xcf, 0x5c, 0x09, 0x42, 0xf7, 0xbb,
|
||||
0xa7, 0xe5, 0xb0, 0x6c, 0x58, 0x8a, 0x8d, 0xa6, 0x84, 0x4e, 0x39, 0xd6, 0x5c, 0x63, 0xfe, 0xed,
|
||||
0xf8, 0xb0, 0x61, 0xff, 0xfe, 0x9d, 0xcf, 0xf3, 0x19, 0x6e, 0x1a, 0xa0, 0x1f, 0xc3, 0x22, 0xbf,
|
||||
0x37, 0x12, 0x57, 0x9e, 0xf6, 0xba, 0x49, 0x96, 0xa1, 0x43, 0x83, 0x7f, 0x7f, 0xcb, 0xa8, 0x04,
|
||||
0xaf, 0x55, 0x0b, 0xb4, 0xb8, 0x05, 0xc0, 0x25, 0x28, 0xe1, 0x4f, 0xa1, 0xe0, 0xdf, 0x59, 0xd0,
|
||||
0x76, 0xc8, 0xd8, 0xbf, 0x24, 0x6f, 0x64, 0xfe, 0x36, 0x2c, 0x72, 0x27, 0xa0, 0x22, 0xff, 0x4e,
|
||||
0x86, 0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4d, 0x46, 0xf9, 0x6c, 0x39, 0x28, 0xa3,
|
||||
0xbc, 0x56, 0xd7, 0xc5, 0xaa, 0xe5, 0xcb, 0x91, 0x02, 0x77, 0x13, 0x79, 0x70, 0x81, 0xbb, 0xc9,
|
||||
0xd4, 0xf4, 0x05, 0xb4, 0x8c, 0xf9, 0x38, 0xfa, 0x48, 0xac, 0x2b, 0xaa, 0x1d, 0xec, 0xed, 0x72,
|
||||
0x06, 0x0e, 0x37, 0x9f, 0x10, 0x4b, 0xb8, 0xc6, 0xb4, 0x5d, 0xc2, 0x2d, 0xc8, 0xa4, 0xef, 0xc3,
|
||||
0x8a, 0x9a, 0xac, 0xca, 0xa3, 0xa8, 0x25, 0xcb, 0xf2, 0x28, 0xe6, 0x32, 0xdb, 0x23, 0x68, 0x6a,
|
||||
0xe9, 0x91, 0xdc, 0xca, 0x7c, 0x0a, 0x27, 0xb7, 0xd2, 0x94, 0x51, 0xbd, 0x80, 0x96, 0x31, 0xdd,
|
||||
0x92, 0x96, 0x2b, 0x4a, 0x0c, 0xa5, 0xe5, 0x8a, 0xb3, 0xb5, 0x7b, 0x50, 0x97, 0x64, 0x79, 0xf6,
|
||||
0xd5, 0xd4, 0x46, 0x9e, 0xfd, 0x6c, 0x06, 0x72, 0x04, 0x4d, 0xed, 0xa3, 0x52, 0xbb, 0x7c, 0x7a,
|
||||
0x24, 0xb5, 0x33, 0xe4, 0x32, 0x7b, 0xcd, 0x17, 0x8d, 0x1d, 0xfe, 0x77, 0xb1, 0xcf, 0xd9, 0xef,
|
||||
0x17, 0x0b, 0xec, 0xbf, 0x60, 0x9f, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x2b, 0x24, 0xa7,
|
||||
0x4a, 0x26, 0x00, 0x00,
|
||||
var fileDescriptor_group_95c16320d90511af = []byte{
|
||||
// 2138 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0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x2c, 0x1c, 0x85, 0x61, 0x87, 0xf6, 0x5b, 0x73, 0x3b, 0xd6,
|
||||
0x9d, 0x9a, 0x23, 0x20, 0xfc, 0x18, 0xd0, 0xa3, 0x98, 0xd7, 0x03, 0xd7, 0xed, 0x90, 0xd1, 0x67,
|
||||
0x24, 0x6c, 0x7b, 0xe7, 0x7e, 0x4c, 0xfd, 0x43, 0x4a, 0xc2, 0xf6, 0x21, 0xfb, 0x4c, 0xcd, 0x11,
|
||||
0x10, 0xda, 0x86, 0x9a, 0xe3, 0x0f, 0xc9, 0x53, 0x72, 0x45, 0x86, 0xec, 0x43, 0x55, 0x27, 0x45,
|
||||
0xe0, 0xff, 0x58, 0x70, 0xe3, 0x20, 0x24, 0xdd, 0x88, 0xb0, 0x4f, 0x3a, 0xe4, 0x12, 0x3d, 0x80,
|
||||
0x1b, 0x6d, 0x6f, 0x10, 0xf1, 0x4f, 0x3f, 0x1d, 0xd0, 0xa8, 0x65, 0xed, 0x54, 0xee, 0x2c, 0xdf,
|
||||
0xdd, 0xda, 0xe5, 0xea, 0xea, 0xbc, 0x9d, 0xdc, 0x06, 0xf4, 0x1d, 0xa8, 0x31, 0xaa, 0x78, 0x91,
|
||||
0xf1, 0x5c, 0xbe, 0xbb, 0xbd, 0x4b, 0x49, 0x78, 0x45, 0xc2, 0x97, 0xdd, 0x60, 0xf0, 0x32, 0xe8,
|
||||
0x86, 0xdd, 0x11, 0xdd, 0x95, 0x34, 0x4e, 0x4a, 0x8e, 0x76, 0x60, 0xf9, 0x34, 0x20, 0x61, 0x37,
|
||||
0x1a, 0xf8, 0x5e, 0xfb, 0xb0, 0x55, 0x61, 0xca, 0xa8, 0x28, 0x64, 0xc3, 0xd2, 0x69, 0x20, 0x74,
|
||||
0x9d, 0x67, 0xcb, 0x12, 0x66, 0xbb, 0x5f, 0x79, 0x24, 0x14, 0xcb, 0x55, 0xb1, 0x3b, 0x45, 0xe1,
|
||||
0xcf, 0xa1, 0x91, 0x51, 0x78, 0x9a, 0x23, 0xc8, 0x2a, 0x58, 0x79, 0x2d, 0x05, 0x71, 0x08, 0xab,
|
||||
0x8f, 0x48, 0xc4, 0x60, 0xca, 0xd6, 0xc8, 0x65, 0x2c, 0x36, 0x27, 0x38, 0x94, 0x06, 0xaf, 0x39,
|
||||
0x2a, 0x2a, 0x6f, 0x96, 0xb9, 0x72, 0xb3, 0x54, 0xb2, 0x66, 0xc1, 0x5f, 0x5a, 0xb0, 0x96, 0x63,
|
||||
0x3a, 0x95, 0xde, 0xfb, 0x50, 0x97, 0x8a, 0x30, 0x49, 0x2b, 0xcc, 0x35, 0xca, 0x75, 0xcf, 0x6e,
|
||||
0xc1, 0xbf, 0xb2, 0xa0, 0x71, 0x26, 0x64, 0x49, 0xf4, 0xcf, 0xd8, 0xd3, 0x7a, 0x3d, 0x87, 0x51,
|
||||
0xf5, 0x9e, 0x33, 0xb8, 0x43, 0xa9, 0x33, 0xe1, 0x23, 0x58, 0xcd, 0x0a, 0x43, 0x03, 0xf4, 0x6d,
|
||||
0x35, 0x40, 0x85, 0x38, 0x6b, 0xc2, 0xfb, 0xd3, 0x05, 0x47, 0x21, 0xc2, 0x3f, 0x07, 0x3b, 0xb1,
|
||||
0xef, 0x83, 0x20, 0x18, 0x0e, 0x7a, 0xec, 0xfb, 0xb1, 0xbe, 0xb1, 0x7a, 0xaa, 0x88, 0x56, 0xb9,
|
||||
0x88, 0x86, 0x83, 0xbd, 0x09, 0xf0, 0x30, 0xf4, 0x47, 0x99, 0xa3, 0x55, 0x30, 0xf8, 0x0f, 0x16,
|
||||
0xbc, 0x5f, 0xc8, 0x7c, 0xaa, 0x63, 0x7e, 0x02, 0xab, 0x49, 0x3a, 0x18, 0x13, 0x1a, 0x29, 0x27,
|
||||
0xfd, 0x61, 0xd1, 0xa9, 0x08, 0x52, 0x47, 0xdb, 0x88, 0x23, 0xd8, 0x7e, 0x44, 0xa2, 0x58, 0x56,
|
||||
0x87, 0x5c, 0x1a, 0x8c, 0x53, 0x94, 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9e, 0x74, 0x47, 0x49, 0xd9, 0x97, 0x47, 0xa3, 0xdb, 0xa2, 0x43, 0xe5, 0xa8, 0xb6, 0x2b,
|
||||
0x4c, 0x95, 0x45, 0xc6, 0xe9, 0x7d, 0x39, 0x31, 0x56, 0x7c, 0x28, 0xdb, 0x42, 0x36, 0xf6, 0x65,
|
||||
0x7e, 0x2c, 0x29, 0x02, 0x1d, 0x02, 0xfc, 0xa0, 0xdb, 0x1f, 0x78, 0xcc, 0xd4, 0x62, 0x9e, 0x71,
|
||||
0xdb, 0x20, 0xba, 0xa8, 0xee, 0x53, 0x5a, 0x47, 0xd9, 0x37, 0xc1, 0x11, 0x7e, 0x65, 0xc1, 0x4a,
|
||||
0x2a, 0x15, 0x0d, 0xd0, 0xb7, 0xa0, 0x96, 0x98, 0x8f, 0x8a, 0x29, 0x4c, 0x23, 0xa9, 0x4e, 0x04,
|
||||
0xde, 0x49, 0x29, 0xde, 0x90, 0x9c, 0xd2, 0x16, 0xe3, 0x11, 0x65, 0x52, 0x56, 0x9d, 0x14, 0x81,
|
||||
0xaf, 0x52, 0x11, 0x69, 0x6c, 0xb9, 0x2c, 0x4f, 0xeb, 0xcd, 0xd8, 0x46, 0x4f, 0x27, 0xf8, 0x4f,
|
||||
0x16, 0xd4, 0x15, 0xc6, 0xef, 0xca, 0x38, 0x36, 0x2c, 0x25, 0xb6, 0x10, 0xb6, 0x91, 0x30, 0x3e,
|
||||
0x4d, 0x67, 0x2c, 0x86, 0x70, 0x77, 0xb3, 0xe1, 0xee, 0x4e, 0xa0, 0xf3, 0x05, 0x34, 0x39, 0xc8,
|
||||
0x67, 0x55, 0x67, 0x51, 0x37, 0x1a, 0xd3, 0xf2, 0x8f, 0x6e, 0xc0, 0x02, 0x27, 0x4b, 0x6e, 0x52,
|
||||
0x0e, 0x4d, 0xe0, 0x7c, 0x2d, 0xd8, 0x30, 0x31, 0xe3, 0x9d, 0x19, 0x12, 0x4b, 0xac, 0x9d, 0xf6,
|
||||
0x87, 0xe4, 0x5a, 0x21, 0x58, 0xda, 0x72, 0x93, 0xb4, 0xc2, 0xa1, 0xec, 0x28, 0xb2, 0x92, 0x1b,
|
||||
0x45, 0x4e, 0x50, 0x94, 0x35, 0x61, 0x5d, 0x93, 0x83, 0x06, 0xf8, 0x29, 0xdc, 0x38, 0x24, 0x43,
|
||||
0xa2, 0x8c, 0x30, 0x67, 0x31, 0xfa, 0x1a, 0x34, 0x32, 0x5f, 0xa3, 0x01, 0xee, 0x40, 0x23, 0x39,
|
||||
0xd8, 0xfd, 0x9f, 0xb5, 0xdd, 0x59, 0x39, 0xdc, 0x4f, 0x07, 0x80, 0xfc, 0x73, 0x34, 0x40, 0xdf,
|
||||
0x48, 0x13, 0xa5, 0x08, 0x22, 0xcd, 0x97, 0x25, 0x01, 0xfe, 0x87, 0xd6, 0x82, 0xd0, 0x83, 0xce,
|
||||
0x59, 0xb9, 0x58, 0x36, 0x2c, 0xc5, 0x46, 0x53, 0x52, 0xa7, 0x84, 0x73, 0xa1, 0x51, 0x79, 0x33,
|
||||
0x31, 0x6c, 0x38, 0xbf, 0x7f, 0xe9, 0x75, 0x3e, 0x93, 0x9b, 0x06, 0xe8, 0xfb, 0xb0, 0xc8, 0xef,
|
||||
0x8d, 0x24, 0x94, 0x27, 0xbd, 0x6e, 0x92, 0x6d, 0xe8, 0xc8, 0x10, 0xdf, 0x5f, 0x33, 0x2a, 0xc1,
|
||||
0x7b, 0xd5, 0x02, 0x2d, 0x6e, 0x02, 0x70, 0x0e, 0x4a, 0xfa, 0x53, 0x30, 0xf8, 0xd7, 0x16, 0xb4,
|
||||
0x1c, 0x32, 0xf2, 0xaf, 0xc8, 0x6b, 0x99, 0xbf, 0x05, 0x8b, 0x3c, 0x08, 0xa8, 0xa8, 0xbf, 0x13,
|
||||
0xf0, 0xb5, 0xe6, 0xdd, 0x6e, 0x6e, 0xde, 0xed, 0xe2, 0x0e, 0x6c, 0x15, 0x48, 0xc3, 0x2f, 0x7e,
|
||||
0x3a, 0xee, 0xf5, 0x08, 0xa5, 0x62, 0xa2, 0x9c, 0x80, 0x71, 0x84, 0x9e, 0x77, 0x07, 0x43, 0xe2,
|
||||
0x0a, 0x69, 0x04, 0x84, 0xbf, 0xb4, 0xa0, 0xf9, 0xc0, 0x75, 0xdf, 0x86, 0x6a, 0xae, 0xae, 0x9a,
|
||||
0x5b, 0xaa, 0xda, 0x63, 0xd8, 0x30, 0x89, 0x32, 0x95, 0x5e, 0x03, 0x68, 0x1c, 0x0e, 0xe8, 0x68,
|
||||
0x40, 0xa9, 0xcc, 0x11, 0x36, 0x2c, 0xf9, 0xb9, 0x99, 0xac, 0x1f, 0x4c, 0x5c, 0xbd, 0xb7, 0x60,
|
||||
0xb1, 0x9f, 0xad, 0x6e, 0x05, 0x88, 0x8f, 0x60, 0x35, 0xcb, 0x8a, 0x8f, 0x19, 0x7a, 0x93, 0x8c,
|
||||
0x19, 0x52, 0x22, 0xfc, 0x17, 0x0b, 0x50, 0x67, 0x1c, 0x91, 0xdc, 0x75, 0xf2, 0x96, 0xa4, 0x8e,
|
||||
0x0d, 0x37, 0x56, 0x87, 0x46, 0x02, 0x42, 0x18, 0x56, 0x46, 0xe3, 0x88, 0xb8, 0x67, 0xa4, 0xe7,
|
||||
0x7b, 0x2e, 0x65, 0xdd, 0x5f, 0xdd, 0xc9, 0xe0, 0xf0, 0x31, 0xac, 0x6b, 0x92, 0x4e, 0xa7, 0xf4,
|
||||
0x2f, 0x2d, 0x68, 0x1d, 0x74, 0xbd, 0x1e, 0x19, 0xbe, 0x7b, 0xd5, 0xf1, 0x09, 0x6c, 0x15, 0xc8,
|
||||
0x32, 0x9d, 0x72, 0xe7, 0xb0, 0x22, 0xbf, 0xf4, 0x36, 0x1d, 0x70, 0x1f, 0xea, 0x0a, 0x9f, 0xe9,
|
||||
0x64, 0x1d, 0x02, 0xca, 0xe9, 0xfe, 0x36, 0x25, 0x3e, 0x86, 0x75, 0x8d, 0xdb, 0x74, 0x72, 0xff,
|
||||
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 0xd8, 0x6f, 0xbc, 0xa8, 0xef, 0xf2,
|
||||
0x3f, 0xe2, 0x7d, 0xca, 0x7e, 0x3f, 0x5b, 0x60, 0xff, 0xb2, 0xfb, 0xe4, 0x7f, 0x01, 0x00, 0x00,
|
||||
0xff, 0xff, 0x14, 0x45, 0xba, 0x3b, 0xa4, 0x27, 0x00, 0x00,
|
||||
}
|
||||
|
@ -380,6 +380,19 @@ message CancelMuteGroupResp{
|
||||
|
||||
|
||||
|
||||
message SetGroupMemberNicknameReq{
|
||||
string groupID = 1;
|
||||
string nickname = 2;
|
||||
string opUserID = 3;
|
||||
string operationID = 4;
|
||||
string userID = 5;
|
||||
}
|
||||
message SetGroupMemberNicknameResp{
|
||||
CommonResp CommonResp = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
service group{
|
||||
rpc createGroup(CreateGroupReq) returns(CreateGroupResp);
|
||||
@ -413,6 +426,9 @@ service group{
|
||||
rpc CancelMuteGroupMember(CancelMuteGroupMemberReq) returns(CancelMuteGroupMemberResp);
|
||||
rpc MuteGroup(MuteGroupReq) returns(MuteGroupResp);
|
||||
rpc CancelMuteGroup(CancelMuteGroupReq) returns(CancelMuteGroupResp);
|
||||
|
||||
rpc SetGroupMemberNickname(SetGroupMemberNicknameReq) returns (SetGroupMemberNicknameResp);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -106,6 +106,162 @@ message GetUserTagByIDResp {
|
||||
Tag tag = 2;
|
||||
}
|
||||
|
||||
/// WorkMoment
|
||||
|
||||
message LikeUser {
|
||||
string userID = 1;
|
||||
string userName = 2;
|
||||
}
|
||||
|
||||
message NotificationUser {
|
||||
string userID = 1;
|
||||
string userName = 2;
|
||||
}
|
||||
|
||||
message Comment {
|
||||
string userID = 1;
|
||||
string userName = 2;
|
||||
string faceURL = 3;
|
||||
string replyUserID = 4;
|
||||
string replyUserName = 5;
|
||||
string contentID = 6;
|
||||
string content = 7;
|
||||
int32 createTime = 8;
|
||||
}
|
||||
|
||||
message PermissionGroup {
|
||||
string groupName = 1;
|
||||
string groupID = 2;
|
||||
}
|
||||
|
||||
message WorkMomentUser {
|
||||
string userID = 1;
|
||||
string userName = 2;
|
||||
}
|
||||
|
||||
message WorkMoment {
|
||||
string workMomentID = 1;
|
||||
string userID = 2;
|
||||
string userName = 3;
|
||||
string faceURL = 4;
|
||||
string content = 5;
|
||||
repeated WorkMomentUser likeUserList = 6;
|
||||
repeated Comment comments = 7;
|
||||
int32 permission = 8;
|
||||
repeated WorkMomentUser permissionUserList = 9;
|
||||
repeated PermissionGroup permissionGroupList = 10;
|
||||
repeated WorkMomentUser atUserList = 11;
|
||||
int32 createTime = 12;
|
||||
}
|
||||
|
||||
message CreateOneWorkMomentReq {
|
||||
WorkMoment workMoment = 1;
|
||||
string operationID = 2;
|
||||
}
|
||||
|
||||
message CreateOneWorkMomentResp {
|
||||
CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
message DeleteOneWorkMomentReq {
|
||||
string workMomentID = 1;
|
||||
string userID = 2;
|
||||
string operationID = 3;
|
||||
}
|
||||
|
||||
message DeleteOneWorkMomentResp {
|
||||
CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
message LikeOneWorkMomentReq {
|
||||
string userID = 1;
|
||||
string WorkMomentID = 2;
|
||||
string operationID = 3;
|
||||
}
|
||||
|
||||
message LikeOneWorkMomentResp {
|
||||
CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
message CommentOneWorkMomentReq {
|
||||
string userID = 1;
|
||||
string workMomentID = 2;
|
||||
string replyUserID = 3;
|
||||
string content = 4;
|
||||
string operationID = 5;
|
||||
}
|
||||
|
||||
message CommentOneWorkMomentResp {
|
||||
CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
message GetWorkMomentByIDReq {
|
||||
string workMomentID = 1;
|
||||
string opUserID = 2;
|
||||
string operationID = 3;
|
||||
}
|
||||
|
||||
message GetWorkMomentByIDResp {
|
||||
CommonResp commonResp = 1;
|
||||
WorkMoment workMoment = 2;
|
||||
}
|
||||
|
||||
message ChangeWorkMomentPermissionReq {
|
||||
string workMomentID = 1;
|
||||
string opUserID = 2;
|
||||
int32 permission = 3;
|
||||
repeated string permissionUserIDList = 4;
|
||||
string operationID = 5;
|
||||
}
|
||||
|
||||
message ChangeWorkMomentPermissionResp {
|
||||
CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
message GetUserWorkMomentsReq {
|
||||
string userID = 1;
|
||||
server_api_params.RequestPagination Pagination = 2;
|
||||
string operationID = 3;
|
||||
}
|
||||
|
||||
message GetUserWorkMomentsResp {
|
||||
CommonResp commonResp = 1;
|
||||
repeated WorkMoment workMoments = 2;
|
||||
server_api_params.ResponsePagination Pagination = 3;
|
||||
}
|
||||
|
||||
message GetUserFriendWorkMomentsReq {
|
||||
string userID = 1;
|
||||
server_api_params.RequestPagination Pagination = 2;
|
||||
string operationID = 3;
|
||||
}
|
||||
|
||||
message GetUserFriendWorkMomentsResp {
|
||||
CommonResp commonResp = 1;
|
||||
repeated WorkMoment workMoments = 2;
|
||||
server_api_params.ResponsePagination Pagination = 3;
|
||||
}
|
||||
|
||||
message WorkMomentNotificationMsg {
|
||||
int32 notificationMsgType = 1;
|
||||
Comment comment = 2;
|
||||
string workMomentID = 3;
|
||||
string userID = 4;
|
||||
string userName = 5;
|
||||
string faceURL = 6;
|
||||
string workMomentContent = 7;
|
||||
}
|
||||
|
||||
message SetUserWorkMomentsLevelReq {
|
||||
string userID = 1;
|
||||
int32 level = 2;
|
||||
string operationID = 3;
|
||||
}
|
||||
|
||||
message SetUserWorkMomentsLevelResp {
|
||||
CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
service OfficeService {
|
||||
rpc GetUserTags(GetUserTagsReq) returns(GetUserTagsResp);
|
||||
rpc CreateTag(CreateTagReq) returns(CreateTagResp);
|
||||
@ -114,5 +270,17 @@ service OfficeService {
|
||||
rpc SendMsg2Tag(SendMsg2TagReq) returns(SendMsg2TagResp);
|
||||
rpc GetTagSendLogs(GetTagSendLogsReq) returns(GetTagSendLogsResp);
|
||||
rpc GetUserTagByID(GetUserTagByIDReq) returns(GetUserTagByIDResp);
|
||||
|
||||
rpc CreateOneWorkMoment(CreateOneWorkMomentReq) returns(CreateOneWorkMomentResp);
|
||||
rpc DeleteOneWorkMoment(DeleteOneWorkMomentReq) returns(DeleteOneWorkMomentResp);
|
||||
rpc LikeOneWorkMoment(LikeOneWorkMomentReq) returns(LikeOneWorkMomentResp);
|
||||
rpc CommentOneWorkMoment(CommentOneWorkMomentReq) returns(CommentOneWorkMomentResp);
|
||||
rpc GetWorkMomentByID(GetWorkMomentByIDReq) returns(GetWorkMomentByIDResp);
|
||||
rpc ChangeWorkMomentPermission(ChangeWorkMomentPermissionReq) returns(ChangeWorkMomentPermissionResp);
|
||||
/// user self
|
||||
rpc GetUserWorkMoments(GetUserWorkMomentsReq) returns(GetUserWorkMomentsResp);
|
||||
/// users friend
|
||||
rpc GetUserFriendWorkMoments(GetUserFriendWorkMomentsReq) returns(GetUserFriendWorkMomentsResp);
|
||||
rpc SetUserWorkMomentsLevel(SetUserWorkMomentsLevelReq) returns(SetUserWorkMomentsLevelResp);
|
||||
}
|
||||
|
||||
|
1780
pkg/proto/organization/organization.pb.go
Normal file
1780
pkg/proto/organization/organization.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
172
pkg/proto/organization/organization.proto
Normal file
172
pkg/proto/organization/organization.proto
Normal file
@ -0,0 +1,172 @@
|
||||
syntax = "proto3";
|
||||
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
|
||||
option go_package = "./organization;organization";
|
||||
package organization;
|
||||
|
||||
|
||||
message CreateDepartmentReq{
|
||||
server_api_params.Department departmentInfo = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
|
||||
message CreateDepartmentResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
server_api_params.Department departmentInfo = 3;
|
||||
}
|
||||
|
||||
message UpdateDepartmentReq{
|
||||
server_api_params.Department departmentInfo = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
|
||||
message UpdateDepartmentResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
}
|
||||
|
||||
|
||||
message GetSubDepartmentReq{
|
||||
string departmentID = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
|
||||
message GetSubDepartmentResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
repeated server_api_params.Department departmentList = 3;
|
||||
}
|
||||
|
||||
message DeleteDepartmentReq{
|
||||
string departmentID = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
|
||||
message DeleteDepartmentResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
}
|
||||
|
||||
|
||||
message CreateOrganizationUserReq{
|
||||
server_api_params.OrganizationUser organizationUser = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
|
||||
|
||||
message CreateOrganizationUserResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
}
|
||||
|
||||
|
||||
message UpdateOrganizationUserReq{
|
||||
server_api_params.OrganizationUser organizationUser = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
|
||||
|
||||
message UpdateOrganizationUserResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
message CreateDepartmentMemberReq{
|
||||
server_api_params.DepartmentMember departmentMember = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
message CreateDepartmentMemberResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
}
|
||||
|
||||
|
||||
message GetUserInDepartmentReq{
|
||||
string userID = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
message GetUserInDepartmentResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
server_api_params.UserInDepartment userInDepartment = 3;
|
||||
}
|
||||
|
||||
|
||||
message UpdateUserInDepartmentReq{
|
||||
server_api_params.DepartmentMember departmentMember = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
message UpdateUserInDepartmentResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
}
|
||||
|
||||
|
||||
message DeleteUserInDepartmentReq{
|
||||
string userID = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
string departmentID = 4;
|
||||
}
|
||||
message DeleteUserInDepartmentResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
}
|
||||
|
||||
message DeleteOrganizationUserReq{
|
||||
string userID = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
message DeleteOrganizationUserResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
}
|
||||
|
||||
|
||||
message GetDepartmentMemberReq{
|
||||
string departmentID = 1;
|
||||
string operationID = 2;
|
||||
string opUserID = 3;
|
||||
}
|
||||
|
||||
message GetDepartmentMemberResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
repeated server_api_params.UserDepartmentMember userDepartmentMemberList = 3;
|
||||
}
|
||||
|
||||
|
||||
service organization{
|
||||
rpc CreateDepartment(CreateDepartmentReq) returns(CreateDepartmentResp);
|
||||
rpc UpdateDepartment(UpdateDepartmentReq) returns(UpdateDepartmentResp);
|
||||
rpc GetSubDepartment(GetSubDepartmentReq) returns(GetSubDepartmentResp);
|
||||
rpc DeleteDepartment(DeleteDepartmentReq) returns(DeleteDepartmentResp);
|
||||
|
||||
rpc CreateOrganizationUser(CreateOrganizationUserReq) returns(CreateOrganizationUserResp);
|
||||
rpc UpdateOrganizationUser(UpdateOrganizationUserReq) returns(UpdateOrganizationUserResp);
|
||||
rpc DeleteOrganizationUser(DeleteOrganizationUserReq) returns(DeleteOrganizationUserResp);
|
||||
|
||||
|
||||
rpc CreateDepartmentMember(CreateDepartmentMemberReq) returns(CreateDepartmentMemberResp);
|
||||
rpc GetUserInDepartment(GetUserInDepartmentReq) returns(GetUserInDepartmentResp);
|
||||
rpc DeleteUserInDepartment(DeleteUserInDepartmentReq) returns(DeleteUserInDepartmentResp);
|
||||
rpc UpdateUserInDepartment(UpdateUserInDepartmentReq) returns(UpdateUserInDepartmentResp);
|
||||
rpc GetDepartmentMember(GetDepartmentMemberReq) returns(GetDepartmentMemberResp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -12,4 +12,5 @@ all_proto=(
|
||||
push/push.proto
|
||||
relay/relay.proto
|
||||
sdk_ws/ws.proto
|
||||
conversation/conversation.proto
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -105,8 +105,71 @@ message FriendRequest{
|
||||
string ex = 15;
|
||||
}
|
||||
|
||||
///////////////////////////////////base end/////////////////////////////////////
|
||||
///////////////////////////////////organization/////////////////////////////////////
|
||||
|
||||
message Department {
|
||||
string departmentID = 1;
|
||||
string faceURL = 2;
|
||||
string name = 3;
|
||||
string parentID = 4;
|
||||
int32 order = 5;
|
||||
int32 departmentType = 6;
|
||||
uint32 createTime = 7;
|
||||
uint32 subDepartmentNum = 8;
|
||||
uint32 memberNum = 9;
|
||||
string ex = 10;
|
||||
}
|
||||
|
||||
|
||||
|
||||
message OrganizationUser {
|
||||
string userID = 1;
|
||||
string nickname = 2;
|
||||
string englishName = 3;
|
||||
string faceURL = 4;
|
||||
int32 gender = 5;
|
||||
string mobile = 6;
|
||||
string telephone = 7;
|
||||
uint32 birth = 8;
|
||||
string email = 9;
|
||||
uint32 createTime = 10;
|
||||
string ex = 11;
|
||||
}
|
||||
|
||||
message DepartmentMember {
|
||||
string userID = 1;
|
||||
string departmentID = 2;
|
||||
int32 order = 3;
|
||||
string position = 4;
|
||||
int32 leader = 5;
|
||||
int32 status = 6;
|
||||
string ex = 7;
|
||||
}
|
||||
|
||||
|
||||
message UserDepartmentMember {
|
||||
OrganizationUser organizationUser = 1;
|
||||
DepartmentMember departmentMember = 2;
|
||||
}
|
||||
|
||||
|
||||
message UserInDepartment {
|
||||
OrganizationUser organizationUser = 1;
|
||||
repeated DepartmentMember departmentMemberList = 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////organization end//////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////base end/////////////////////////////////////
|
||||
|
||||
message PullMessageBySeqListResp {
|
||||
int32 errCode = 1;
|
||||
@ -147,9 +210,10 @@ message MsgData {
|
||||
uint32 seq = 14;
|
||||
int64 sendTime = 15;
|
||||
int64 createTime = 16;
|
||||
int32 status = 17;
|
||||
map<string, bool> options = 18;
|
||||
OfflinePushInfo offlinePushInfo = 19;
|
||||
repeated string atUserIDList = 17;
|
||||
int32 status = 18;
|
||||
map<string, bool> options = 19;
|
||||
OfflinePushInfo offlinePushInfo = 20;
|
||||
}
|
||||
|
||||
message OfflinePushInfo{
|
||||
@ -288,6 +352,19 @@ message GroupCancelMutedTips{
|
||||
int64 operationTime = 3;
|
||||
}
|
||||
|
||||
message GroupMemberInfoSetTips{
|
||||
GroupInfo group = 1;
|
||||
GroupMemberFullInfo opUser = 2;
|
||||
int64 operationTime = 3;
|
||||
GroupMemberFullInfo changedUser = 4;
|
||||
}
|
||||
|
||||
|
||||
message OrganizationChangedTips{
|
||||
UserInfo opUser = 2;
|
||||
int64 operationTime = 3;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////friend/////////////////////
|
||||
//message FriendInfo{
|
||||
|
@ -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_6133bd34462fbb1a, []int{0}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{1}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{2}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{3}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{4}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{5}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{6}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{6, 0}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{7}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{8}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{9}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []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_6133bd34462fbb1a, []int{10}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{10}
|
||||
}
|
||||
func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b)
|
||||
@ -612,7 +612,9 @@ type Conversation struct {
|
||||
IsPinned bool `protobuf:"varint,9,opt,name=IsPinned" json:"IsPinned,omitempty"`
|
||||
AttachedInfo string `protobuf:"bytes,10,opt,name=AttachedInfo" json:"AttachedInfo,omitempty"`
|
||||
IsPrivateChat bool `protobuf:"varint,11,opt,name=IsPrivateChat" json:"IsPrivateChat,omitempty"`
|
||||
Ex string `protobuf:"bytes,12,opt,name=Ex" json:"Ex,omitempty"`
|
||||
GroupAtType int32 `protobuf:"varint,12,opt,name=GroupAtType" json:"GroupAtType,omitempty"`
|
||||
IsNotInGroup bool `protobuf:"varint,13,opt,name=IsNotInGroup" json:"IsNotInGroup,omitempty"`
|
||||
Ex string `protobuf:"bytes,14,opt,name=Ex" json:"Ex,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -622,7 +624,7 @@ func (m *Conversation) Reset() { *m = Conversation{} }
|
||||
func (m *Conversation) String() string { return proto.CompactTextString(m) }
|
||||
func (*Conversation) ProtoMessage() {}
|
||||
func (*Conversation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{11}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{11}
|
||||
}
|
||||
func (m *Conversation) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Conversation.Unmarshal(m, b)
|
||||
@ -719,6 +721,20 @@ func (m *Conversation) GetIsPrivateChat() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *Conversation) GetGroupAtType() int32 {
|
||||
if m != nil {
|
||||
return m.GroupAtType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Conversation) GetIsNotInGroup() bool {
|
||||
if m != nil {
|
||||
return m.IsNotInGroup
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *Conversation) GetEx() string {
|
||||
if m != nil {
|
||||
return m.Ex
|
||||
@ -739,7 +755,7 @@ func (m *SetConversationReq) Reset() { *m = SetConversationReq{} }
|
||||
func (m *SetConversationReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetConversationReq) ProtoMessage() {}
|
||||
func (*SetConversationReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{12}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{12}
|
||||
}
|
||||
func (m *SetConversationReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetConversationReq.Unmarshal(m, b)
|
||||
@ -791,7 +807,7 @@ func (m *SetConversationResp) Reset() { *m = SetConversationResp{} }
|
||||
func (m *SetConversationResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetConversationResp) ProtoMessage() {}
|
||||
func (*SetConversationResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{13}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{13}
|
||||
}
|
||||
func (m *SetConversationResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetConversationResp.Unmarshal(m, b)
|
||||
@ -833,7 +849,7 @@ func (m *SetRecvMsgOptReq) Reset() { *m = SetRecvMsgOptReq{} }
|
||||
func (m *SetRecvMsgOptReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetRecvMsgOptReq) ProtoMessage() {}
|
||||
func (*SetRecvMsgOptReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{14}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{14}
|
||||
}
|
||||
func (m *SetRecvMsgOptReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetRecvMsgOptReq.Unmarshal(m, b)
|
||||
@ -899,7 +915,7 @@ func (m *SetRecvMsgOptResp) Reset() { *m = SetRecvMsgOptResp{} }
|
||||
func (m *SetRecvMsgOptResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetRecvMsgOptResp) ProtoMessage() {}
|
||||
func (*SetRecvMsgOptResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{15}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{15}
|
||||
}
|
||||
func (m *SetRecvMsgOptResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetRecvMsgOptResp.Unmarshal(m, b)
|
||||
@ -939,7 +955,7 @@ func (m *GetConversationReq) Reset() { *m = GetConversationReq{} }
|
||||
func (m *GetConversationReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetConversationReq) ProtoMessage() {}
|
||||
func (*GetConversationReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{16}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{16}
|
||||
}
|
||||
func (m *GetConversationReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetConversationReq.Unmarshal(m, b)
|
||||
@ -992,7 +1008,7 @@ func (m *GetConversationResp) Reset() { *m = GetConversationResp{} }
|
||||
func (m *GetConversationResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetConversationResp) ProtoMessage() {}
|
||||
func (*GetConversationResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{17}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{17}
|
||||
}
|
||||
func (m *GetConversationResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetConversationResp.Unmarshal(m, b)
|
||||
@ -1039,7 +1055,7 @@ func (m *GetConversationsReq) Reset() { *m = GetConversationsReq{} }
|
||||
func (m *GetConversationsReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetConversationsReq) ProtoMessage() {}
|
||||
func (*GetConversationsReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{18}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{18}
|
||||
}
|
||||
func (m *GetConversationsReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetConversationsReq.Unmarshal(m, b)
|
||||
@ -1092,7 +1108,7 @@ func (m *GetConversationsResp) Reset() { *m = GetConversationsResp{} }
|
||||
func (m *GetConversationsResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetConversationsResp) ProtoMessage() {}
|
||||
func (*GetConversationsResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{19}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{19}
|
||||
}
|
||||
func (m *GetConversationsResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetConversationsResp.Unmarshal(m, b)
|
||||
@ -1138,7 +1154,7 @@ func (m *GetAllConversationsReq) Reset() { *m = GetAllConversationsReq{}
|
||||
func (m *GetAllConversationsReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetAllConversationsReq) ProtoMessage() {}
|
||||
func (*GetAllConversationsReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{20}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{20}
|
||||
}
|
||||
func (m *GetAllConversationsReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetAllConversationsReq.Unmarshal(m, b)
|
||||
@ -1184,7 +1200,7 @@ func (m *GetAllConversationsResp) Reset() { *m = GetAllConversationsResp
|
||||
func (m *GetAllConversationsResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetAllConversationsResp) ProtoMessage() {}
|
||||
func (*GetAllConversationsResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{21}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{21}
|
||||
}
|
||||
func (m *GetAllConversationsResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetAllConversationsResp.Unmarshal(m, b)
|
||||
@ -1232,7 +1248,7 @@ func (m *BatchSetConversationsReq) Reset() { *m = BatchSetConversationsR
|
||||
func (m *BatchSetConversationsReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*BatchSetConversationsReq) ProtoMessage() {}
|
||||
func (*BatchSetConversationsReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{22}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{22}
|
||||
}
|
||||
func (m *BatchSetConversationsReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BatchSetConversationsReq.Unmarshal(m, b)
|
||||
@ -1293,7 +1309,7 @@ func (m *BatchSetConversationsResp) Reset() { *m = BatchSetConversations
|
||||
func (m *BatchSetConversationsResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*BatchSetConversationsResp) ProtoMessage() {}
|
||||
func (*BatchSetConversationsResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{23}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{23}
|
||||
}
|
||||
func (m *BatchSetConversationsResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BatchSetConversationsResp.Unmarshal(m, b)
|
||||
@ -1346,7 +1362,7 @@ func (m *ResignUserReq) Reset() { *m = ResignUserReq{} }
|
||||
func (m *ResignUserReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*ResignUserReq) ProtoMessage() {}
|
||||
func (*ResignUserReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{24}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{24}
|
||||
}
|
||||
func (m *ResignUserReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ResignUserReq.Unmarshal(m, b)
|
||||
@ -1391,7 +1407,7 @@ func (m *ResignUserResp) Reset() { *m = ResignUserResp{} }
|
||||
func (m *ResignUserResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*ResignUserResp) ProtoMessage() {}
|
||||
func (*ResignUserResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{25}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{25}
|
||||
}
|
||||
func (m *ResignUserResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ResignUserResp.Unmarshal(m, b)
|
||||
@ -1430,7 +1446,7 @@ func (m *GetUserByIdReq) Reset() { *m = GetUserByIdReq{} }
|
||||
func (m *GetUserByIdReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUserByIdReq) ProtoMessage() {}
|
||||
func (*GetUserByIdReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{26}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{26}
|
||||
}
|
||||
func (m *GetUserByIdReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUserByIdReq.Unmarshal(m, b)
|
||||
@ -1479,7 +1495,7 @@ func (m *User) Reset() { *m = User{} }
|
||||
func (m *User) String() string { return proto.CompactTextString(m) }
|
||||
func (*User) ProtoMessage() {}
|
||||
func (*User) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{27}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{27}
|
||||
}
|
||||
func (m *User) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_User.Unmarshal(m, b)
|
||||
@ -1546,7 +1562,7 @@ func (m *GetUserByIdResp) Reset() { *m = GetUserByIdResp{} }
|
||||
func (m *GetUserByIdResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUserByIdResp) ProtoMessage() {}
|
||||
func (*GetUserByIdResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{28}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{28}
|
||||
}
|
||||
func (m *GetUserByIdResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUserByIdResp.Unmarshal(m, b)
|
||||
@ -1593,7 +1609,7 @@ func (m *GetUsersByNameReq) Reset() { *m = GetUsersByNameReq{} }
|
||||
func (m *GetUsersByNameReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUsersByNameReq) ProtoMessage() {}
|
||||
func (*GetUsersByNameReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{29}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{29}
|
||||
}
|
||||
func (m *GetUsersByNameReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUsersByNameReq.Unmarshal(m, b)
|
||||
@ -1647,7 +1663,7 @@ func (m *GetUsersByNameResp) Reset() { *m = GetUsersByNameResp{} }
|
||||
func (m *GetUsersByNameResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUsersByNameResp) ProtoMessage() {}
|
||||
func (*GetUsersByNameResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{30}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{30}
|
||||
}
|
||||
func (m *GetUsersByNameResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUsersByNameResp.Unmarshal(m, b)
|
||||
@ -1704,7 +1720,7 @@ func (m *AlterUserReq) Reset() { *m = AlterUserReq{} }
|
||||
func (m *AlterUserReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*AlterUserReq) ProtoMessage() {}
|
||||
func (*AlterUserReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{31}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{31}
|
||||
}
|
||||
func (m *AlterUserReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AlterUserReq.Unmarshal(m, b)
|
||||
@ -1777,7 +1793,7 @@ func (m *AlterUserResp) Reset() { *m = AlterUserResp{} }
|
||||
func (m *AlterUserResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*AlterUserResp) ProtoMessage() {}
|
||||
func (*AlterUserResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{32}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{32}
|
||||
}
|
||||
func (m *AlterUserResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AlterUserResp.Unmarshal(m, b)
|
||||
@ -1817,7 +1833,7 @@ func (m *GetUsersReq) Reset() { *m = GetUsersReq{} }
|
||||
func (m *GetUsersReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUsersReq) ProtoMessage() {}
|
||||
func (*GetUsersReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{33}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{33}
|
||||
}
|
||||
func (m *GetUsersReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUsersReq.Unmarshal(m, b)
|
||||
@ -1872,7 +1888,7 @@ func (m *GetUsersResp) Reset() { *m = GetUsersResp{} }
|
||||
func (m *GetUsersResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUsersResp) ProtoMessage() {}
|
||||
func (*GetUsersResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{34}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{34}
|
||||
}
|
||||
func (m *GetUsersResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUsersResp.Unmarshal(m, b)
|
||||
@ -1935,7 +1951,7 @@ func (m *AddUserReq) Reset() { *m = AddUserReq{} }
|
||||
func (m *AddUserReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddUserReq) ProtoMessage() {}
|
||||
func (*AddUserReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{35}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{35}
|
||||
}
|
||||
func (m *AddUserReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AddUserReq.Unmarshal(m, b)
|
||||
@ -2001,7 +2017,7 @@ func (m *AddUserResp) Reset() { *m = AddUserResp{} }
|
||||
func (m *AddUserResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddUserResp) ProtoMessage() {}
|
||||
func (*AddUserResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{36}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{36}
|
||||
}
|
||||
func (m *AddUserResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AddUserResp.Unmarshal(m, b)
|
||||
@ -2042,7 +2058,7 @@ func (m *BlockUserReq) Reset() { *m = BlockUserReq{} }
|
||||
func (m *BlockUserReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockUserReq) ProtoMessage() {}
|
||||
func (*BlockUserReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{37}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{37}
|
||||
}
|
||||
func (m *BlockUserReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockUserReq.Unmarshal(m, b)
|
||||
@ -2101,7 +2117,7 @@ func (m *BlockUserResp) Reset() { *m = BlockUserResp{} }
|
||||
func (m *BlockUserResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockUserResp) ProtoMessage() {}
|
||||
func (*BlockUserResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{38}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{38}
|
||||
}
|
||||
func (m *BlockUserResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockUserResp.Unmarshal(m, b)
|
||||
@ -2141,7 +2157,7 @@ func (m *UnBlockUserReq) Reset() { *m = UnBlockUserReq{} }
|
||||
func (m *UnBlockUserReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*UnBlockUserReq) ProtoMessage() {}
|
||||
func (*UnBlockUserReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{39}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{39}
|
||||
}
|
||||
func (m *UnBlockUserReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UnBlockUserReq.Unmarshal(m, b)
|
||||
@ -2193,7 +2209,7 @@ func (m *UnBlockUserResp) Reset() { *m = UnBlockUserResp{} }
|
||||
func (m *UnBlockUserResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*UnBlockUserResp) ProtoMessage() {}
|
||||
func (*UnBlockUserResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{40}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{40}
|
||||
}
|
||||
func (m *UnBlockUserResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UnBlockUserResp.Unmarshal(m, b)
|
||||
@ -2233,7 +2249,7 @@ func (m *GetBlockUsersReq) Reset() { *m = GetBlockUsersReq{} }
|
||||
func (m *GetBlockUsersReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetBlockUsersReq) ProtoMessage() {}
|
||||
func (*GetBlockUsersReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{41}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{41}
|
||||
}
|
||||
func (m *GetBlockUsersReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetBlockUsersReq.Unmarshal(m, b)
|
||||
@ -2287,7 +2303,7 @@ func (m *BlockUser) Reset() { *m = BlockUser{} }
|
||||
func (m *BlockUser) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockUser) ProtoMessage() {}
|
||||
func (*BlockUser) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{42}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{42}
|
||||
}
|
||||
func (m *BlockUser) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockUser.Unmarshal(m, b)
|
||||
@ -2342,7 +2358,7 @@ func (m *GetBlockUsersResp) Reset() { *m = GetBlockUsersResp{} }
|
||||
func (m *GetBlockUsersResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetBlockUsersResp) ProtoMessage() {}
|
||||
func (*GetBlockUsersResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{43}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{43}
|
||||
}
|
||||
func (m *GetBlockUsersResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetBlockUsersResp.Unmarshal(m, b)
|
||||
@ -2402,7 +2418,7 @@ func (m *GetBlockUserByIdReq) Reset() { *m = GetBlockUserByIdReq{} }
|
||||
func (m *GetBlockUserByIdReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetBlockUserByIdReq) ProtoMessage() {}
|
||||
func (*GetBlockUserByIdReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{44}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{44}
|
||||
}
|
||||
func (m *GetBlockUserByIdReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetBlockUserByIdReq.Unmarshal(m, b)
|
||||
@ -2447,7 +2463,7 @@ func (m *GetBlockUserByIdResp) Reset() { *m = GetBlockUserByIdResp{} }
|
||||
func (m *GetBlockUserByIdResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetBlockUserByIdResp) ProtoMessage() {}
|
||||
func (*GetBlockUserByIdResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{45}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{45}
|
||||
}
|
||||
func (m *GetBlockUserByIdResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetBlockUserByIdResp.Unmarshal(m, b)
|
||||
@ -2487,7 +2503,7 @@ func (m *DeleteUserReq) Reset() { *m = DeleteUserReq{} }
|
||||
func (m *DeleteUserReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteUserReq) ProtoMessage() {}
|
||||
func (*DeleteUserReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{46}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{46}
|
||||
}
|
||||
func (m *DeleteUserReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteUserReq.Unmarshal(m, b)
|
||||
@ -2539,7 +2555,7 @@ func (m *DeleteUserResp) Reset() { *m = DeleteUserResp{} }
|
||||
func (m *DeleteUserResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteUserResp) ProtoMessage() {}
|
||||
func (*DeleteUserResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_6133bd34462fbb1a, []int{47}
|
||||
return fileDescriptor_user_e11c6a5241e13fcd, []int{47}
|
||||
}
|
||||
func (m *DeleteUserResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteUserResp.Unmarshal(m, b)
|
||||
@ -3383,123 +3399,125 @@ var _User_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "user/user.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_6133bd34462fbb1a) }
|
||||
func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_e11c6a5241e13fcd) }
|
||||
|
||||
var fileDescriptor_user_6133bd34462fbb1a = []byte{
|
||||
// 1835 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x5f, 0x6f, 0xdc, 0xc6,
|
||||
0x11, 0x07, 0xef, 0x8f, 0x25, 0xcd, 0xe9, 0x4e, 0xa7, 0x95, 0x2c, 0xd1, 0x6c, 0xab, 0xaa, 0x84,
|
||||
0xeb, 0x0a, 0x02, 0x2a, 0xb5, 0x6e, 0x51, 0x17, 0x2e, 0x5a, 0x5b, 0x77, 0x92, 0x85, 0x2b, 0x62,
|
||||
0xe9, 0xc0, 0xb3, 0x80, 0x20, 0x08, 0x20, 0xd0, 0x77, 0x2b, 0x89, 0xd0, 0x1d, 0x49, 0x73, 0x79,
|
||||
0xb2, 0x95, 0x17, 0x07, 0xf9, 0xf3, 0x12, 0xe4, 0x25, 0x40, 0x00, 0x3b, 0x79, 0xc8, 0xe7, 0xc8,
|
||||
0x7b, 0xf2, 0x94, 0x6f, 0x90, 0xa7, 0x7c, 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, 0xbf, 0x89, 0xe6, 0x30, 0x1b, 0x6a, 0xf7, 0x9b, 0x1b, 0xcc, 0x31, 0xa9,
|
||||
0xdc, 0x12, 0x4d, 0x5e, 0x87, 0xe6, 0x13, 0xdb, 0x19, 0xe2, 0x41, 0x16, 0xae, 0x2a, 0x37, 0xf7,
|
||||
0x61, 0x6e, 0x17, 0x87, 0x5b, 0xc3, 0x61, 0x24, 0xa3, 0xd6, 0x1a, 0x30, 0xed, 0xc5, 0x16, 0x68,
|
||||
0x91, 0x05, 0x9e, 0x60, 0x81, 0x27, 0x58, 0x10, 0x39, 0x4e, 0x14, 0x99, 0x03, 0x68, 0xca, 0x0a,
|
||||
0x0b, 0x99, 0xb0, 0x02, 0x90, 0x01, 0x2f, 0x48, 0xcc, 0x73, 0x98, 0xdb, 0xea, 0xf7, 0xbd, 0xb1,
|
||||
0x1b, 0xb6, 0x4f, 0x70, 0xff, 0x94, 0xc2, 0x5e, 0x83, 0x39, 0xf6, 0xb7, 0xb0, 0x4f, 0x63, 0xfb,
|
||||
0x54, 0xb1, 0x14, 0xa2, 0xd2, 0xe5, 0x21, 0x2a, 0x67, 0x43, 0xf4, 0x8b, 0x06, 0x4d, 0xf9, 0xdb,
|
||||
0x91, 0x85, 0xfd, 0x09, 0x2c, 0x4c, 0xd7, 0xa0, 0x5d, 0x00, 0x0b, 0x93, 0xf1, 0x30, 0x4c, 0x2c,
|
||||
0xac, 0xdd, 0xff, 0x4b, 0xb4, 0x43, 0xd5, 0xbe, 0xd1, 0x73, 0xdc, 0xe3, 0x21, 0xa3, 0x44, 0x2f,
|
||||
0xb4, 0xc3, 0x31, 0xb1, 0x84, 0xad, 0x46, 0x17, 0x9a, 0xea, 0x3c, 0xa5, 0xf6, 0x58, 0x0c, 0x20,
|
||||
0x1f, 0xa1, 0xbb, 0x50, 0xb7, 0x23, 0xe5, 0xd1, 0x42, 0x6e, 0xbe, 0x2c, 0x34, 0x5d, 0x68, 0xec,
|
||||
0xe2, 0x90, 0x39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|
||||
0x2d, 0xd7, 0x66, 0xc5, 0x7b, 0xa5, 0xac, 0xf7, 0xae, 0x8e, 0xef, 0x6b, 0x58, 0xd8, 0xbd, 0x89,
|
||||
0xf8, 0x66, 0xe8, 0x5a, 0x9a, 0x8c, 0xae, 0xe6, 0xa7, 0x5a, 0x06, 0x01, 0x99, 0x8c, 0x1a, 0xf4,
|
||||
0x90, 0x97, 0x1c, 0x42, 0x78, 0x73, 0xa0, 0x8a, 0x27, 0x70, 0xc3, 0x27, 0x1a, 0x2c, 0x66, 0x51,
|
||||
0x14, 0x72, 0xc4, 0xbf, 0xa1, 0x2e, 0xa9, 0xe1, 0xe7, 0x79, 0x9e, 0x27, 0xe4, 0x85, 0xe6, 0x87,
|
||||
0xb0, 0x14, 0xb5, 0x4b, 0x05, 0x9c, 0xa1, 0x98, 0x58, 0xca, 0x9a, 0xf8, 0xb9, 0x06, 0xcb, 0xb9,
|
||||
0xea, 0xdf, 0xb1, 0x95, 0x3f, 0x6a, 0xa0, 0xb7, 0xec, 0xb0, 0x7f, 0xd2, 0xcb, 0x89, 0x7a, 0x46,
|
||||
0xad, 0x36, 0xa1, 0xda, 0x09, 0x92, 0x21, 0xaf, 0x04, 0x94, 0x27, 0x2b, 0x01, 0x95, 0xbc, 0xc4,
|
||||
0xb9, 0x73, 0x81, 0x15, 0x85, 0xfc, 0xa9, 0xc3, 0x54, 0x6f, 0xdc, 0xef, 0x63, 0x12, 0x93, 0x38,
|
||||
0x1e, 0xd2, 0xe3, 0x30, 0xea, 0xd4, 0x59, 0x17, 0x33, 0x63, 0xf1, 0x91, 0xd9, 0x81, 0xba, 0x85,
|
||||
0x89, 0x73, 0xec, 0x52, 0xf3, 0xa8, 0xef, 0xe2, 0x73, 0x73, 0x10, 0x37, 0x7a, 0xd1, 0x68, 0x02,
|
||||
0x6a, 0xb4, 0xa0, 0x21, 0xaa, 0x2a, 0x54, 0xcb, 0xfe, 0x9f, 0x34, 0x8a, 0xad, 0xf3, 0xce, 0xe0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0x9d, 0x5c, 0xe1, 0x78, 0x6f, 0x1f, 0x67,
|
||||
0x41, 0xe6, 0x2e, 0x62, 0xe8, 0xf9, 0x13, 0xc4, 0x47, 0x0f, 0xd8, 0x6f, 0x19, 0xfc, 0x2e, 0x89,
|
||||
0x16, 0xa2, 0x75, 0xd2, 0x45, 0xd5, 0x58, 0xcc, 0x0a, 0x89, 0x8f, 0xfe, 0x09, 0x33, 0x49, 0x0f,
|
||||
0x8c, 0xf8, 0x85, 0x5f, 0x6c, 0xe7, 0x8d, 0x85, 0x8c, 0x8c, 0xf8, 0xe8, 0xef, 0x30, 0x1d, 0x83,
|
||||
0x40, 0xf3, 0x32, 0x28, 0xba, 0x07, 0xa9, 0x22, 0xe2, 0xa3, 0x0d, 0x98, 0xe2, 0x4d, 0x13, 0xe2,
|
||||
0xa5, 0x25, 0xed, 0xee, 0x8c, 0x79, 0x45, 0x12, 0x01, 0x4b, 0xcf, 0x40, 0xa4, 0x96, 0xcd, 0x14,
|
||||
0x98, 0xdc, 0x0c, 0x3c, 0x84, 0x9a, 0xd0, 0x1f, 0xc4, 0x81, 0x90, 0x5b, 0x93, 0x38, 0x10, 0x6a,
|
||||
0x23, 0xf1, 0x18, 0xea, 0xd2, 0x99, 0x87, 0xd2, 0xbc, 0x97, 0x5a, 0x05, 0x63, 0x39, 0x57, 0x9e,
|
||||
0x64, 0x8d, 0x74, 0x10, 0x08, 0x59, 0xa3, 0x1e, 0x39, 0x42, 0xd6, 0x64, 0xcf, 0x8e, 0x07, 0x00,
|
||||
0x69, 0xb5, 0x8a, 0x03, 0x2a, 0x1d, 0x0f, 0xc6, 0x62, 0x56, 0x48, 0xfc, 0x56, 0xfd, 0x83, 0xda,
|
||||
0x06, 0xfb, 0xd1, 0xf6, 0x3f, 0xf4, 0x9f, 0xe7, 0xb7, 0xd8, 0x2f, 0xb2, 0xff, 0xf8, 0x35, 0x00,
|
||||
0x00, 0xff, 0xff, 0x10, 0x04, 0x45, 0x5d, 0xcd, 0x1d, 0x00, 0x00,
|
||||
var fileDescriptor_user_e11c6a5241e13fcd = []byte{
|
||||
// 1857 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xdd, 0x4f, 0x24, 0x4b,
|
||||
0x15, 0x4f, 0xcf, 0xc7, 0x02, 0x67, 0x98, 0x61, 0x28, 0xb8, 0xd0, 0xb7, 0x55, 0xc4, 0xce, 0xf5,
|
||||
0x4a, 0x48, 0x04, 0x5d, 0x8d, 0x6b, 0xd6, 0xe8, 0x2e, 0x33, 0xb0, 0x64, 0x8c, 0x0b, 0x93, 0x9e,
|
||||
0x25, 0x31, 0xc6, 0x84, 0xf4, 0xce, 0x14, 0xd0, 0x61, 0xa6, 0xbb, 0xb7, 0xab, 0x87, 0x5d, 0x7c,
|
||||
0x59, 0xe3, 0xc7, 0x8b, 0xf1, 0xc5, 0xa7, 0x5d, 0x7d, 0xf0, 0xef, 0xf0, 0x5d, 0x9f, 0xfc, 0x0f,
|
||||
0xf4, 0xc5, 0x7f, 0xc5, 0xd4, 0x47, 0x77, 0x57, 0x55, 0x37, 0x30, 0xb7, 0x21, 0xfb, 0x02, 0x53,
|
||||
0xa7, 0xbe, 0x7e, 0xe7, 0x9c, 0xdf, 0x39, 0x75, 0xaa, 0x1a, 0x96, 0xa6, 0x04, 0x47, 0xbb, 0xf4,
|
||||
0xcf, 0x4e, 0x18, 0x05, 0x71, 0x80, 0x6a, 0xf4, 0xb7, 0xf5, 0xad, 0xe3, 0x10, 0xfb, 0xa7, 0xbd,
|
||||
0x97, 0xbb, 0xe1, 0xe5, 0xf9, 0x2e, 0xeb, 0xd8, 0x25, 0xa3, 0xcb, 0xd3, 0xb7, 0x64, 0xf7, 0x2d,
|
||||
0xe1, 0x03, 0xed, 0x9f, 0x01, 0x74, 0x83, 0xc9, 0x24, 0xf0, 0x1d, 0x4c, 0x42, 0x64, 0xc2, 0x1c,
|
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a8, 0x42, 0x8a, 0x96, 0x01, 0xdf,
|
||||
0x8b, 0x99, 0x19, 0x16, 0x39, 0x5a, 0x49, 0x44, 0xf7, 0xea, 0x91, 0xa3, 0x20, 0xee, 0xf9, 0x4c,
|
||||
0x6a, 0x36, 0xd9, 0x32, 0x8a, 0x0c, 0xb5, 0xa0, 0x72, 0xf0, 0xce, 0x6c, 0x31, 0x14, 0x95, 0x83,
|
||||
0x77, 0xf6, 0xdf, 0x0c, 0x40, 0x03, 0x1c, 0xcb, 0xd6, 0xa4, 0x94, 0xfd, 0x91, 0xea, 0x72, 0xc1,
|
||||
0x13, 0x94, 0xf0, 0x44, 0x1a, 0xac, 0x52, 0x63, 0x1b, 0xda, 0x7e, 0x10, 0x7b, 0x67, 0xde, 0x30,
|
||||
0x73, 0x58, 0x85, 0x3b, 0x4c, 0x97, 0xcf, 0x10, 0xd5, 0x87, 0xb0, 0x92, 0xc3, 0x56, 0x8a, 0xc2,
|
||||
0xff, 0x36, 0xa0, 0x3d, 0xc0, 0x71, 0xc6, 0x2c, 0xaa, 0xe3, 0x27, 0xa5, 0x71, 0xce, 0x2a, 0xb5,
|
||||
0xd9, 0xac, 0x52, 0xcf, 0x5b, 0xe5, 0x00, 0x96, 0x35, 0x5d, 0x4a, 0xd9, 0xe4, 0xb7, 0x06, 0xa0,
|
||||
0xc3, 0xbc, 0xe7, 0xf3, 0x3a, 0x1b, 0x85, 0x3a, 0x6b, 0xd6, 0xab, 0xe4, 0xad, 0x77, 0xb7, 0x7f,
|
||||
0xdf, 0xc3, 0xca, 0xe1, 0x43, 0xf8, 0x37, 0x47, 0xd7, 0xca, 0x6c, 0x74, 0xb5, 0x7f, 0x6f, 0xe4,
|
||||
0x10, 0x90, 0xd9, 0xa8, 0x41, 0x4b, 0x05, 0xc5, 0x20, 0x44, 0x94, 0x18, 0xba, 0x78, 0x06, 0x33,
|
||||
0xfc, 0xce, 0x80, 0xd5, 0x3c, 0x8a, 0x52, 0x86, 0xf8, 0x31, 0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 0x7b, 0x57, 0x92, 0x50, 0x6f, 0xf4, 0x48, 0x67,
|
||||
0x1c, 0x0c, 0x2f, 0x59, 0xf6, 0x9f, 0x77, 0x92, 0xa6, 0x3d, 0x4c, 0x8b, 0x5c, 0xae, 0x66, 0xc9,
|
||||
0x7b, 0x11, 0xbb, 0x06, 0x8b, 0x1c, 0x09, 0x7c, 0x2c, 0xb3, 0x3d, 0x93, 0xdb, 0x1f, 0x0c, 0x58,
|
||||
0x16, 0xbb, 0x90, 0xce, 0xf5, 0x91, 0x3b, 0xc1, 0xe2, 0x46, 0x47, 0x25, 0xb4, 0x99, 0xdc, 0xe8,
|
||||
0x92, 0x36, 0xda, 0x07, 0xe8, 0xbb, 0xe7, 0x9e, 0x2f, 0xe7, 0xde, 0x2f, 0x0a, 0x2a, 0x5c, 0x07,
|
||||
0xbf, 0x99, 0x62, 0x12, 0x67, 0x63, 0x1d, 0x69, 0xde, 0x0c, 0x79, 0xf2, 0xaf, 0xfc, 0xc4, 0x52,
|
||||
0x90, 0x91, 0x10, 0x6d, 0x42, 0x9d, 0x02, 0x4f, 0xc2, 0x55, 0xd6, 0x88, 0x77, 0xa0, 0x83, 0x02,
|
||||
0x80, 0xdf, 0x2e, 0x04, 0x48, 0xc2, 0xc0, 0x27, 0xf8, 0x06, 0x84, 0x89, 0x0d, 0xa6, 0x13, 0x22,
|
||||
0x62, 0x37, 0x6d, 0xdb, 0xff, 0x30, 0x60, 0x71, 0x6f, 0x1c, 0xf3, 0x78, 0xbf, 0x17, 0x01, 0xe9,
|
||||
0x88, 0xfe, 0x45, 0xe0, 0xe3, 0xa3, 0xe9, 0xe4, 0x35, 0x8e, 0xd8, 0x4e, 0x55, 0x47, 0x16, 0x29,
|
||||
0xac, 0xab, 0x69, 0xac, 0x5b, 0x85, 0xfa, 0xc1, 0xc4, 0xf5, 0xc6, 0xa2, 0x72, 0xe0, 0x0d, 0xe9,
|
||||
0x26, 0x31, 0x12, 0x55, 0x70, 0xda, 0xb6, 0xf7, 0xa0, 0x29, 0x21, 0x2f, 0xc3, 0x29, 0xfb, 0x2f,
|
||||
0x06, 0x34, 0x12, 0xcf, 0x24, 0x47, 0x86, 0xa4, 0xa4, 0x91, 0x57, 0xf2, 0x61, 0x38, 0x23, 0xb3,
|
||||
0xb2, 0xaa, 0xb2, 0xd2, 0xfe, 0xa7, 0x01, 0x8b, 0x19, 0xa6, 0x7b, 0x86, 0x4a, 0xb5, 0x28, 0x54,
|
||||
0x34, 0x5e, 0x55, 0x1f, 0x82, 0x57, 0x35, 0x8d, 0x57, 0x1f, 0x0d, 0x80, 0xbd, 0xd1, 0x28, 0x61,
|
||||
0xd5, 0xdd, 0x86, 0xd5, 0xd8, 0x23, 0xf8, 0x25, 0xb3, 0xe7, 0xa6, 0xbc, 0x84, 0xa0, 0x26, 0x31,
|
||||
0x8a, 0xfd, 0x56, 0x78, 0x53, 0xd7, 0x78, 0xf3, 0x0c, 0x1a, 0x29, 0xb2, 0x52, 0xac, 0xf9, 0xb3,
|
||||
0x01, 0x8b, 0x2c, 0xb1, 0xdd, 0x15, 0x33, 0x5f, 0x42, 0xeb, 0xc0, 0x1f, 0xed, 0x7b, 0xc4, 0x7d,
|
||||
0x3d, 0xe6, 0x59, 0x53, 0xd4, 0xe1, 0xaa, 0xf4, 0xee, 0x14, 0xa2, 0xe8, 0x53, 0xcb, 0xc7, 0x81,
|
||||
0x84, 0xa6, 0x94, 0x46, 0x67, 0xd0, 0x3a, 0xf1, 0x67, 0x52, 0xe9, 0xee, 0x34, 0x20, 0x43, 0xad,
|
||||
0x6a, 0x50, 0xbb, 0xb0, 0xa4, 0xec, 0x53, 0x0a, 0xec, 0xdf, 0x0d, 0xf6, 0xce, 0x96, 0x2e, 0xc3,
|
||||
0x22, 0x57, 0x8d, 0x4b, 0xe3, 0x61, 0x72, 0x79, 0x81, 0x76, 0xb6, 0xe4, 0xfa, 0xa3, 0xe9, 0x44,
|
||||
0xe4, 0x53, 0x45, 0x66, 0xbf, 0x87, 0x85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48, 0xcc, 0xa7, 0xcb, 0xcf, 0xcd, 0xc9, 0x74, 0xed, 0x71, 0x3d, 0x99, 0x9e,
|
||||
0x7b, 0xf7, 0x7e, 0xc1, 0x8a, 0x5a, 0xe5, 0x15, 0xc9, 0x4c, 0x77, 0xd2, 0x5e, 0x27, 0xac, 0xcf,
|
||||
0x6f, 0xe8, 0x21, 0x21, 0x72, 0x18, 0xa1, 0xf5, 0x1b, 0x26, 0xfa, 0xba, 0x8c, 0x5a, 0xbf, 0xf2,
|
||||
0x59, 0xdf, 0xb8, 0xa5, 0x97, 0x84, 0xa8, 0xc7, 0x32, 0xa4, 0xba, 0x60, 0x31, 0x04, 0xb6, 0x9a,
|
||||
0x75, 0x53, 0x17, 0x09, 0xd1, 0x2f, 0xe1, 0xb3, 0xc2, 0x2b, 0x1b, 0xda, 0x10, 0xb1, 0x70, 0xc3,
|
||||
0xad, 0xd4, 0xfa, 0xe6, 0xad, 0xfd, 0xdc, 0x80, 0x83, 0x62, 0x03, 0x0e, 0x6e, 0x34, 0x60, 0xd1,
|
||||
0xb3, 0xda, 0x73, 0x68, 0x2a, 0xef, 0x4a, 0x68, 0x2d, 0x1d, 0xab, 0x3c, 0x9c, 0x59, 0xeb, 0x85,
|
||||
0x72, 0x4e, 0x42, 0xe9, 0x7e, 0xa2, 0x45, 0x81, 0xc8, 0x30, 0x5a, 0x14, 0xa4, 0x59, 0xa2, 0x9b,
|
||||
0x5e, 0xe1, 0x44, 0x6d, 0x9f, 0x44, 0x41, 0xee, 0x2e, 0x62, 0x99, 0xc5, 0x1d, 0x24, 0x44, 0x4f,
|
||||
0xd8, 0x17, 0x11, 0x71, 0x97, 0x44, 0x2b, 0x7c, 0x9c, 0x72, 0x51, 0xb5, 0x56, 0xf3, 0x42, 0x12,
|
||||
0xa2, 0x1f, 0xc2, 0x42, 0x5a, 0x03, 0x23, 0x71, 0xe1, 0x97, 0xcb, 0x79, 0x6b, 0x25, 0x27, 0x23,
|
||||
0x21, 0xfa, 0x3e, 0xcc, 0x27, 0x20, 0xd0, 0xb2, 0x0a, 0x8a, 0xce, 0x41, 0xba, 0x88, 0x84, 0x68,
|
||||
0x07, 0xe6, 0x44, 0xd1, 0x84, 0x44, 0x6a, 0xc9, 0xaa, 0x3b, 0x6b, 0x59, 0x93, 0x70, 0x60, 0xd9,
|
||||
0x19, 0x88, 0xf4, 0xb4, 0x99, 0x01, 0x53, 0x8b, 0x81, 0xa7, 0xd0, 0x90, 0xea, 0x83, 0xc4, 0x11,
|
||||
0x6a, 0x69, 0x92, 0x38, 0x42, 0x2f, 0x24, 0x9e, 0x43, 0x53, 0x39, 0xf3, 0x50, 0x16, 0xf7, 0x4a,
|
||||
0xa9, 0x60, 0xad, 0x17, 0xca, 0xd3, 0xa8, 0x51, 0x0e, 0x02, 0x29, 0x6a, 0xf4, 0x23, 0x47, 0x8a,
|
||||
0x9a, 0xfc, 0xd9, 0xf1, 0x04, 0x20, 0xcb, 0x56, 0x89, 0x43, 0x95, 0xe3, 0xc1, 0x5a, 0xcd, 0x0b,
|
||||
0x49, 0xd8, 0x69, 0xfe, 0xaa, 0xb1, 0xc3, 0x3e, 0xfd, 0xfe, 0x84, 0xfe, 0x79, 0xfd, 0x88, 0x7d,
|
||||
0xd7, 0xfd, 0xc1, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x34, 0x9a, 0x78, 0xde, 0x13, 0x1e, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
@ -79,7 +79,9 @@ message Conversation{
|
||||
bool IsPinned = 9;
|
||||
string AttachedInfo = 10;
|
||||
bool IsPrivateChat = 11;
|
||||
string Ex = 12;
|
||||
int32 GroupAtType = 12;
|
||||
bool IsNotInGroup = 13;
|
||||
string Ex = 14;
|
||||
}
|
||||
|
||||
message SetConversationReq{
|
||||
@ -144,9 +146,9 @@ message BatchSetConversationsReq{
|
||||
}
|
||||
|
||||
message BatchSetConversationsResp{
|
||||
CommonResp commonResp = 1;
|
||||
repeated string Success = 2;
|
||||
repeated string Failed = 3;
|
||||
CommonResp commonResp = 1;
|
||||
repeated string Success = 2;
|
||||
repeated string Failed = 3;
|
||||
}
|
||||
|
||||
message ResignUserReq{
|
||||
@ -177,9 +179,9 @@ message GetUserByIdResp{
|
||||
}
|
||||
|
||||
message GetUsersByNameReq {
|
||||
string UserName = 1;
|
||||
server_api_params.RequestPagination Pagination =2;
|
||||
string OperationID = 3;
|
||||
string UserName = 1;
|
||||
server_api_params.RequestPagination Pagination = 2;
|
||||
string OperationID = 3;
|
||||
}
|
||||
|
||||
message GetUsersByNameResp {
|
||||
@ -223,7 +225,7 @@ message AddUserReq{
|
||||
}
|
||||
|
||||
message AddUserResp{
|
||||
CommonResp CommonResp = 1;
|
||||
CommonResp CommonResp = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -235,7 +237,7 @@ message BlockUserReq{
|
||||
}
|
||||
|
||||
message BlockUserResp{
|
||||
CommonResp CommonResp = 1;
|
||||
CommonResp CommonResp = 1;
|
||||
}
|
||||
|
||||
message UnBlockUserReq{
|
||||
@ -245,19 +247,19 @@ message UnBlockUserReq{
|
||||
}
|
||||
|
||||
message UnBlockUserResp{
|
||||
CommonResp CommonResp = 1;
|
||||
CommonResp CommonResp = 1;
|
||||
}
|
||||
|
||||
message GetBlockUsersReq{
|
||||
server_api_params.RequestPagination Pagination =1;
|
||||
server_api_params.RequestPagination Pagination = 1;
|
||||
string OperationID = 2;
|
||||
int32 BlockUserNum = 3;
|
||||
}
|
||||
|
||||
message BlockUser {
|
||||
User User = 1;
|
||||
string BeginDisableTime = 2;
|
||||
string EndDisableTime = 3;
|
||||
User User = 1;
|
||||
string BeginDisableTime = 2;
|
||||
string EndDisableTime = 3;
|
||||
}
|
||||
|
||||
message GetBlockUsersResp{
|
||||
@ -268,22 +270,22 @@ message GetBlockUsersResp{
|
||||
}
|
||||
|
||||
message GetBlockUserByIdReq {
|
||||
string User_id = 1;
|
||||
string OperationID = 2;
|
||||
string User_id = 1;
|
||||
string OperationID = 2;
|
||||
}
|
||||
|
||||
message GetBlockUserByIdResp {
|
||||
BlockUser BlockUser = 2;
|
||||
BlockUser BlockUser = 2;
|
||||
}
|
||||
|
||||
message DeleteUserReq {
|
||||
string User_id = 1;
|
||||
string OperationID = 2;
|
||||
string OpUserId = 3;
|
||||
string User_id = 1;
|
||||
string OperationID = 2;
|
||||
string OpUserId = 3;
|
||||
}
|
||||
|
||||
message DeleteUserResp {
|
||||
CommonResp CommonResp = 1;
|
||||
CommonResp CommonResp = 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,6 +43,14 @@ func IsContain(target string, List []string) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
func IsContainInt32(target int32, List []int32) bool {
|
||||
for _, element := range List {
|
||||
if target == element {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func InterfaceArrayToStringArray(data []interface{}) (i []string) {
|
||||
for _, param := range data {
|
||||
@ -77,6 +85,8 @@ func GetConversationIDBySessionType(sourceID string, sessionType int) string {
|
||||
return "single_" + sourceID
|
||||
case constant.GroupChatType:
|
||||
return "group_" + sourceID
|
||||
case constant.NotificationChatType:
|
||||
return "notification_" + sourceID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -77,6 +77,44 @@ func Difference(slice1, slice2 []uint32) []uint32 {
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
//Get the intersection of two slices
|
||||
func IntersectString(slice1, slice2 []string) []string {
|
||||
m := make(map[string]bool)
|
||||
n := make([]string, 0)
|
||||
for _, v := range slice1 {
|
||||
m[v] = true
|
||||
}
|
||||
for _, v := range slice2 {
|
||||
flag, _ := m[v]
|
||||
if flag {
|
||||
n = append(n, v)
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
//Get the diff of two slices
|
||||
func DifferenceString(slice1, slice2 []string) []string {
|
||||
m := make(map[string]bool)
|
||||
n := make([]string, 0)
|
||||
inter := IntersectString(slice1, slice2)
|
||||
for _, v := range inter {
|
||||
m[v] = true
|
||||
}
|
||||
for _, v := range slice1 {
|
||||
if !m[v] {
|
||||
n = append(n, v)
|
||||
}
|
||||
}
|
||||
|
||||
for _, v := range slice2 {
|
||||
if !m[v] {
|
||||
n = append(n, v)
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
func OperationIDGenerator() string {
|
||||
return strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10)
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ service_port_name=(
|
||||
openImMessageCmsPort
|
||||
openImStatisticsPort
|
||||
openImOfficePort
|
||||
openImOrganizationPort
|
||||
)
|
||||
switch=$(cat $config_path | grep demoswitch |awk -F '[:]' '{print $NF}')
|
||||
for i in ${service_port_name[*]}; do
|
||||
|
@ -48,7 +48,8 @@ service_source_root=(
|
||||
../cmd/rpc/open_im_admin_cms/
|
||||
../cmd/rpc/open_im_message_cms/
|
||||
../cmd/rpc/open_im_statistics/
|
||||
../cmd/rpc/open_im_office/
|
||||
../cmd/rpc/open_im_office/
|
||||
../cmd/rpc/open_im_organization/
|
||||
${msg_gateway_source_root}
|
||||
${msg_transfer_source_root}
|
||||
${msg_source_root}
|
||||
@ -70,6 +71,7 @@ service_names=(
|
||||
open_im_message_cms
|
||||
open_im_statistics
|
||||
open_im_office
|
||||
open_im_organization
|
||||
${msg_gateway_name}
|
||||
${msg_transfer_name}
|
||||
${msg_name}
|
||||
|
@ -19,6 +19,7 @@ service_filename=(
|
||||
open_im_statistics
|
||||
${msg_name}
|
||||
open_im_office
|
||||
open_im_organization
|
||||
)
|
||||
|
||||
#service config port name
|
||||
@ -36,6 +37,7 @@ service_port_name=(
|
||||
openImStatisticsPort
|
||||
openImOfflineMessagePort
|
||||
openImOfficePort
|
||||
openImOrganizationPort
|
||||
)
|
||||
|
||||
for ((i = 0; i < ${#service_filename[*]}; i++)); do
|
||||
@ -64,4 +66,4 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do
|
||||
pid="netstat -ntlp|grep $j |awk '{printf \$7}'|cut -d/ -f1"
|
||||
echo -e "${GREEN_PREFIX}${service_filename[$i]} start success,port number:$j pid:$(eval $pid)$COLOR_SUFFIX"
|
||||
done
|
||||
done
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user