new feature: add batch send msg (#560)

* new feature: add batch send msg

* new feature: add batch send msg

* new feature: add batch send msg

* new feature: add batch send msg

* new feature: add batch send msg

* new feature: add batch send msg
This commit is contained in:
WangchuXiao
2023-07-14 14:49:28 +08:00
committed by GitHub
parent 3b438d58a9
commit 70d8ae4c19
27 changed files with 142 additions and 1299 deletions
+2 -3
View File
@@ -84,9 +84,8 @@ func (u *UserGorm) Page(
}
// 获取所有用户ID
func (u *UserGorm) GetAllUserID(ctx context.Context) (userIDs []string, err error) {
err = u.db(ctx).Pluck("user_id", &userIDs).Error
return userIDs, err
func (u *UserGorm) GetAllUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, err error) {
return userIDs, errs.Wrap(u.db(ctx).Limit(int(showNumber)).Offset(int((pageNumber-1)*showNumber)).Pluck("user_id", &userIDs).Error)
}
func (u *UserGorm) GetUserGlobalRecvMsgOpt(ctx context.Context, userID string) (opt int, err error) {