Merge remote-tracking branch 'origin/tuoyun' into tuoyun

pull/232/head
Gordon 3 years ago
commit a84298de86

@ -9,7 +9,7 @@ metadata:
name: sdk-server-ingress
spec:
rules:
- host: sdk-server.openim.xxx.com
- host: k8s.open-im-test.rentsoft.cn
http:
paths:
- backend:
@ -17,7 +17,7 @@ spec:
name: sdk-server
port:
number: 10003
path: /
path: /sdk-server
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
@ -30,7 +30,7 @@ metadata:
name: msg-gateway-ingress
spec:
rules:
- host: msg-gateway.openim.xxx.com
- host: k8s.open-im-test.rentsoft.cn
http:
paths:
- backend:
@ -38,7 +38,7 @@ spec:
name: msg-gateway
port:
number: 10001
path: /
path: /msg-gateway
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
@ -47,7 +47,7 @@ metadata:
name: api-ingress
spec:
rules:
- host: api.openim.xxx.com
- host: k8s.open-im-test.rentsoft.cn
http:
paths:
- backend:
@ -55,7 +55,7 @@ spec:
name: api
port:
number: 10002
path: /
path: /api
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
@ -64,7 +64,7 @@ metadata:
name: demo-ingress
spec:
rules:
- host: demo.openim.xxx.com
- host: k8s.open-im-test.rentsoft.cn
http:
paths:
- backend:
@ -72,7 +72,7 @@ spec:
name: demo
port:
number: 10004
path: /
path: /demo
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
@ -81,7 +81,7 @@ metadata:
name: cms-api-ingress
spec:
rules:
- host: cms-api.openim.xxx.com
- host: k8s.open-im-test.rentsoft.cn
http:
paths:
- backend:
@ -89,5 +89,5 @@ spec:
name: cms-api
port:
number: 10006
path: /
path: /cms-api
pathType: Prefix

@ -2,7 +2,6 @@ package mongo
import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/db"
server_api_params "Open_IM/pkg/proto/sdk_ws"
"context"
"fmt"
@ -16,10 +15,20 @@ var (
Client *mongo.Client
)
type MsgInfo struct {
SendTime int64
Msg []byte
}
type UserChat struct {
UID string
Msg []MsgInfo
}
func GetUserAllChat(uid string) {
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
collection := Client.Database(config.Config.Mongo.DBDatabase).Collection("msg")
var userChatList []db.UserChat
var userChatList []UserChat
uid = uid + ":"
filter := bson.M{"uid": bson.M{"$regex": uid}}
//filter := bson.M{"uid": "17726378428:0"}

Loading…
Cancel
Save