mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 10:35:59 +08:00
feat(main): 🚀 Database Name Correction and S3 Module Int32 Overflow Fix with Go Routine Integration for Automated Checks and Script Optimization (#1799)
* feat: replace mongo database openIM_v3 to openim_v3 * openim-building-an-efficient-version-control-and-testing-workflow * feat: complete openim source deployment rpc start timeout * feat: optimize config Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add scripts format * feat: use scripts format code * fix cos and minio etc to typecheck * feat: scripts make verify check ci * fix: make file verify spelling * fix: make file verify spelling * Concurrent Type Checking and Cross-Platform Development in Go * feat: add copyright make lint and format * feat: add config examples file Signed-off-by: Xinwei Xiong <3293172751@qq.com> * feat: add config examples file Signed-off-by: Xinwei Xiong <3293172751@qq.com> --------- Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> Signed-off-by: Xinwei Xiong <3293172751@qq.com>
This commit is contained in:
@@ -16,6 +16,7 @@ package mgo
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/OpenIMSDK/tools/mgoutil"
|
||||
"github.com/OpenIMSDK/tools/pagination"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
|
||||
@@ -16,10 +16,11 @@ package mgo
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/OpenIMSDK/protocol/user"
|
||||
"github.com/OpenIMSDK/tools/errs"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"time"
|
||||
|
||||
"github.com/OpenIMSDK/tools/mgoutil"
|
||||
"github.com/OpenIMSDK/tools/pagination"
|
||||
@@ -89,7 +90,15 @@ func (u *UserMgo) PageFindUser(ctx context.Context, level1 int64, level2 int64,
|
||||
|
||||
return mgoutil.FindPage[*relation.UserModel](ctx, u.coll, query, pagination)
|
||||
}
|
||||
func (u *UserMgo) PageFindUserWithKeyword(ctx context.Context, level1 int64, level2 int64, userID string, nickName string, pagination pagination.Pagination) (count int64, users []*relation.UserModel, err error) {
|
||||
|
||||
func (u *UserMgo) PageFindUserWithKeyword(
|
||||
ctx context.Context,
|
||||
level1 int64,
|
||||
level2 int64,
|
||||
userID string,
|
||||
nickName string,
|
||||
pagination pagination.Pagination,
|
||||
) (count int64, users []*relation.UserModel, err error) {
|
||||
// Initialize the base query with level conditions
|
||||
query := bson.M{
|
||||
"$and": []bson.M{
|
||||
|
||||
Reference in New Issue
Block a user