mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-13 07:09:01 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
commit
5ca36ebc10
@ -1,13 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_api
|
||||
NAME=open_im_api
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -16,10 +27,8 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
@ -1,13 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_cmd_utils
|
||||
NAME=open_im_cmd_utils
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -16,10 +27,8 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
@ -1,12 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_cron_task
|
||||
NAME=open_im_cron_task
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -15,8 +27,7 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
|
@ -1,12 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_msg_gateway
|
||||
NAME=open_im_msg_gateway
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -15,8 +27,7 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
|
@ -1,13 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_msg_transfer
|
||||
NAME=open_im_msg_transfer
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -16,10 +27,8 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
@ -1,12 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_push
|
||||
NAME=open_im_push
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -15,11 +27,8 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
||||
|
@ -1,12 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_auth
|
||||
NAME=open_im_auth
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -15,10 +27,8 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
@ -1,12 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_conversation
|
||||
NAME=open_im_conversation
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -15,10 +27,8 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
@ -1,12 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_friend
|
||||
NAME=open_im_friend
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -15,8 +27,7 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
|
@ -1,12 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_group
|
||||
NAME=open_im_group
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -15,11 +27,13 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,12 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_msg
|
||||
NAME=open_im_msg
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -15,9 +27,10 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
||||
|
@ -1,12 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_third
|
||||
NAME=open_im_third
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -15,11 +27,13 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,12 +1,24 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_user
|
||||
NAME=open_im_user
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
@ -15,11 +27,13 @@ gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ func (c *Check) ExtendMessageUpdatedNotification(ctx context.Context, sendID str
|
||||
if len(keyMap) == 0 {
|
||||
return
|
||||
}
|
||||
m.SuccessReactionExtensionList = keyMap
|
||||
m.SuccessReactionExtensions = keyMap
|
||||
m.ClientMsgID = req.ClientMsgID
|
||||
m.IsReact = resp.IsReact
|
||||
m.IsExternalExtensions = req.IsExternalExtensions
|
||||
@ -47,7 +47,7 @@ func (c *Check) ExtendMessageDeleteNotification(ctx context.Context, sendID stri
|
||||
if len(keyMap) == 0 {
|
||||
return
|
||||
}
|
||||
m.SuccessReactionExtensionList = keyMap
|
||||
m.SuccessReactionExtensions = keyMap
|
||||
m.ClientMsgID = req.ClientMsgID
|
||||
m.MsgFirstModifyTime = req.MsgFirstModifyTime
|
||||
|
||||
|
@ -10,7 +10,6 @@ import (
|
||||
"OpenIM/pkg/common/log"
|
||||
"OpenIM/pkg/common/tracelog"
|
||||
pbMsg "OpenIM/pkg/proto/msg"
|
||||
sdkws "OpenIM/pkg/proto/sdkws"
|
||||
"OpenIM/pkg/utils"
|
||||
"context"
|
||||
"encoding/json"
|
||||
@ -23,6 +22,7 @@ type ModifyMsgConsumerHandler struct {
|
||||
modifyMsgConsumerGroup *kfk.MConsumerGroup
|
||||
|
||||
extendMsgDatabase controller.ExtendMsgDatabase
|
||||
extendSetMsgModel unRelationTb.ExtendMsgSetModel
|
||||
}
|
||||
|
||||
func NewModifyMsgConsumerHandler(database controller.ExtendMsgDatabase) *ModifyMsgConsumerHandler {
|
||||
@ -66,7 +66,6 @@ func (mmc *ModifyMsgConsumerHandler) ModifyMsg(ctx context.Context, cMsg *sarama
|
||||
if !isReactionFromCache {
|
||||
continue
|
||||
}
|
||||
ctx := context.Background()
|
||||
tracelog.SetOperationID(ctx, operationID)
|
||||
if msgDataToMQ.MsgData.ContentType == constant.ReactionMessageModifier {
|
||||
notification := &apistruct.ReactionMessageModifierNotification{}
|
||||
@ -85,7 +84,7 @@ func (mmc *ModifyMsgConsumerHandler) ModifyMsg(ctx context.Context, cMsg *sarama
|
||||
ClientMsgID: notification.ClientMsgID,
|
||||
MsgFirstModifyTime: notification.MsgFirstModifyTime,
|
||||
}
|
||||
for _, v := range notification.SuccessReactionExtensionList {
|
||||
for _, v := range notification.SuccessReactionExtensions {
|
||||
reactionExtensionList[v.TypeKey] = unRelationTb.KeyValueModel{
|
||||
TypeKey: v.TypeKey,
|
||||
Value: v.Value,
|
||||
@ -98,16 +97,7 @@ func (mmc *ModifyMsgConsumerHandler) ModifyMsg(ctx context.Context, cMsg *sarama
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
var reactionExtensionList = make(map[string]*sdkws.KeyValue)
|
||||
for _, v := range notification.SuccessReactionExtensionList {
|
||||
reactionExtensionList[v.TypeKey] = &sdkws.KeyValue{
|
||||
TypeKey: v.TypeKey,
|
||||
Value: v.Value,
|
||||
LatestUpdateTime: v.LatestUpdateTime,
|
||||
}
|
||||
}
|
||||
// is already modify
|
||||
if err := mmc.extendMsgDatabase.InsertOrUpdateReactionExtendMsgSet(ctx, notification.SourceID, notification.SessionType, notification.ClientMsgID, notification.MsgFirstModifyTime, reactionExtensionList); err != nil {
|
||||
if err := mmc.extendMsgDatabase.InsertOrUpdateReactionExtendMsgSet(ctx, notification.SourceID, notification.SessionType, notification.ClientMsgID, notification.MsgFirstModifyTime, mmc.extendSetMsgModel.Pb2Model(notification.SuccessReactionExtensions)); err != nil {
|
||||
log.NewError(operationID, "InsertOrUpdateReactionExtendMsgSet failed")
|
||||
}
|
||||
}
|
||||
@ -116,7 +106,7 @@ func (mmc *ModifyMsgConsumerHandler) ModifyMsg(ctx context.Context, cMsg *sarama
|
||||
if err := json.Unmarshal(msgDataToMQ.MsgData.Content, notification); err != nil {
|
||||
continue
|
||||
}
|
||||
if err := mmc.extendMsgDatabase.DeleteReactionExtendMsgSet(ctx, notification.SourceID, notification.SessionType, notification.ClientMsgID, notification.MsgFirstModifyTime, notification.SuccessReactionExtensionList); err != nil {
|
||||
if err := mmc.extendMsgDatabase.DeleteReactionExtendMsgSet(ctx, notification.SourceID, notification.SessionType, notification.ClientMsgID, notification.MsgFirstModifyTime, mmc.extendSetMsgModel.Pb2Model(notification.SuccessReactionExtensions)); err != nil {
|
||||
log.NewError(operationID, "InsertOrUpdateReactionExtendMsgSet failed")
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ func (pc *PersistentConsumerHandler) handleChatWs2Mysql(ctx context.Context, cMs
|
||||
}
|
||||
if tag {
|
||||
log.NewInfo(operationID, "msg_transfer msg persisting", string(msg))
|
||||
if err = pc.chatLogInterface.CreateChatLog(msgFromMQ); err != nil {
|
||||
if err = pc.chatLogDatabase.CreateChatLog(msgFromMQ); err != nil {
|
||||
log.NewError(operationID, "Message insert failed", "err", err.Error(), "msg", msgFromMQ.String())
|
||||
return
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ func (g *Client) postReturn(url string, header map[string]string, input interfac
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return parseError()
|
||||
return output.parseError()
|
||||
}
|
||||
|
||||
func (g *Client) getTokenAndSave2Redis(ctx context.Context) (token string, err error) {
|
||||
|
@ -93,7 +93,7 @@ func (m *msgServer) SetMessageReactionExtensions(ctx context.Context, req *msg.S
|
||||
//} else {
|
||||
// log.Debug(req.OperationID, "redis handle secondly", req.String())
|
||||
//
|
||||
// for k, v := range req.ReactionExtensionList {
|
||||
// for k, v := range req.Pb2Model {
|
||||
// err := m.dMessageLocker.LockMessageTypeKey(req.ClientMsgID, k)
|
||||
// if err != nil {
|
||||
// setKeyResultInfo(&resp, 100, err.Error(), req.ClientMsgID, k, v)
|
||||
@ -179,7 +179,7 @@ func (m *msgServer) GetMessagesReactionExtensions(ctx context.Context, req *msg.
|
||||
// utils.JsonStringToStruct(v, temp)
|
||||
// keyMap[k] = temp
|
||||
// }
|
||||
// oneMessage.ReactionExtensionList = keyMap
|
||||
// oneMessage.Pb2Model = keyMap
|
||||
//
|
||||
// } else {
|
||||
// mongoValue, err := db.DB.GetExtendMsg(req.SourceID, req.SessionType, messageValue.ClientMsgID, messageValue.MsgFirstModifyTime)
|
||||
@ -191,14 +191,14 @@ func (m *msgServer) GetMessagesReactionExtensions(ctx context.Context, req *msg.
|
||||
// }
|
||||
// keyMap := make(map[string]*sdkws.KeyValue)
|
||||
//
|
||||
// for k, v := range mongoValue.ReactionExtensionList {
|
||||
// for k, v := range mongoValue.Pb2Model {
|
||||
// temp := new(sdkws.KeyValue)
|
||||
// temp.TypeKey = v.TypeKey
|
||||
// temp.Value = v.Value
|
||||
// temp.LatestUpdateTime = v.LatestUpdateTime
|
||||
// keyMap[k] = temp
|
||||
// }
|
||||
// oneMessage.ReactionExtensionList = keyMap
|
||||
// oneMessage.Pb2Model = keyMap
|
||||
// }
|
||||
// rResp.SingleMessageResult = append(rResp.SingleMessageResult, &oneMessage)
|
||||
//}
|
||||
@ -218,7 +218,7 @@ func (m *msgServer) DeleteMessageReactionExtensions(ctx context.Context, req *ms
|
||||
//if callbackResp.ActionCode != constant.ActionAllow || callbackResp.ErrCode != 0 {
|
||||
// rResp.ErrCode = int32(callbackResp.ErrCode)
|
||||
// rResp.ErrMsg = callbackResp.ErrMsg
|
||||
// for _, value := range req.ReactionExtensionList {
|
||||
// for _, value := range req.Pb2Model {
|
||||
// temp := new(msg.KeyValueResp)
|
||||
// temp.KeyValue = value
|
||||
// temp.ErrMsg = callbackResp.ErrMsg
|
||||
@ -242,7 +242,7 @@ func (m *msgServer) DeleteMessageReactionExtensions(ctx context.Context, req *ms
|
||||
// *req = append((*req)[:i], (*req)[i+1:]...)
|
||||
// }
|
||||
// }
|
||||
// }(&req.ReactionExtensionList, v.KeyValue.TypeKey)
|
||||
// }(&req.Pb2Model, v.KeyValue.TypeKey)
|
||||
// rResp.Result = append(rResp.Result, v)
|
||||
// }
|
||||
//}
|
||||
@ -250,7 +250,7 @@ func (m *msgServer) DeleteMessageReactionExtensions(ctx context.Context, req *ms
|
||||
//if err != nil {
|
||||
// rResp.ErrCode = 100
|
||||
// rResp.ErrMsg = err.Error()
|
||||
// for _, value := range req.ReactionExtensionList {
|
||||
// for _, value := range req.Pb2Model {
|
||||
// temp := new(msg.KeyValueResp)
|
||||
// temp.KeyValue = value
|
||||
// temp.ErrMsg = err.Error()
|
||||
@ -262,7 +262,7 @@ func (m *msgServer) DeleteMessageReactionExtensions(ctx context.Context, req *ms
|
||||
//
|
||||
//if isExists {
|
||||
// log.Debug(req.OperationID, "redis handle this delete", req.String())
|
||||
// for _, v := range req.ReactionExtensionList {
|
||||
// for _, v := range req.Pb2Model {
|
||||
// err := m.dMessageLocker.LockMessageTypeKey(req.ClientMsgID, v.TypeKey)
|
||||
// if err != nil {
|
||||
// setDeleteKeyResultInfo(&rResp, 100, err.Error(), req.ClientMsgID, v.TypeKey, v)
|
||||
@ -293,7 +293,7 @@ func (m *msgServer) DeleteMessageReactionExtensions(ctx context.Context, req *ms
|
||||
// if err != nil {
|
||||
// rResp.ErrCode = 100
|
||||
// rResp.ErrMsg = err.Error()
|
||||
// for _, value := range req.ReactionExtensionList {
|
||||
// for _, value := range req.Pb2Model {
|
||||
// temp := new(msg.KeyValueResp)
|
||||
// temp.KeyValue = value
|
||||
// temp.ErrMsg = err.Error()
|
||||
@ -306,7 +306,7 @@ func (m *msgServer) DeleteMessageReactionExtensions(ctx context.Context, req *ms
|
||||
// if err != nil {
|
||||
// rResp.ErrCode = 200
|
||||
// rResp.ErrMsg = err.Error()
|
||||
// for _, value := range req.ReactionExtensionList {
|
||||
// for _, value := range req.Pb2Model {
|
||||
// temp := new(msg.KeyValueResp)
|
||||
// temp.KeyValue = value
|
||||
// temp.ErrMsg = err.Error()
|
||||
@ -316,10 +316,10 @@ func (m *msgServer) DeleteMessageReactionExtensions(ctx context.Context, req *ms
|
||||
// return &rResp, nil
|
||||
// }
|
||||
// setValue := make(map[string]*sdkws.KeyValue)
|
||||
// for _, v := range req.ReactionExtensionList {
|
||||
// for _, v := range req.Pb2Model {
|
||||
//
|
||||
// temp := new(sdkws.KeyValue)
|
||||
// if vv, ok := mongoValue.ReactionExtensionList[v.TypeKey]; ok {
|
||||
// if vv, ok := mongoValue.Pb2Model[v.TypeKey]; ok {
|
||||
// utils.CopyStructFields(temp, &vv)
|
||||
// if v.LatestUpdateTime != vv.LatestUpdateTime {
|
||||
// setDeleteKeyResultInfo(&rResp, 300, "message have update", req.ClientMsgID, v.TypeKey, temp)
|
||||
|
@ -64,7 +64,6 @@ func CallbackGetMessageListReactionExtensions(ctx context.Context, getReq *msg.G
|
||||
OpUserID: tracelog.GetOperationID(ctx),
|
||||
SessionType: getReq.SessionType,
|
||||
TypeKeyList: getReq.TypeKeys,
|
||||
MessageKeyList: getReq.MessageReactionKeys,
|
||||
}
|
||||
resp := &cbapi.CallbackGetMessageListReactionExtResp{}
|
||||
return http.CallBackPostReturn(cbURL(), req, resp, config.Config.Callback.CallbackAfterSendGroupMsg)
|
||||
|
@ -124,7 +124,7 @@ type ReactionMessageModifierNotification struct {
|
||||
SourceID string `json:"sourceID" binding:"required"`
|
||||
OpUserID string `json:"opUserID" binding:"required"`
|
||||
SessionType int32 `json:"sessionType" binding:"required"`
|
||||
SuccessReactionExtensionList map[string]*sdkws.KeyValue `json:"reactionExtensionList,omitempty" binding:"required"`
|
||||
SuccessReactionExtensions map[string]*sdkws.KeyValue `json:"reactionExtensionList,omitempty" binding:"required"`
|
||||
ClientMsgID string `json:"clientMsgID" binding:"required"`
|
||||
IsReact bool `json:"isReact"`
|
||||
IsExternalExtensions bool `json:"isExternalExtensions"`
|
||||
@ -135,7 +135,7 @@ type ReactionMessageDeleteNotification struct {
|
||||
SourceID string `json:"sourceID" binding:"required"`
|
||||
OpUserID string `json:"opUserID" binding:"required"`
|
||||
SessionType int32 `json:"sessionType" binding:"required"`
|
||||
SuccessReactionExtensionList map[string]*sdkws.KeyValue `json:"reactionExtensionList,omitempty" binding:"required"`
|
||||
SuccessReactionExtensions map[string]*sdkws.KeyValue `json:"reactionExtensionList,omitempty" binding:"required"`
|
||||
ClientMsgID string `json:"clientMsgID" binding:"required"`
|
||||
MsgFirstModifyTime int64 `json:"msgFirstModifyTime"`
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ type MsgDatabase interface {
|
||||
|
||||
func NewMsgDatabase(msgDocModel unRelationTb.MsgDocModelInterface, cacheModel cache.Model) MsgDatabase {
|
||||
return &msgDatabase{
|
||||
msgDocModel: msgDocModel,
|
||||
msgDocDatabase: msgDocModel,
|
||||
cache: cacheModel,
|
||||
}
|
||||
}
|
||||
@ -90,22 +90,11 @@ func InitMsgDatabase(rdb redis.UniversalClient, database *mongo.Database) MsgDat
|
||||
}
|
||||
|
||||
type msgDatabase struct {
|
||||
msgDocModel unRelationTb.MsgDocModelInterface
|
||||
msgDocDatabase unRelationTb.MsgDocModelInterface
|
||||
extendMsgDatabase unRelationTb.ExtendMsgSetModelInterface
|
||||
cache cache.Model
|
||||
msg unRelationTb.MsgDocModel
|
||||
extendMsgModel unRelationTb.ExtendMsgSetModelInterface
|
||||
}
|
||||
|
||||
func (db *msgDatabase) reactionExtensionList(reactionExtensionList map[string]*sdkws.KeyValue) map[string]*unRelationTb.KeyValueModel {
|
||||
r := make(map[string]*unRelationTb.KeyValueModel)
|
||||
for key, value := range reactionExtensionList {
|
||||
r[key] = &unRelationTb.KeyValueModel{
|
||||
TypeKey: value.TypeKey,
|
||||
Value: value.Value,
|
||||
LatestUpdateTime: value.LatestUpdateTime,
|
||||
}
|
||||
}
|
||||
return r
|
||||
extendMsgSetModel unRelationTb.ExtendMsgSetModel
|
||||
}
|
||||
|
||||
func (db *msgDatabase) JudgeMessageReactionExist(ctx context.Context, clientMsgID string, sessionType int32) (bool, error) {
|
||||
@ -133,11 +122,11 @@ func (db *msgDatabase) DeleteOneMessageKey(ctx context.Context, clientMsgID stri
|
||||
}
|
||||
|
||||
func (db *msgDatabase) InsertOrUpdateReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensions map[string]*sdkws.KeyValue) error {
|
||||
return db.extendMsgModel.InsertOrUpdateReactionExtendMsgSet(ctx, sourceID, sessionType, clientMsgID, msgFirstModifyTime, db.reactionExtensionList(reactionExtensions))
|
||||
return db.extendMsgDatabase.InsertOrUpdateReactionExtendMsgSet(ctx, sourceID, sessionType, clientMsgID, msgFirstModifyTime, db.extendMsgSetModel.Pb2Model(reactionExtensions))
|
||||
}
|
||||
|
||||
func (db *msgDatabase) GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, maxMsgUpdateTime int64) (*pbMsg.ExtendMsg, error) {
|
||||
extendMsgSet, err := db.extendMsgModel.GetExtendMsgSet(ctx, sourceID, sessionType, maxMsgUpdateTime)
|
||||
extendMsgSet, err := db.extendMsgDatabase.GetExtendMsgSet(ctx, sourceID, sessionType, maxMsgUpdateTime)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -165,7 +154,7 @@ func (db *msgDatabase) GetExtendMsg(ctx context.Context, sourceID string, sessio
|
||||
}
|
||||
|
||||
func (db *msgDatabase) DeleteReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensions map[string]*sdkws.KeyValue) error {
|
||||
return db.extendMsgModel.DeleteReactionExtendMsgSet(ctx, sourceID, sessionType, clientMsgID, msgFirstModifyTime, db.reactionExtensionList(reactionExtensions))
|
||||
return db.extendMsgDatabase.DeleteReactionExtendMsgSet(ctx, sourceID, sessionType, clientMsgID, msgFirstModifyTime, db.extendMsgSetModel.Pb2Model(reactionExtensions))
|
||||
}
|
||||
|
||||
func (db *msgDatabase) SetSendMsgStatus(ctx context.Context, id string, status int32) error {
|
||||
@ -244,13 +233,13 @@ func (db *msgDatabase) BatchInsertChat2DB(ctx context.Context, sourceID string,
|
||||
//filter := bson.M{"uid": seqUid}
|
||||
//log.NewDebug(operationID, "filter ", seqUid, "list ", msgListToMongo, "userID: ", userID)
|
||||
//err := c.FindOneAndUpdate(ctx, filter, bson.M{"$push": bson.M{"msg": bson.M{"$each": msgsToMongo}}}).Err()
|
||||
err = db.msgDocModel.PushMsgsToDoc(ctx, docID, msgsToMongo)
|
||||
err = db.msgDocDatabase.PushMsgsToDoc(ctx, docID, msgsToMongo)
|
||||
if err != nil {
|
||||
if err == mongo.ErrNoDocuments {
|
||||
doc := &unRelationTb.MsgDocModel{}
|
||||
doc.DocID = docID
|
||||
doc.Msg = msgsToMongo
|
||||
if err = db.msgDocModel.Create(ctx, doc); err != nil {
|
||||
if err = db.msgDocDatabase.Create(ctx, doc); err != nil {
|
||||
prome.Inc(prome.MsgInsertMongoFailedCounter)
|
||||
//log.NewError(operationID, "InsertOne failed", filter, err.Error(), sChat)
|
||||
return utils.Wrap(err, "")
|
||||
@ -270,7 +259,7 @@ func (db *msgDatabase) BatchInsertChat2DB(ctx context.Context, sourceID string,
|
||||
nextDoc.DocID = docIDNext
|
||||
nextDoc.Msg = msgsToMongoNext
|
||||
//log.NewDebug(operationID, "filter ", seqUidNext, "list ", msgListToMongoNext, "userID: ", userID)
|
||||
if err = db.msgDocModel.Create(ctx, nextDoc); err != nil {
|
||||
if err = db.msgDocDatabase.Create(ctx, nextDoc); err != nil {
|
||||
prome.Inc(prome.MsgInsertMongoFailedCounter)
|
||||
//log.NewError(operationID, "InsertOne failed", filter, err.Error(), sChat)
|
||||
return utils.Wrap(err, "")
|
||||
@ -364,7 +353,7 @@ func (db *msgDatabase) DelMsgBySeqsInOneDoc(ctx context.Context, docID string, s
|
||||
return nil, err
|
||||
}
|
||||
for i, v := range seqMsgs {
|
||||
if err = db.msgDocModel.UpdateMsgStatusByIndexInOneDoc(ctx, docID, v, indexes[i], constant.MsgDeleted); err != nil {
|
||||
if err = db.msgDocDatabase.UpdateMsgStatusByIndexInOneDoc(ctx, docID, v, indexes[i], constant.MsgDeleted); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
@ -372,7 +361,7 @@ func (db *msgDatabase) DelMsgBySeqsInOneDoc(ctx context.Context, docID string, s
|
||||
}
|
||||
|
||||
func (db *msgDatabase) GetMsgAndIndexBySeqsInOneDoc(ctx context.Context, docID string, seqs []int64) (seqMsgs []*sdkws.MsgData, indexes []int, unExistSeqs []int64, err error) {
|
||||
doc, err := db.msgDocModel.FindOneByDocID(ctx, docID)
|
||||
doc, err := db.msgDocDatabase.FindOneByDocID(ctx, docID)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
@ -403,7 +392,7 @@ func (db *msgDatabase) GetMsgAndIndexBySeqsInOneDoc(ctx context.Context, docID s
|
||||
}
|
||||
|
||||
func (db *msgDatabase) GetNewestMsg(ctx context.Context, sourceID string) (msgPb *sdkws.MsgData, err error) {
|
||||
msgInfo, err := db.msgDocModel.GetNewestMsg(ctx, sourceID)
|
||||
msgInfo, err := db.msgDocDatabase.GetNewestMsg(ctx, sourceID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -411,7 +400,7 @@ func (db *msgDatabase) GetNewestMsg(ctx context.Context, sourceID string) (msgPb
|
||||
}
|
||||
|
||||
func (db *msgDatabase) GetOldestMsg(ctx context.Context, sourceID string) (msgPb *sdkws.MsgData, err error) {
|
||||
msgInfo, err := db.msgDocModel.GetOldestMsg(ctx, sourceID)
|
||||
msgInfo, err := db.msgDocDatabase.GetOldestMsg(ctx, sourceID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -432,7 +421,7 @@ func (db *msgDatabase) getMsgBySeqs(ctx context.Context, sourceID string, seqs [
|
||||
singleCount := 0
|
||||
m := db.msg.GetDocIDSeqsMap(sourceID, seqs)
|
||||
for docID, value := range m {
|
||||
doc, err := db.msgDocModel.FindOneByDocID(ctx, docID)
|
||||
doc, err := db.msgDocDatabase.FindOneByDocID(ctx, docID)
|
||||
if err != nil {
|
||||
//log.NewError(operationID, "not find seqUid", seqUid, value, uid, seqList, err.Error())
|
||||
continue
|
||||
@ -575,7 +564,7 @@ func (d *delMsgRecursionStruct) getSetMinSeq() int64 {
|
||||
// recursion 删除list并且返回设置的最小seq
|
||||
func (db *msgDatabase) deleteMsgRecursion(ctx context.Context, sourceID string, index int64, delStruct *delMsgRecursionStruct, remainTime int64) (int64, error) {
|
||||
// find from oldest list
|
||||
msgs, err := db.msgDocModel.GetMsgsByIndex(ctx, sourceID, index)
|
||||
msgs, err := db.msgDocDatabase.GetMsgsByIndex(ctx, sourceID, index)
|
||||
if err != nil || msgs.DocID == "" {
|
||||
if err != nil {
|
||||
if err == unrelation.ErrMsgListNotExist {
|
||||
@ -585,7 +574,7 @@ func (db *msgDatabase) deleteMsgRecursion(ctx context.Context, sourceID string,
|
||||
}
|
||||
}
|
||||
// 获取报错,或者获取不到了,物理删除并且返回seq delMongoMsgsPhysical(delStruct.delDocIDList)
|
||||
err = db.msgDocModel.Delete(ctx, delStruct.delDocIDs)
|
||||
err = db.msgDocDatabase.Delete(ctx, delStruct.delDocIDs)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@ -620,11 +609,11 @@ func (db *msgDatabase) deleteMsgRecursion(ctx context.Context, sourceID string,
|
||||
msg.SendTime = 0
|
||||
hasMarkDelFlag = true
|
||||
} else {
|
||||
if err := db.msgDocModel.Delete(ctx, delStruct.delDocIDs); err != nil {
|
||||
if err := db.msgDocDatabase.Delete(ctx, delStruct.delDocIDs); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if hasMarkDelFlag {
|
||||
if err := db.msgDocModel.UpdateOneDoc(ctx, msgs); err != nil {
|
||||
if err := db.msgDocDatabase.UpdateOneDoc(ctx, msgs); err != nil {
|
||||
return delStruct.getSetMinSeq(), utils.Wrap(err, "")
|
||||
}
|
||||
}
|
||||
@ -668,7 +657,7 @@ func (db *msgDatabase) GetSuperGroupMinMaxSeqInMongoAndCache(ctx context.Context
|
||||
}
|
||||
|
||||
func (db *msgDatabase) GetMinMaxSeqMongo(ctx context.Context, sourceID string) (minSeqMongo, maxSeqMongo int64, err error) {
|
||||
oldestMsgMongo, err := db.msgDocModel.GetOldestMsg(ctx, sourceID)
|
||||
oldestMsgMongo, err := db.msgDocDatabase.GetOldestMsg(ctx, sourceID)
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
@ -677,7 +666,7 @@ func (db *msgDatabase) GetMinMaxSeqMongo(ctx context.Context, sourceID string) (
|
||||
return 0, 0, err
|
||||
}
|
||||
minSeqMongo = msgPb.Seq
|
||||
newestMsgMongo, err := db.msgDocModel.GetNewestMsg(ctx, sourceID)
|
||||
newestMsgMongo, err := db.msgDocDatabase.GetNewestMsg(ctx, sourceID)
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string)
|
||||
if ok && localHashInfo.memberListHash == resp.GroupAbstractInfos[0].GroupMemberListHash {
|
||||
return localHashInfo.userIDs, nil
|
||||
}
|
||||
groupMembersResp, err := client.GetGroupMemberUserID(ctx, &group.GetGroupMemberUserIDReq{
|
||||
groupMembersResp, err := client.GetGroupMemberUserIDs(ctx, &group.GetGroupMemberUserIDsReq{
|
||||
GroupID: groupID,
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package unrelation
|
||||
|
||||
import (
|
||||
"OpenIM/pkg/proto/sdkws"
|
||||
"context"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -66,3 +67,15 @@ func (e *ExtendMsgSetModel) SplitSourceIDAndGetIndex() int32 {
|
||||
type GetAllExtendMsgSetOpts struct {
|
||||
ExcludeExtendMsgs bool
|
||||
}
|
||||
|
||||
func (ExtendMsgSetModel) Pb2Model(reactionExtensionList map[string]*sdkws.KeyValue) map[string]*KeyValueModel {
|
||||
r := make(map[string]*KeyValueModel)
|
||||
for key, value := range reactionExtensionList {
|
||||
r[key] = &KeyValueModel{
|
||||
TypeKey: value.TypeKey,
|
||||
Value: value.Value,
|
||||
LatestUpdateTime: value.LatestUpdateTime,
|
||||
}
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ service_names=(
|
||||
open_im_third
|
||||
open_im_cron_task
|
||||
open_im_cmd_utils
|
||||
${msg_gateway_name}
|
||||
# ${msg_gateway_name}
|
||||
${msg_transfer_name}
|
||||
${msg_name}
|
||||
${push_name}
|
||||
|
@ -1,14 +0,0 @@
|
||||
SET ROOT=%cd%
|
||||
mkdir %ROOT%\..\bin\
|
||||
cd ..\cmd\open_im_api\ && go build -ldflags="-w -s" && move open_im_api.exe %ROOT%\..\bin\
|
||||
cd ..\..\cmd\open_im_msg_gateway\ && go build -ldflags="-w -s" && move open_im_msg_gateway.exe %ROOT%\..\bin\
|
||||
cd ..\..\cmd\open_im_msg_transfer\ && go build -ldflags="-w -s" && move open_im_msg_transfer.exe %ROOT%\..\bin\
|
||||
cd ..\..\cmd\open_im_push\ && go build -ldflags="-w -s" && move open_im_push.exe %ROOT%\..\bin\
|
||||
cd ..\..\..\cmd\rpc\open_im_auth\&& go build -ldflags="-w -s" && move open_im_auth.exe %ROOT%\..\bin\
|
||||
cd ..\..\..\cmd\rpc\open_im_conversation\&& go build -ldflags="-w -s" && move open_im_conversation.exe %ROOT%\..\bin\
|
||||
cd ..\..\..\cmd\rpc\open_im_friend\&& go build -ldflags="-w -s" && move open_im_friend.exe %ROOT%\..\bin\
|
||||
cd ..\..\..\cmd\rpc\open_im_group\&& go build -ldflags="-w -s" && move open_im_group.exe %ROOT%\..\bin\
|
||||
cd ..\..\..\cmd\rpc\open_im_msg\&& go build -ldflags="-w -s" && move open_im_msg.exe %ROOT%\..\bin\
|
||||
cd ..\..\..\cmd\rpc\open_im_user\&& go build -ldflags="-w -s" && move open_im_user.exe %ROOT%\..\bin\
|
||||
cd ..\..\..\cmd\Open-IM-SDK-Core\ws_wrapper\cmd\&& go build -ldflags="-w -s" sdkws_server.go && move sdkws_server.exe %ROOT%\..\bin\
|
||||
cd %ROOT%
|
@ -1,15 +0,0 @@
|
||||
SET ROOT=%cd%
|
||||
cd %ROOT%\..\bin\
|
||||
start cmd /C .\open_im_api.exe -port 10002
|
||||
start cmd /C .\open_im_user.exe -port 10110
|
||||
start cmd /C .\open_im_friend.exe -port 10120
|
||||
start cmd /C .\open_im_group.exe -port 10150
|
||||
start cmd /C .\open_im_auth.exe -port 10160
|
||||
start cmd /C .\open_im_message_cms.exe -port 10190
|
||||
start cmd /C .\open_im_msg.exe -port 10130
|
||||
start cmd /C .\open_im_conversation.exe -port 10230
|
||||
start cmd /C .\open_im_push.exe -port 10170
|
||||
start cmd /C .\open_im_msg_transfer.exe
|
||||
start cmd /C .\sdkws_server.exe -openIM_api_port 10002 -openIM_ws_port 10001 -sdkws_port 10003 -openIM_log_level 6
|
||||
start cmd /C .\open_im_msg_gateway.exe -rpc_port 10140 -ws_port 10001
|
||||
cd %ROOT%
|
Loading…
x
Reference in New Issue
Block a user