golang-im聊天
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
325 B

  1. package service
  2. import (
  3. "context"
  4. "gim/internal/logic/domain/message/repo"
  5. )
  6. type seqService struct{}
  7. var SeqService = new(seqService)
  8. // GetUserNext 获取下一个序列号
  9. func (*seqService) GetUserNext(ctx context.Context, userId int64) (int64, error) {
  10. return repo.SeqRepo.Incr(repo.SeqObjectTypeUser, userId)
  11. }