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

# Conflicts:
#	pkg/proto/user/user.pb.go
This commit is contained in:
Gordon
2023-07-03 17:14:33 +08:00
27 changed files with 443 additions and 627 deletions
-1
View File
@@ -244,7 +244,6 @@ func (p *Pusher) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData,
for _, v := range conns {
msgClient := msggateway.NewMsgGatewayClient(v)
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(ctx, &msggateway.OnlineBatchPushOneMsgReq{MsgData: msg, PushToUserIDs: pushToUserIDs})
p.discov.CloseConn(v)
if err != nil {
continue
}
+8 -3
View File
@@ -11,13 +11,18 @@ func (s *userServer) UserRegisterCount(ctx context.Context, req *pbuser.UserRegi
if req.Start > req.End {
return nil, errs.ErrArgs.Wrap("start > end")
}
total, err := s.CountTotal(ctx)
total, err := s.CountTotal(ctx, nil)
if err != nil {
return nil, err
}
count, err := s.CountRangeEverydayTotal(ctx, time.UnixMilli(req.Start), time.UnixMilli(req.End))
start := time.UnixMilli(req.Start)
before, err := s.CountTotal(ctx, &start)
if err != nil {
return nil, err
}
return &pbuser.UserRegisterCountResp{Total: total, Count: count}, nil
count, err := s.CountRangeEverydayTotal(ctx, start, time.UnixMilli(req.End))
if err != nil {
return nil, err
}
return &pbuser.UserRegisterCountResp{Total: total, Before: before, Count: count}, nil
}