uint/uint64全部改为uint32
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
type UserRepository interface {
|
||||
Create(ctx context.Context, user *models.User) error
|
||||
FindByUsername(ctx context.Context, username string) (*models.User, error)
|
||||
FindByID(ctx context.Context, id uint) (*models.User, error)
|
||||
FindByID(ctx context.Context, id uint32) (*models.User, error)
|
||||
FindUserForLogin(ctx context.Context, identifier string) (*models.User, error)
|
||||
FindAll(ctx context.Context) ([]*models.User, error)
|
||||
}
|
||||
@@ -66,7 +66,7 @@ func (r *gormUserRepository) FindUserForLogin(ctx context.Context, identifier st
|
||||
}
|
||||
|
||||
// FindByID 根据 ID 查找用户
|
||||
func (r *gormUserRepository) FindByID(ctx context.Context, id uint) (*models.User, error) {
|
||||
func (r *gormUserRepository) FindByID(ctx context.Context, id uint32) (*models.User, error) {
|
||||
repoCtx := logs.AddFuncName(ctx, r.ctx, "FindByID")
|
||||
var user models.User
|
||||
if err := r.db.WithContext(repoCtx).First(&user, id).Error; err != nil {
|
||||
|
||||
Reference in New Issue
Block a user